/* ============ OnFlix — Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-hover: #232323;
    --accent: #e50914;
    --accent-hover: #f6121d;
    --accent-dark: #b20710;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #737373;
    --border: #2a2a2a;
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --gradient: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.5) 50%, rgba(10,10,10,0.95) 100%);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

::selection { background: var(--accent); color: white; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============ Header ============ */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header.scrolled {
    background: rgba(10,10,10,0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-left { display: flex; align-items: center; gap: 36px; }

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff4b5c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

.nav { display: flex; gap: 24px; }
.nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.nav a:hover, .nav a.active { color: var(--text-primary); }

.header-right { display: flex; align-items: center; gap: 16px; }

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box input {
    background: rgba(255,255,255,0.1);
    border: 1px solid transparent;
    color: white;
    padding: 8px 16px 8px 40px;
    border-radius: 20px;
    width: 0;
    transition: var(--transition);
    outline: none;
}
.search-box input:focus, .search-box input:not(:placeholder-shown) {
    width: 240px;
    background: rgba(255,255,255,0.15);
    border-color: var(--accent);
}
.search-box svg {
    position: absolute;
    left: 12px;
    width: 18px; height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229,9,20,0.4);
}
.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: white;
}
.btn-block { width: 100%; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

.user-menu { position: relative; }
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff4b5c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.user-avatar:hover { border-color: var(--accent); }
.user-dropdown {
    position: absolute;
    top: 48px; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}
.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.user-dropdown a:last-child { border-bottom: none; }
.user-dropdown a:hover { background: var(--bg-hover); color: white; }
.user-dropdown .role-badge {
    padding: 2px 8px;
    background: var(--accent);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* ============ Hero / Featured ============ */
.hero {
    position: relative;
    height: 90vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    background: linear-gradient(90deg, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.5) 50%, rgba(10,10,10,0.2) 100%),
                linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.5) 50%, rgba(10,10,10,1) 100%);
}
.hero-content {
    position: absolute;
    bottom: 15%;
    left: 5%;
    max-width: 600px;
    z-index: 2;
}
.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--text-secondary);
}
.hero-meta .rating { color: #ffc107; font-weight: 700; }
.hero-meta .year { color: var(--text-secondary); }
.hero-meta .quality {
    border: 1px solid var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.hero-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-buttons { display: flex; gap: 12px; }
.hero-dots {
    position: absolute;
    bottom: 8%;
    left: 5%;
    display: flex;
    gap: 8px;
    z-index: 3;
}
.hero-dot {
    width: 30px; height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
}
.hero-dot.active { background: var(--accent); }

/* ============ Sections ============ */
.section {
    padding: 40px 5%;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-title {
    font-size: 24px;
    font-weight: 700;
}
.section-title .accent { color: var(--accent); }
.section-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}
.section-link:hover { color: var(--accent); }

/* ============ Movie Cards ============ */
.movie-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
.movie-card {
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius);
    overflow: hidden;
}
.movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
}
.movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}
.movie-poster img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.movie-card:hover .movie-poster img {
    transform: scale(1.1);
}
.movie-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.movie-card:hover .movie-overlay { opacity: 1; }
.play-btn {
    width: 56px; height: 56px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}
.play-btn svg { width: 28px; height: 28px; }
.movie-card:hover .play-btn {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(229,9,20,0.6);
}
.movie-badges {
    position: absolute;
    top: 8px; left: 8px; right: 8px;
    display: flex;
    justify-content: space-between;
}
.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}
.badge-quality {
    background: rgba(229,9,20,0.9);
    color: white;
}
.badge-rating {
    background: rgba(0,0,0,0.7);
    color: #ffc107;
}
.movie-info { padding: 10px 4px; }
.movie-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.movie-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============ Catalog ============ */
.catalog-page { padding-top: 80px; min-height: 100vh; }
.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 24px 5%;
}
.catalog-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 80px;
}
.filter-group { margin-bottom: 24px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}
.filter-option:hover, .filter-option.active { color: white; }
.filter-option input { accent-color: var(--accent); }

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.catalog-count { color: var(--text-muted); font-size: 14px; }
.sort-select {
    background: var(--bg-card);
    color: white;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    outline: none;
}
.sort-select:focus { border-color: var(--accent); }

/* ============ Movie Detail Page ============ */
.movie-page { padding-top: 64px; }
.movie-backdrop {
    position: relative;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
}
.movie-backdrop img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.movie-backdrop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.7) 60%, rgba(10,10,10,1) 100%);
}
.movie-detail {
    position: relative;
    margin-top: -150px;
    padding: 0 5% 40px;
    z-index: 2;
}
.movie-detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
}
.movie-poster-large {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 2/3;
}
.movie-poster-large img { width: 100%; height: 100%; object-fit: cover; }
.movie-info-block h1 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 8px;
}
.movie-original-title {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 16px;
    font-style: italic;
}
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.movie-tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}
.movie-tag.rating { color: #ffc107; border-color: #ffc107; }
.movie-tag.quality { background: var(--accent); color: white; border-color: var(--accent); }
.movie-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}
.movie-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.fact-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; }
.fact-value { font-size: 15px; color: var(--text-primary); }
.movie-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.btn-favorite {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 600;
}
.btn-favorite:hover { border-color: var(--accent); }
.btn-favorite.active { background: var(--accent); border-color: var(--accent); }

/* ============ Player ============ */
.player-section {
    margin: 0 5% 40px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}
.player-title { font-size: 18px; font-weight: 600; }
.player-quality {
    display: flex;
    gap: 8px;
}
.quality-btn {
    padding: 6px 14px;
    border-radius: 4px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}
.quality-btn:hover { border-color: var(--accent); color: white; }
.quality-btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.player-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}
.player-wrapper iframe {
    width: 100%; height: 100%;
    border: none;
}
.player-wrapper video {
    width: 100%; height: 100%;
    background: #000;
}
.player-wrapper .video-js {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.player-click-shield {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
    background: transparent;
}
.player-click-shield.hidden { display: none; }
.player-locked {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 5;
}
.player-locked svg { width: 64px; height: 64px; color: var(--accent); }
.player-locked h3 { font-size: 24px; }
.player-locked p { color: var(--text-secondary); text-align: center; max-width: 400px; }

/* ============ Comments ============ */
.comments-section {
    margin: 0 5% 40px;
}
.comments-section h2 { font-size: 22px; margin-bottom: 20px; }
.comment-form {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}
.comment-form textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius);
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: var(--transition);
}
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form .form-actions { margin-top: 12px; text-align: right; }
.comment-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.comment-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff4b5c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: 14px; }
.comment-date { font-size: 12px; color: var(--text-muted); }
.comment-text { margin-top: 6px; color: var(--text-secondary); font-size: 14px; }

/* ============ Auth Pages ============ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    background: radial-gradient(ellipse at top, rgba(229,9,20,0.08) 0%, transparent 50%), var(--bg-primary);
}
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.auth-logo {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff4b5c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}
.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 15px;
}
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}
.form-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-error {
    background: rgba(229,9,20,0.1);
    border: 1px solid var(--accent);
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}
.form-success {
    background: rgba(34,197,94,0.1);
    border: 1px solid #22c55e;
    color: #4ade80;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}
.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 14px;
}
.auth-footer a { color: var(--accent); font-weight: 600; }

/* ============ Account Page ============ */
.account-page { padding-top: 80px; min-height: 100vh; }
.account-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 5%;
}
.account-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}
.account-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff4b5c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    flex-shrink: 0;
}
.account-name h1 { font-size: 28px; }
.account-name p { color: var(--text-muted); }
.account-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}
.account-tab {
    padding: 12px 24px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}
.account-tab:hover { color: white; }
.account-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.account-content { min-height: 300px; }
.info-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}
.info-card h3 { font-size: 18px; margin-bottom: 16px; }
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-muted); }
.info-row .value { font-weight: 600; }

/* ============ Subscription Plans ============ */
.plans-page { padding-top: 80px; min-height: 100vh; }
.plans-hero {
    text-align: center;
    padding: 40px 5%;
}
.plans-hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 12px; }
.plans-hero p { color: var(--text-secondary); font-size: 18px; max-width: 600px; margin: 0 auto; }
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 5%;
}
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.plan-card.featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(229,9,20,0.05) 0%, var(--bg-card) 100%);
}
.plan-card.featured::before {
    content: 'Популярный';
    position: absolute;
    top: 16px; right: -32px;
    background: var(--accent);
    color: white;
    padding: 4px 40px;
    font-size: 12px;
    font-weight: 700;
    transform: rotate(45deg);
}
.plan-name { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.plan-price {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 4px;
}
.plan-price .currency { font-size: 20px; color: var(--text-muted); }
.plan-period { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.plan-features { list-style: none; margin-bottom: 24px; }
.plan-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.plan-features li::before {
    content: '✓';
    color: #22c55e;
    font-weight: 700;
    font-size: 16px;
}
.plan-features li.disabled { color: var(--text-muted); }
.plan-features li.disabled::before { content: '✗'; color: var(--text-muted); }

/* ============ Admin Panel ============ */
.admin-page { padding-top: 64px; min-height: 100vh; }
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 64px);
}
.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 64px;
    height: fit-content;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.admin-nav-item:hover { background: var(--bg-hover); color: white; }
.admin-nav-item.active { color: var(--accent); border-left-color: var(--accent); background: rgba(229,9,20,0.05); }
.admin-content { padding: 32px; }
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
}
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.stat-card .stat-icon svg { width: 24px; height: 24px; }
.stat-value { font-size: 32px; font-weight: 800; }
.stat-label { color: var(--text-muted); font-size: 14px; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.admin-table tr:hover { background: var(--bg-hover); }
.admin-table img { width: 40px; height: 60px; object-fit: cover; border-radius: 4px; }

/* ============ Pagination ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0;
}
.page-btn {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: white; }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

/* ============ Footer ============ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 5% 20px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; max-width: 300px; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; color: var(--text-muted); }
.footer-col a { display: block; padding: 6px 0; color: var(--text-secondary); font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ Toast ============ */
.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    box-shadow: var(--shadow);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: #22c55e; }
.toast.error { border-color: var(--accent); }
.toast-icon { display: flex; align-items: center; gap: 12px; }

/* ============ Empty State ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.3; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--text-secondary); }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .nav { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; }
    .movie-detail-layout { grid-template-columns: 220px 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: flex; overflow-x: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
    .admin-nav-item { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    .admin-nav-item.active { border-left: none; border-bottom-color: var(--accent); }
}

@media (max-width: 768px) {
    .header { padding: 0 16px; }
    .hero-title { font-size: 32px; }
    .hero-content { left: 16px; right: 16px; }
    .section { padding: 24px 16px; }
    .movie-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .movie-detail-layout { grid-template-columns: 1fr; }
    .movie-poster-large { max-width: 200px; margin: 0 auto; }
    .movie-info-block h1 { font-size: 28px; }
    .movie-facts { grid-template-columns: 1fr; }
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .search-box input:focus, .search-box input:not(:placeholder-shown) { width: 160px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .plans-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 24px; }
    .admin-content { padding: 16px; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .movie-row { grid-template-columns: repeat(2, 1fr); }
    .catalog-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { height: 70vh; }
    .hero-title { font-size: 24px; }
    .hero-description { font-size: 14px; -webkit-line-clamp: 2; line-clamp: 2; }
    .admin-stats { grid-template-columns: 1fr; }
}
