/* ========================================
   Roxy Boost Admin - Стили админ панели
   ======================================== */

/* Страница входа */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.admin-logo {
    text-align: center;
    margin-bottom: 30px;
}

.admin-logo img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.admin-logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-green);
}

/* Админ панель */
.admin-panel {
    min-height: 100vh;
    background: var(--bg-primary);
}

.admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.admin-nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-nav-logo img {
    width: 35px;
    height: 35px;
}

.admin-nav-logo span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-green);
}

.admin-nav-tabs {
    display: flex;
    gap: 5px;
}

.admin-tab {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.admin-tab:hover {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.admin-tab.active {
    background: var(--accent-green);
    color: #000;
}

/* Контент */
.admin-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.admin-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Таблицы */
.admin-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(255, 106, 53, 0.03);
}

.admin-table td {
    font-size: 0.9rem;
}

/* Действия в таблице */
.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-actions button {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-edit {
    background: rgba(0, 136, 255, 0.15);
    color: #0088ff;
    border: 1px solid rgba(0, 136, 255, 0.3);
}

.btn-edit:hover {
    background: rgba(0, 136, 255, 0.25);
}

.btn-success {
    background: rgba(255, 106, 53, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(255, 106, 53, 0.3);
}

.btn-success:hover {
    background: rgba(255, 106, 53, 0.25);
}

.btn-danger {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.25);
}

/* Бейджи */
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(255, 106, 53, 0.15);
    color: var(--accent-green);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.badge-danger {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.badge-secondary {
    background: rgba(150, 150, 150, 0.15);
    color: #aaa;
}

/* Чекбокс */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-green);
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analytics-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.analytics-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.analytics-main-stat {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.analytics-periods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.period-item {
    display: flex;
    flex-direction: column;
}

.period-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.period-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-green);
}

/* Партнёрская программа */
/* Conversion */
.conversion-subtitle {
    display: inline-flex;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.conversion-hero {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
    gap: 20px;
    margin-bottom: 20px;
}

.conversion-rate-card,
.conversion-funnel,
.conversion-chart-card,
.conversion-metric-card {
    background: linear-gradient(180deg, rgba(29, 29, 29, 0.96), rgba(16, 16, 16, 0.96));
    border: 1px solid rgba(255, 106, 53, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.conversion-rate-card {
    position: relative;
    overflow: hidden;
    padding: 30px;
}

.conversion-rate-card::after {
    content: '';
    position: absolute;
    right: -70px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 106, 53, 0.22), transparent 65%);
    pointer-events: none;
}

.conversion-kicker,
.conversion-caption,
.conversion-metric-label,
.conversion-section-title span {
    color: var(--text-secondary);
}

.conversion-kicker {
    display: block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversion-rate {
    display: block;
    color: var(--accent-green);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.conversion-caption {
    display: block;
    max-width: 330px;
    margin-top: 12px;
    font-size: 0.95rem;
}

.conversion-funnel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 30px;
}

.conversion-funnel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: var(--text-secondary);
}

.conversion-funnel-row strong {
    color: var(--text-primary);
    font-size: 2rem;
    line-height: 1;
}

.conversion-funnel-row.accent strong {
    color: #45a3ff;
}

.conversion-funnel-bar {
    height: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.conversion-funnel-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-green), #45a3ff);
    box-shadow: 0 0 28px rgba(69, 163, 255, 0.35);
    transition: width 0.55s ease;
}

.conversion-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.conversion-metric-card {
    padding: 20px;
    border-color: rgba(255, 106, 53, 0.18);
}

.conversion-metric-card strong {
    display: block;
    margin: 8px 0 4px;
    color: var(--accent-green);
    font-size: 2rem;
    line-height: 1;
}

.conversion-metric-card small {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.conversion-metric-card.blue {
    border-color: rgba(69, 163, 255, 0.28);
}

.conversion-metric-card.blue strong {
    color: #45a3ff;
}

.conversion-metric-card.warning {
    border-color: rgba(255, 193, 7, 0.25);
}

.conversion-metric-card.warning strong {
    color: #ffc107;
}

.conversion-metric-card.danger {
    border-color: rgba(255, 71, 87, 0.25);
}

.conversion-metric-card.danger strong {
    color: #ff5c70;
}

.conversion-chart-card {
    padding: 24px;
    margin-bottom: 20px;
}

.conversion-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.conversion-section-title h3 {
    margin: 0;
    font-size: 1.15rem;
}

.conversion-chart-wrap {
    height: 330px;
}

.conversion-tables {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 20px;
}

.conversion-table-heading {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 700;
}

.partner-nick-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(255, 106, 53, 0.15), rgba(0, 200, 100, 0.1));
    color: var(--accent-green);
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 106, 53, 0.25);
}

.partner-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.partner-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.partner-stat-card.wide {
    grid-column: span 1;
}

.partner-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.partner-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Анимации */
@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes animate-stat {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(15px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-stat {
    animation: animate-stat 0.5s ease both;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.pulse-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 106, 53, 0.2);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Редактор новостей */
.news-editor-modal {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.news-seo-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.news-seo-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 15px;
}

.slug-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.slug-prefix {
    padding: 10px 12px;
    background: rgba(255, 106, 53, 0.1);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.slug-input-wrapper .form-input {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.char-counter.over-limit {
    color: #ff4757;
}

/* Кастомный WYSIWYG-редактор */
.custom-editor {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.editor-toolbar select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
}

.editor-toolbar select:focus {
    border-color: var(--accent-green);
}

.editor-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

.editor-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.editor-btn:hover {
    background: rgba(255, 106, 53, 0.1);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.editor-btn:active {
    background: rgba(255, 106, 53, 0.2);
    color: var(--accent-green);
}

.editor-content {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
    outline: none;
}

.editor-content:focus {
    box-shadow: inset 0 0 0 1px rgba(255, 106, 53, 0.2);
}

.editor-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 20px 0 10px;
}

.editor-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 18px 0 8px;
}

.editor-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 15px 0 8px;
}

.editor-content p {
    margin-bottom: 12px;
}

.editor-content a {
    color: var(--accent-green);
    text-decoration: underline;
}

.editor-content ul,
.editor-content ol {
    padding-left: 25px;
    margin-bottom: 12px;
}

.editor-content li {
    margin-bottom: 5px;
}

.editor-content .article-cta-btn {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--accent-green), #e04d1a);
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 50px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(255, 106, 53, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.editor-content .article-cta-btn:hover {
    box-shadow: 0 6px 30px rgba(255, 106, 53, 0.5);
    transform: translateY(-2px);
}

.editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 10px 0;
}

.editor-content strong {
    font-weight: 700;
}

/* Обложка новости */
.cover-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color var(--transition-fast);
    overflow: hidden;
}

.cover-upload-area:hover {
    border-color: var(--accent-green);
}

.cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cover-preview {
    position: relative;
}

.cover-preview img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.cover-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.9);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.cover-remove-btn:hover {
    transform: scale(1.1);
}

/* Модалка вставки ссылки редактора */
.editor-link-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.editor-link-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    width: 100%;
    max-width: 400px;
}

.editor-link-modal-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.required {
    color: #ff4757;
}

/* Превью содержания статьи в форме новости */
.article-content-preview {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    padding: 16px;
    min-height: 80px;
    max-height: 200px;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.article-content-preview-empty {
    color: var(--text-muted);
    font-style: italic;
}

.article-content-preview.has-content {
    color: var(--text-primary);
    max-height: 240px;
    overflow-y: auto;
    position: relative;
}

/* В превью формы новости тарифы — статично в потоке, без абсолютного позиционирования */
.article-content-preview .article-tariff-placeholder {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 280px;
    margin: 12px 0;
    z-index: auto !important;
    cursor: default;
}

.article-content-preview .article-tariff-resize-handle {
    display: none !important;
}

/* В превью формы новости таблицы — статично в потоке */
.article-content-preview .article-table-block {
    position: static !important;
    left: auto !important;
    top: auto !important;
    margin: 20px 0 !important;
    cursor: default;
}

.article-content-preview .article-table-move-handle,
.article-content-preview .article-table-editor-tools {
    display: none !important;
}

/* Тариф в редакторе: перетаскивание и ресайз */
.article-tariff-placeholder.article-tariff-float {
    cursor: move;
    box-sizing: border-box;
    touch-action: none;
    overflow: hidden;
}

.article-editor-area .article-tariff-placeholder {
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 106, 53, 0.25);
    overflow: hidden;
}

.article-editor-area .article-tariff-scaler {
    transform-origin: top left;
}

.article-editor-area .article-tariff-placeholder .pricing-card:hover {
    transform: none;
}

.article-editor-area .article-tariff-placeholder .pricing-card {
    background: var(--bg-card-hover);
    border: 2px solid var(--accent-green);
    box-shadow: var(--shadow-glow);
}

.article-tariff-placeholder.article-tariff-dragging {
    opacity: 0.85;
    outline: 2px dashed var(--accent-green);
}

.article-tariff-placeholder.article-tariff-resizing,
.article-tariff-placeholder.article-tariff-selected {
    outline: 2px dashed var(--accent-green);
}

.article-tariff-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 25;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.15s, background 0.15s;
}

.article-tariff-delete-btn:hover {
    opacity: 1;
    background: rgba(220, 53, 69, 0.9);
}

.article-content:not(.article-editor-area) .article-tariff-delete-btn {
    display: none !important;
}

.article-tariff-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 22px;
    height: 22px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, var(--accent-green) 50%);
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 20;
    pointer-events: auto;
    flex-shrink: 0;
}

/* Уголок ресайза только в редакторе; на опубликованной статье скрыт */
.article-content:not(.article-editor-area) .article-tariff-resize-handle {
    display: none;
}

.article-editor-area .article-tariff-resize-handle {
    display: block;
    box-shadow: -2px -2px 0 rgba(0, 0, 0, 0.35);
}

/* Выделенная таблица в редакторе */
.article-editor-area .article-table-block.article-table-selected {
    outline: 2px dashed var(--accent-green);
    outline-offset: 2px;
}

/* Адаптивность */
@media (max-width: 900px) {
    .admin-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .admin-nav-tabs {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .admin-tab {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .admin-content {
        padding: 15px;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .partner-stats-grid {
        grid-template-columns: 1fr;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .conversion-hero,
    .conversion-tables {
        grid-template-columns: 1fr;
    }

    .conversion-metrics {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .conversion-rate {
        font-size: 3rem;
    }

    .conversion-section-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .conversion-chart-wrap {
        height: 280px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .admin-actions {
        flex-direction: column;
    }

    .modal {
        padding: 20px;
        width: 95%;
    }
}

/* ========================================
   Кастомный видеоплеер для новостей
   ======================================== */
.custom-video-player-wrapper {
    position: relative;
    width: 100%;
    margin: 20px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
}

/* Индикатор загрузки видео */
.video-upload-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.video-progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    padding: 30px 50px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.video-progress-content span {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

.video-progress-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.custom-video-player {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.custom-video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
}

.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 10px 12px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.custom-video-player:hover .custom-video-controls,
.custom-video-player.hide-controls .custom-video-controls {
    opacity: 1;
}

.custom-video-player.hide-controls .custom-video-controls {
    opacity: 0;
}

.custom-video-progress-container {
    width: 100%;
    height: 6px;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.custom-video-progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    transition: height 0.1s ease;
}

.custom-video-progress-container:hover .custom-video-progress-bar {
    height: 6px;
}

.custom-video-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-green);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.custom-video-controls-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-video-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.custom-video-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.custom-video-btn:active {
    transform: scale(0.95);
}

.custom-video-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
}

.custom-video-duration {
    opacity: 0.7;
}

.custom-video-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.custom-video-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

.custom-video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.custom-video-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.custom-video-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.custom-video-volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Fullscreen стили */
.custom-video-player:fullscreen {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-video-player:fullscreen .custom-video {
    max-height: none;
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.custom-video-player:fullscreen .custom-video-controls {
    padding: 15px 20px 20px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .custom-video-volume-slider {
        width: 60px;
    }
    
    .custom-video-btn {
        width: 32px;
        height: 32px;
    }
    
    .custom-video-btn svg {
        width: 16px;
        height: 16px;
    }
}
