*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a28;
    --bg-hover: #222236;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --gold: #d4af37;
    --gold-hover: #e8c84a;
    --red: #e94560;
    --red-hover: #ff5a75;
    --accent-blue: #4a9eff;
    --border: #2a2a3e;
    --shadow: rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.gold {
    color: var(--gold);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 32px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-icon {
    font-size: 1.4rem;
    color: var(--red);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-greeting {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--red);
    color: white;
}

.btn-primary:hover {
    background: var(--red-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a20 30%, #0a1020 70%, #0a0a1a 100%);
    overflow: hidden;
    margin-top: 72px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 700px;
    padding: 0 24px;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header {
    padding: 120px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.movie-row {
    margin-bottom: 56px;
}

.row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.row-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.see-all {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.see-all:hover {
    color: var(--gold-hover);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    transition: all var(--transition);
    cursor: pointer;
    display: block;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px var(--shadow);
    background: var(--bg-hover);
}

.card-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .card-poster img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.movie-card:hover .card-overlay {
    opacity: 1;
}

.card-rating {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.95rem;
}

.card-info {
    padding: 14px 16px 18px;
}

.card-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.card-director {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 4px;
}

.search-section {
    margin-bottom: 32px;
}

.search-form {
    max-width: 640px;
    margin: 0 auto;
}

.search-wrapper {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 48px;
    padding: 6px 6px 6px 24px;
    transition: border-color var(--transition);
}

.search-wrapper:focus-within {
    border-color: var(--gold);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 12px 28px;
    border-radius: 48px;
    background: var(--red);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background var(--transition);
}

.search-btn:hover {
    background: var(--red-hover);
}

.genre-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.genre-tab {
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid transparent;
    transition: all var(--transition);
}

.genre-tab:hover,
.genre-tab.active {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
}

.search-results-info {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.detail-page {
    margin-top: 72px;
    padding: 48px 0;
    position: relative;
}

.detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    pointer-events: none;
}

.detail-content {
    position: relative;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 48px;
    align-items: start;
}

.detail-poster {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.detail-info {
    padding-top: 16px;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--gold);
}

.detail-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.15;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-rating {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.1rem;
}

.detail-year,
.detail-genre {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 4px 14px;
    background: var(--bg-card);
    border-radius: 20px;
}

.detail-director {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 32px;
}

.detail-description h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.detail-description p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

.detail-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.related-section {
    margin-top: 72px;
    position: relative;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 48px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.form-group input:focus {
    border-color: var(--gold);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--gold);
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--gold-hover);
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    color: var(--red);
}

.about-mission {
    max-width: 720px;
    margin: 48px auto 64px;
    text-align: center;
}

.about-mission h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.about-mission p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-stats {
    margin-bottom: 72px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 24px;
    text-align: center;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.stat-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-team {
    margin-bottom: 72px;
}

.about-team h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 24px;
    text-align: center;
    transition: all var(--transition);
}

.team-card:hover {
    transform: translateY(-4px);
    border-color: var(--border);
    box-shadow: 0 12px 40px var(--shadow);
}

.team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--gold));
    color: white;
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.team-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.team-role {
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.team-bio {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.about-values {
    margin-bottom: 72px;
}

.about-values h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 24px;
    text-align: center;
    transition: all var(--transition);
}

.value-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.value-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
    display: block;
}

.value-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.value-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color var(--transition);
}

.footer-col ul a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
}

main.container {
    padding-top: 40px;
    padding-bottom: 40px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition);
}

.dash-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.dash-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 6px;
}

.dash-label {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.dash-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
}

.dash-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 24px;
}

.dash-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.dash-row:last-child {
    border-bottom: none;
}

.dash-key {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.dash-val {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.status-ok {
    color: #4ade80;
}

@media (max-width: 1024px) {
    .stat-grid,
    .team-grid,
    .values-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-content {
        grid-template-columns: 260px 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-auth {
        display: none;
    }

    .nav-container.open .nav-links,
    .nav-container.open .nav-auth {
        display: flex;
    }

    .nav-container.open {
        flex-wrap: wrap;
        height: auto;
        padding-bottom: 16px;
    }

    .nav-container.open .nav-links {
        order: 3;
        width: 100%;
        flex-direction: column;
        gap: 4px;
    }

    .nav-container.open .nav-auth {
        order: 4;
        width: 100%;
        justify-content: center;
        padding-top: 12px;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.6rem;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 300px;
        margin: 0 auto;
    }

    .detail-info h1 {
        font-size: 2rem;
        text-align: center;
    }

    .detail-meta {
        justify-content: center;
    }

    .detail-actions {
        justify-content: center;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .auth-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero {
        min-height: 500px;
        height: 70vh;
    }

    .stat-grid,
    .team-grid,
    .values-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card-info h3 {
        font-size: 0.85rem;
    }

    .card-meta {
        font-size: 0.75rem;
    }
}
