/* ============================================
   سينما اكس — ثيم أسود احترافي
   ============================================ */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-card: #1a1a1a;
    --bg-elevated: #222;
    --border: #2a2a2a;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --accent: #e50914;
    --accent-hover: #ff1a27;
    --accent-glow: rgba(229, 9, 20, 0.35);
    --gold: #f5c518;
    --sidebar-width: 280px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --transition: 0.25s ease;
    --font: 'Cairo', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* Overlay */
.app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.app-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition);
    padding: 1.5rem 0;
}

.sidebar.is-open {
    transform: translateX(0);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar__logo {
    font-size: 2rem;
}

.sidebar__brand strong {
    display: block;
    font-size: 1.1rem;
}

.sidebar__brand small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.sidebar__nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}

.sidebar__link:hover,
.sidebar__link.is-active {
    background: rgba(229, 9, 20, 0.1);
    color: var(--text-primary);
    border-right: 3px solid var(--accent);
}

.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.sidebar__link.is-active .nav-icon,
.sidebar__link:hover .nav-icon {
    opacity: 1;
    color: var(--accent);
}

.sidebar__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* Main wrapper */
.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-height);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

.topbar__logo {
    background: var(--accent);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.search-form {
    flex: 1;
    display: flex;
    min-width: 0;
    max-width: 480px;
    margin-right: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0.65rem 1.25rem;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
}

.search-form input::placeholder {
    color: var(--text-muted);
}

.search-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border: none;
    padding: 0 1rem;
    cursor: pointer;
    color: #fff;
    transition: background var(--transition);
}

.search-form button .nav-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.search-form button:hover {
    background: var(--accent-hover);
}

/* Main content */
.main-content {
    flex: 1;
    padding-bottom: 2rem;
}

/* Hero Slider — قالب ثابت + صورة تتكيّف معه */
.hero-slider {
    --hero-frame-height: clamp(300px, 42vw, 500px);
    --hero-frame-ratio: 16 / 9;
    --hero-img-position: center 28%;
    position: relative;
    padding: 1.5rem 1rem 2.75rem;
    overflow: visible;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(229, 9, 20, 0.08) 0%, transparent 55%);
}

.hero-slider__track {
    position: relative;
    min-height: var(--hero-frame-height);
    perspective: 1400px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.55s ease, visibility 0.55s;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    pointer-events: auto;
}

.hero-slide__visual {
    position: relative;
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: 0 0.25rem;
    transform-style: preserve-3d;
}

.hero-slide__frame {
    position: relative;
    width: 100%;
    height: var(--hero-frame-height);
    aspect-ratio: var(--hero-frame-ratio);
    max-height: var(--hero-frame-height);
    background: #0a0a0a;
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
    transform: translateY(28px) scale(0.9) rotateX(14deg);
    transform-origin: center bottom;
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 16px 32px rgba(0, 0, 0, 0.5),
        0 32px 64px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition:
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.75s ease;
    will-change: transform;
}

.hero-slide.is-active .hero-slide__frame {
    transform: translateY(-10px) scale(1) rotateX(0deg);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.45),
        0 24px 48px rgba(0, 0, 0, 0.55),
        0 48px 96px rgba(0, 0, 0, 0.5),
        0 64px 120px rgba(0, 0, 0, 0.35),
        0 0 60px rgba(229, 9, 20, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.hero-slide__shadow {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -18px;
    height: 36px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, transparent 72%);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.75s ease, transform 0.75s ease;
    transform: scale(0.85);
    z-index: -1;
}

.hero-slide.is-active .hero-slide__shadow {
    opacity: 1;
    transform: scale(1);
}

.hero-slide__img {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--hero-img-position);
}

.hero-slide__shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        125deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.04) 22%,
        transparent 45%,
        transparent 100%
    );
}

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.45) 32%,
        transparent 55%
    );
}

.hero-slide__content {
    position: absolute;
    bottom: 1.25rem;
    right: 1.5rem;
    left: 1.5rem;
    z-index: 4;
    max-width: 620px;
    padding: 0;
}

.hero-slide__content h1 {
    font-size: clamp(1.35rem, 3.5vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}

.hero-slide__content p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

.hero-slider__nav {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    line-height: 1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.hero-slider__nav:hover {
    background: var(--accent);
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 12px 32px rgba(229, 9, 20, 0.35);
}

.hero-slider__nav--prev { right: max(0.5rem, calc(50% - 560px)); }
.hero-slider__nav--next { left: max(0.5rem, calc(50% - 560px)); }

.hero-slider__dots {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    border: 1px solid var(--border);
}

.hero-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: background var(--transition), transform var(--transition);
}

.hero-slider__dot.is-active {
    background: var(--accent);
    transform: scale(1.2);
}

.hero-placeholder {
    padding: 4rem 1.5rem;
    text-align: center;
    background: var(--bg-secondary);
}

.hero-placeholder h1 {
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-align: center;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn--primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn--lg { padding: 0.85rem 1.75rem; font-size: 1rem; }

/* Movies section */
.movies-section {
    padding: 2rem 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.link-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

@media (min-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.movie-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(229, 9, 20, 0.3);
}

.movie-card__poster-wrap {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    display: block;
    background: var(--bg-elevated);
}

.movie-card__poster {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    background: var(--bg-elevated);
    transition: transform 0.4s ease;
}

.movie-card:hover .movie-card__poster {
    transform: scale(1.05);
}

.movie-card__rating {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    background: var(--gold);
    color: #000;
    font-weight: 800;
    font-size: 0.68rem;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
}

@media (min-width: 768px) {
    .movie-card__rating {
        top: 0.5rem;
        left: 0.5rem;
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
}

.movie-card__body {
    display: flex;
    flex-direction: column;
    padding: 0.45rem 0.5rem 0.55rem;
    gap: 0.3rem;
}

@media (min-width: 768px) {
    .movie-card__body {
        padding: 0.55rem 0.7rem 0.65rem;
        gap: 0.35rem;
    }
}

.movie-card__title {
    font-size: 0.78rem;
    margin: 0;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

@media (min-width: 768px) {
    .movie-card__title {
        font-size: 0.88rem;
    }
}

.movie-card__title a {
    color: var(--text-primary);
}

.movie-card__title a:hover {
    color: var(--accent);
}

.movie-card__excerpt {
    font-size: 0.68rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    word-break: break-word;
    max-height: calc(0.68rem * 1.35 * 2);
}

@media (min-width: 768px) {
    .movie-card__excerpt {
        font-size: 0.74rem;
        line-height: 1.4;
        max-height: calc(0.74rem * 1.4 * 2);
    }
}

.movie-card__action {
    align-self: flex-start;
    padding: 0.3rem 0.55rem;
    font-size: 0.68rem;
    margin-top: 0.1rem;
}

@media (min-width: 768px) {
    .movie-card__action {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
        margin-top: 0.15rem;
    }
}

/* Movie detail */
.movie-detail {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.movie-detail__hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.movie-detail__poster-wrap {
    margin: 0 auto;
    width: 100%;
    max-width: 280px;
}

.movie-detail__poster {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(229, 9, 20, 0.12);
    background: var(--bg-card);
    line-height: 0;
}

.movie-detail__poster img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center center;
}

.movie-detail__head {
    flex: 1;
    min-width: 0;
}

.movie-detail__header h1 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.movie-detail__meta {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.movie-detail__ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.movie-detail__rate-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem;
}

.movie-detail__rate-section .rating-widget {
    margin-bottom: 0;
    border: none;
    background: transparent;
}

@media (min-width: 900px) {
    .movie-detail {
        padding: 2rem 2rem 3rem;
    }

    .movie-detail__hero {
        flex-direction: row;
        align-items: flex-start;
        gap: 2.5rem;
    }

    .movie-detail__poster-wrap {
        flex: 0 0 300px;
        max-width: 300px;
        margin: 0;
    }

    .movie-detail__poster {
        transform: translateY(-4px);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .movie-detail__poster:hover {
        transform: translateY(-8px);
        box-shadow:
            0 24px 56px rgba(0, 0, 0, 0.6),
            0 0 48px rgba(229, 9, 20, 0.15);
    }
}

.rating-badge {
    background: var(--gold);
    color: #000;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
}

.rating-badge--muted {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-weight: 600;
}

/* تقييم الزوار */
.rating-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.rating-widget__title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.rating-widget__hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.rating-widget__stars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rating-star {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s ease;
    font-family: var(--font);
}

.rating-star:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.08);
}

.rating-star.is-selected {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.rating-star:disabled {
    opacity: 0.6;
    cursor: wait;
}

.rating-widget__msg {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-height: 1.25rem;
}

.movie-detail__description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.movie-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.movie-detail__actions .btn {
    margin: 0;
}

/* Page content */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.page-content--wide {
    max-width: 960px;
}

.page-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-hero--compact {
    margin-bottom: 1.75rem;
}

.page-hero__icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.page-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 0.75rem;
}

.page-content .lead {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

.page-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2rem;
}

.features-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 700px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.feature-card__icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 700px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.info-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-card .btn {
    margin-top: 1rem;
}

.info-list {
    list-style: none;
    margin-bottom: 1rem;
}

.info-list li {
    padding: 0.5rem 0;
    padding-right: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.info-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--accent);
}

/* Forms */
.contact-form,
.admin-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    gap: 1rem;
}

.form-row--2 {
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .form-row--2 {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 600px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1rem;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.alert--success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #86efac;
}

.alert--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.alert--warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #fcd34d;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem 1rem;
    margin-top: auto;
}

.site-footer__inner {
    text-align: center;
    max-width: 1280px;
    margin: 0 auto;
}

.site-footer__inner p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.site-footer__legal a {
    color: var(--text-secondary);
}

.site-footer__legal a:hover {
    color: var(--accent);
}

.site-footer__legal span {
    color: var(--text-muted);
}

.site-footer__meta {
    margin-top: 0.35rem;
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
}

.legal-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: right;
}

.legal-block h2 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
}

.legal-block h2:first-child {
    margin-top: 0;
}

.legal-block p,
.legal-block li {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Desktop: sidebar always visible */
@media (max-width: 1023px) {
    .topbar {
        gap: 0.45rem;
        padding: 0 0.65rem;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        padding: 6px;
    }

    .topbar__brand span:not(.topbar__logo) {
        display: none;
    }

    .topbar__logo {
        width: 32px;
        height: 32px;
        font-size: 0.68rem;
    }

    .search-form {
        max-width: none;
    }

    .search-form input {
        padding: 0.45rem 0.7rem;
        font-size: 0.82rem;
    }

    .search-form input::placeholder {
        font-size: 0.78rem;
    }

    .search-form button {
        padding: 0 0.65rem;
        flex-shrink: 0;
    }

    .search-form button .nav-icon {
        width: 0.95rem;
        height: 0.95rem;
    }
}

@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
    }

    .menu-toggle {
        display: none;
    }

    .main-wrapper {
        margin-right: var(--sidebar-width);
    }

    .app-overlay {
        display: none;
    }

    .topbar {
        padding: 0 2rem;
    }

    .movies-section {
        padding-right: 2rem;
        padding-left: 2rem;
    }

    .hero-slider {
        --hero-frame-height: clamp(320px, 38vw, 520px);
        padding: 2rem 2rem 3rem;
    }

    .hero-slide__content {
        right: 2.5rem;
        left: 2.5rem;
        bottom: 1.75rem;
    }

    .hero-slide.is-active .hero-slide__frame {
        transform: translateY(-16px) scale(1) rotateX(0deg);
    }
}
