:root {
    --bg-color: #0d0a0b;
    --gold: #dfb15b;
    --neon-glow: #e65c00;
    --text-color: #f3eff0;
    --card-bg: #1a1516;
}

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

[hidden] {
    display: none !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
}

.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://cssanimation.rocks/images/random/grain.png');
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

header,
.site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 22px 6%;
    background: linear-gradient(to bottom, rgba(13, 10, 11, 0.92), rgba(13, 10, 11, 0.55));
    backdrop-filter: blur(10px);
    position: absolute;
    width: 100%;
    z-index: 100;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 2px;
}

.logo span {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(223, 177, 91, 0.3);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-right: 30px;
    font-size: 16px;
    transition: 0.4s ease;
    opacity: 0.7;
}

nav a:hover,
nav a.active {
    opacity: 1;
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold);
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-self: end;
}

.header-search {
    position: relative;
    width: 100%;
    max-width: 560px;
    justify-self: center;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 22px;
    background: rgba(26, 21, 22, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.search-bar:focus-within {
    background: rgba(26, 21, 22, 0.88);
    border-color: rgba(223, 177, 91, 0.65);
    box-shadow:
        0 0 0 3px rgba(223, 177, 91, 0.1),
        0 0 28px rgba(230, 92, 0, 0.22),
        0 8px 28px rgba(0, 0, 0, 0.35);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: rgba(223, 177, 91, 0.85);
    transition: color 0.3s ease, transform 0.3s ease;
}

.search-bar:focus-within .search-icon {
    color: var(--gold);
    transform: scale(1.08);
}

.search-icon svg {
    width: 100%;
    height: 100%;
}

.search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    line-height: 1.4;
}

.search-input::placeholder {
    color: rgba(243, 239, 240, 0.45);
}

.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    z-index: 250;
    overflow: hidden;
    background: rgba(13, 10, 11, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(223, 177, 91, 0.22);
    border-radius: 18px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.65),
        0 0 24px rgba(230, 92, 0, 0.08);
    max-height: min(70vh, 520px);
    overflow-y: auto;
    animation: searchDropdownIn 0.25s ease;
}

.search-dropdown[hidden] {
    display: none;
}

@keyframes searchDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.25s ease, padding-right 0.25s ease;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown-item:focus-visible {
    background: rgba(223, 177, 91, 0.1);
    padding-right: 20px;
    outline: none;
}

.search-dropdown-poster {
    flex-shrink: 0;
    width: 44px;
    height: 66px;
    border-radius: 8px;
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-dropdown-no-poster {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1a1516, #2a1f21);
    font-size: 18px;
}

.search-dropdown-meta {
    min-width: 0;
    flex: 1;
    text-align: right;
}

.search-dropdown-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-dropdown-year {
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
}

.search-dropdown-type {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(230, 92, 0, 0.14);
    border: 1px solid rgba(230, 92, 0, 0.35);
    color: var(--neon-glow);
    letter-spacing: 0.3px;
}

.search-dropdown-status {
    padding: 18px 20px;
    text-align: center;
    color: rgba(243, 239, 240, 0.6);
    font-size: 14px;
}

.hero-section {
    height: 85vh;
    background-image: url('https://images.unsplash.com/photo-1478720568477-152d9b164e26?q=80&w=1500&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 8%;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--bg-color), rgba(13, 10, 11, 0.4), var(--bg-color));
}

.hero-content {
    position: relative;
    max-width: 600px;
    z-index: 2;
    animation: fadeIn 1.5s ease-out;
}

.vintage-badge {
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 5px 15px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
    border-radius: 2px;
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-content p {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 30px;
}

.hero-buttons .btn-watch {
    background: var(--gold);
    color: var(--bg-color);
    padding: 12px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 3px;
    margin-left: 15px;
    box-shadow: 0 4px 15px rgba(223, 177, 91, 0.4);
    transition: 0.4s ease;
}

.hero-buttons .btn-watch:hover {
    background: #fff;
    box-shadow: 0 4px 25px rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
}

.hero-buttons .btn-info {
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 3px;
    transition: 0.4s ease;
}

.hero-buttons .btn-info:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.movies-section {
    padding: 48px 8% 52px;
    display: block;
    width: 100%;
}

.movies-section+.movies-section {
    padding-top: 10px;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    color: var(--gold);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--gold);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 28px;
    width: 100%;
    align-content: start;
}

.movie-card {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    cursor: pointer;
    border-radius: 12px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.35s ease;
}

.movie-card:hover .card-inner {
    transform: scale(1.05);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6),
        0 0 28px rgba(223, 177, 91, 0.12);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.card-front {
    background: linear-gradient(145deg, #1a1516, #2a1f21);
    z-index: 1;
}

.card-front img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .card-front img {
    transform: scale(1.08);
    filter: brightness(0.75);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(13, 10, 11, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(223, 177, 91, 0.5);
    color: var(--gold);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.card-back {
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 18px;
    text-align: right;
    color: #fff;
    background: linear-gradient(to top,
            rgba(13, 10, 11, 0.96) 0%,
            rgba(13, 10, 11, 0.72) 45%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

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

.card-back h3 {
    font-size: 15px;
    color: var(--gold);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-back p {
    font-size: 12px;
    line-height: 1.55;
    opacity: 0.85;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rating {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 13px;
    color: #ffcc00;
}

.btn-play {
    background: rgba(223, 177, 91, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 6px 18px;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: 0.3s;
}

.movie-card:hover .btn-play {
    background: var(--gold);
    color: var(--bg-color);
    box-shadow: 0 0 14px rgba(223, 177, 91, 0.45);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

a.movie-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.logo {
    text-decoration: none;
}

.no-poster {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1516, #2a1f21);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 14px;
    opacity: 0.6;
}

.search-section {
    padding: 40px 8% 20px;
    text-align: center;
}

.search-section .section-title {
    margin-bottom: 16px;
}

.search-section-hint {
    color: rgba(243, 239, 240, 0.55);
    font-size: 15px;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

.snai-section-header {
    margin-bottom: 22px;
    scroll-margin-top: 96px;
    display: block;
    width: 100%;
    position: relative;
    z-index: 2;
}

.snai-section-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.snai-section-title::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    width: min(120px, 35%);
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.snai-section-index {
    flex-shrink: 0;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(223, 177, 91, 0.7);
    padding: 3px 8px;
    border: 1px solid rgba(223, 177, 91, 0.25);
    border-radius: 4px;
    line-height: 1;
}

.snai-section-label {
    font-family: 'Cairo', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.snai-section-lead {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(243, 239, 240, 0.42);
}

.card-badge-new {
    background: rgba(223, 177, 91, 0.88);
    border-color: rgba(255, 215, 130, 0.6);
    color: #120e0f;
}

.card-subtitle {
    font-size: 12px;
    color: var(--gold);
    margin-bottom: 6px;
    opacity: 0.95;
}

.no-results {
    text-align: center;
    color: rgba(243, 239, 240, 0.5);
    font-size: 18px;
    padding: 40px;
}

.detail-hero {
    min-height: 80vh;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    padding: 120px 8% 60px;
    position: relative;
}

.detail-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    animation: fadeIn 1s ease-out;
}

.detail-poster {
    flex-shrink: 0;
    width: 300px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.detail-poster img:hover {
    transform: scale(1.02);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
}

.detail-info {
    max-width: 650px;
}

.detail-info h1 {
    font-size: 38px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.tagline {
    font-style: italic;
    color: var(--gold);
    opacity: 0.8;
    margin-bottom: 15px;
    font-size: 16px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
}

.detail-meta span {
    background: rgba(26, 21, 22, 0.8);
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-badge {
    background: rgba(223, 177, 91, 0.2) !important;
    border-color: var(--gold) !important;
    color: var(--gold);
    font-weight: bold;
}

.genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.genre-tag {
    background: rgba(230, 92, 0, 0.15);
    border: 1px solid rgba(230, 92, 0, 0.3);
    color: var(--neon-glow);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.overview {
    line-height: 1.9;
    opacity: 0.85;
    margin-bottom: 20px;
    font-size: 15px;
}

.director {
    margin-bottom: 20px;
    color: rgba(243, 239, 240, 0.7);
}

.detail-actions {
    margin-top: 25px;
}

.btn-large {
    display: inline-block;
    background: var(--gold);
    color: var(--bg-color);
    padding: 15px 45px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 5px 20px rgba(223, 177, 91, 0.4);
    transition: 0.4s;
}

.btn-large:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.5);
}

.btn-watch-later {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-right: 12px;
}

.btn-watch-later:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn-watch-later.active {
    background: rgba(223, 177, 91, 0.15);
    color: var(--gold);
    border-color: var(--gold);
}

.btn-watch-later.active:hover {
    background: rgba(223, 177, 91, 0.25);
    box-shadow: 0 0 12px rgba(223, 177, 91, 0.3);
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 25px;
}

.cast-card {
    text-align: center;
}

.cast-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(223, 177, 91, 0.3);
    margin-bottom: 10px;
    transition: 0.3s;
}

.cast-card:hover img {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(223, 177, 91, 0.3);
}

.cast-card h4 {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.cast-card p {
    font-size: 12px;
    color: rgba(243, 239, 240, 0.5);
}

.no-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(26, 21, 22, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 36px;
    border: 2px solid rgba(223, 177, 91, 0.2);
}

.seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.season-card {
    text-decoration: none;
    color: inherit;
    background: rgba(26, 21, 22, 0.8);
    border: 1px solid rgba(223, 177, 91, 0.15);
    border-radius: 10px;
    overflow: hidden;
    transition: 0.4s;
}

.season-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(223, 177, 91, 0.15);
}

.season-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px 12px 0 0;
    transition: transform 0.35s ease;
}

.season-card:hover img {
    transform: scale(1.04);
}

.season-no-poster {
    height: 280px;
    font-size: 48px;
}

.season-info {
    padding: 15px;
}

.season-info h3 {
    color: var(--gold);
    font-size: 16px;
    margin-bottom: 5px;
}

.season-info p {
    font-size: 13px;
    opacity: 0.7;
}

.season-date {
    font-size: 12px;
    opacity: 0.5;
}

.season-header {
    padding: 120px 8% 40px;
    background: linear-gradient(to bottom, rgba(26, 21, 22, 0.9), var(--bg-color));
}

.season-header-content {
    display: flex;
    gap: 30px;
    align-items: center;
}

.season-poster {
    width: 200px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.season-header h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.season-header h2 {
    color: var(--gold);
    font-size: 22px;
    margin-bottom: 10px;
}

.season-header p {
    opacity: 0.7;
    line-height: 1.7;
    max-width: 600px;
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.episode-card {
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    background: rgba(26, 21, 22, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
    padding: 0;
}

.episode-card:hover {
    background: rgba(26, 21, 22, 0.9);
    border-color: rgba(223, 177, 91, 0.3);
    transform: translateX(-5px);
}

.episode-thumb {
    flex-shrink: 0;
    width: 220px;
    height: 130px;
    position: relative;
    overflow: hidden;
}

.episode-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-no-poster {
    width: 220px;
    height: 130px;
    font-size: 36px;
}

.episode-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background: rgba(223, 177, 91, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-color);
    font-size: 18px;
    opacity: 0;
    transition: 0.3s;
}

.episode-card:hover .episode-play-icon {
    opacity: 1;
}

.episode-info {
    padding: 15px 20px 15px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.episode-info h3 {
    font-size: 16px;
    color: var(--gold);
    margin-bottom: 8px;
}

.episode-info p {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 8px;
}

.episode-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    opacity: 0.5;
}

.watch-page {
    background: #000;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior: none;
}

.watch-container {
    padding: 100px 5% 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.watch-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.snai-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(223, 177, 91, 0.2);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.snai-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.player-server-switch {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.player-status {
    margin: 12px 0 0;
    text-align: center;
    font-size: 13px;
    color: rgba(223, 177, 91, 0.85);
    min-height: 20px;
}

.player-status[hidden] {
    display: none;
}

.player-server-btn {
    background: rgba(26, 21, 22, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(243, 239, 240, 0.85);
    padding: 9px 22px;
    border-radius: 24px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease,
        box-shadow 0.25s ease, transform 0.25s ease;
}

.player-server-btn:hover {
    border-color: rgba(223, 177, 91, 0.45);
    color: var(--gold);
    transform: translateY(-1px);
}

.player-server-btn.active {
    border-color: var(--gold);
    background: rgba(223, 177, 91, 0.16);
    color: var(--gold);
    box-shadow: 0 0 18px rgba(223, 177, 91, 0.18);
}

.episode-current-info {
    padding: 20px 0;
}

.episode-current-info h3 {
    color: var(--gold);
    font-size: 20px;
    margin-bottom: 10px;
}

.episode-current-info p {
    opacity: 0.7;
    line-height: 1.8;
}

.episode-nav {
    margin-top: 30px;
}

.episode-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-nav-item {
    text-decoration: none;
    background: rgba(26, 21, 22, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-color);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.episode-nav-item:hover {
    border-color: var(--gold);
    background: rgba(223, 177, 91, 0.1);
}

.episode-nav-item.active {
    border-color: var(--gold);
    background: rgba(223, 177, 91, 0.2);
}

.ep-num {
    font-weight: bold;
    color: var(--gold);
    font-size: 14px;
}

.ep-name {
    font-size: 11px;
    opacity: 0.6;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.error-content {
    animation: fadeIn 1s ease-out;
}

.error-code {
    font-family: 'Cinzel', serif;
    font-size: 120px;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(223, 177, 91, 0.3);
    line-height: 1;
    margin-bottom: 20px;
}

.error-message {
    font-size: 20px;
    opacity: 0.7;
    margin-bottom: 30px;
}

footer,
.site-footer {
    text-align: center;
    padding: 44px 8% 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(to top, rgba(13, 10, 11, 0.95), transparent);
}

.footer-copy {
    margin: 0 0 14px;
    color: rgba(243, 239, 240, 0.45);
    font-size: 14px;
}

.footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-dev-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(223, 177, 91, 0.35);
    background: rgba(223, 177, 91, 0.1);
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: lowercase;
}

.footer-instagram-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.footer-instagram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(26, 21, 22, 0.65);
    color: rgba(243, 239, 240, 0.88);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease,
        transform 0.3s ease, background 0.3s ease;
}

.footer-instagram-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: rgba(243, 239, 240, 0.9);
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-instagram-icon svg {
    width: 100%;
    height: 100%;
}

.footer-instagram-label {
    letter-spacing: 0.2px;
}

.footer-instagram-handle {
    color: var(--gold);
    font-weight: 700;
}

.footer-instagram:hover,
.footer-instagram:focus-visible {
    color: #fff;
    border-color: rgba(230, 92, 0, 0.55);
    background: rgba(230, 92, 0, 0.1);
    box-shadow: 0 0 22px rgba(230, 92, 0, 0.18);
    transform: translateY(-2px);
    outline: none;
}

.footer-instagram:hover .footer-instagram-icon,
.footer-instagram:focus-visible .footer-instagram-icon {
    color: var(--neon-glow);
    transform: scale(1.08);
}

.footer-instagram:hover .footer-instagram-handle,
.footer-instagram:focus-visible .footer-instagram-handle {
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    header,
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo nav"
            "search search";
        gap: 10px 12px;
        padding: 12px 16px;
        padding-top: max(12px, env(safe-area-inset-top));
        background: rgba(13, 10, 11, 0.97);
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }

    .logo {
        grid-area: logo;
        font-size: 18px;
        letter-spacing: 1px;
    }

    .header-search {
        grid-area: search;
        max-width: 100%;
    }

    nav {
        grid-area: nav;
        justify-self: end;
        gap: 8px 12px;
        align-items: center;
    }

    nav a {
        margin-right: 0;
        font-size: 14px;
        white-space: nowrap;
        padding: 6px 4px;
    }

    .search-bar {
        padding: 10px 14px;
        border-radius: 22px;
    }

    .search-input {
        font-size: 14px;
    }

    .search-dropdown {
        max-height: min(55vh, 320px);
        border-radius: 14px;
    }

    .hero-section {
        height: auto;
        min-height: 80vh;
        padding: 240px 16px 40px; /* Increased top padding significantly to clear header + search + news ticker */
        align-items: flex-start; 
        background-position: center top;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 26px;
        line-height: 1.35;
        margin-bottom: 14px;
    }

    .hero-content p {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 20px;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .vintage-badge {
        font-size: 11px;
        padding: 4px 12px;
        margin-bottom: 14px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .hero-buttons .btn-watch,
    .hero-buttons .btn-info {
        margin: 0;
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        box-sizing: border-box;
    }

    .movies-section,
    .search-section,
    .continue-watching-section {
        padding: 24px 12px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
        display: block;
        width: 100%;
        padding-left: 4px;
    }

    .section-title::after {
        width: 40px;
        bottom: -8px;
    }

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

    .movie-card {
        border-radius: 10px;
    }

    .card-inner {
        border-radius: 10px;
    }

    .card-badge {
        top: 8px;
        left: 8px;
        font-size: 11px;
        padding: 4px 8px;
    }

    .card-back {
        opacity: 1;
        pointer-events: none;
        padding: 10px 10px 12px;
        background: linear-gradient(to top,
                rgba(13, 10, 11, 0.95) 0%,
                rgba(13, 10, 11, 0.5) 50%,
                transparent 100%);
    }

    .card-back h3 {
        font-size: 13px;
        margin-bottom: 0;
        -webkit-line-clamp: 2;
    }

    .card-back p,
    .card-back .rating,
    .card-back .btn-play {
        display: none;
    }

    .movie-card:hover .card-inner,
    .movie-card:active .card-inner {
        transform: none;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    }

    .movie-card:hover .card-front img {
        transform: none;
        filter: none;
    }

    .detail-hero {
        min-height: auto;
        padding: 100px 16px 28px;
        align-items: flex-end;
    }

    .detail-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        width: 100%;
    }

    .detail-poster {
        width: min(200px, 52vw);
    }

    .detail-info {
        max-width: 100%;
    }

    .detail-info h1 {
        font-size: 24px;
    }

    .overview {
        font-size: 14px;
        text-align: right;
    }

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

    .detail-actions {
        text-align: center;
        width: 100%;
    }

    .btn-large {
        display: block;
        width: 100%;
        max-width: 100%;
        padding: 14px 24px;
        font-size: 16px;
        box-sizing: border-box;
    }

    .btn-watch-later {
        margin-right: 0;
        margin-top: 12px;
    }

    .cast-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .cast-card img,
    .no-photo {
        width: 72px;
        height: 72px;
    }

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

    .season-card img,
    .season-no-poster {
        height: 200px;
    }

    .season-header {
        padding: 96px 16px 24px;
    }

    .season-header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .season-poster {
        width: 140px;
    }

    .season-header h1 {
        font-size: 24px;
    }

    .season-header h2 {
        font-size: 18px;
    }

    .episode-card {
        flex-direction: column;
    }

    .episode-thumb,
    .ep-no-poster {
        width: 100%;
        height: 168px;
    }

    .episode-info {
        padding: 14px 16px 16px;
        text-align: right;
    }

    .episode-card:hover {
        transform: none;
    }

    .episode-play-icon {
        opacity: 1;
    }

    .watch-page .site-header {
        position: fixed;
    }

    .watch-container {
        padding: 0 0 28px;
        max-width: 100%;
    }

    .player-section {
        padding: 0 16px;
        padding-top: max(92px, calc(env(safe-area-inset-top) + 76px));
    }

    .watch-title {
        font-size: 17px;
        line-height: 1.45;
        margin-bottom: 12px;
        padding: 0 2px;
    }

    .snai-player-wrapper {
        border-radius: 10px;
        margin: 0 -16px;
        width: calc(100% + 32px);
        max-width: none;
    }

    .player-server-switch {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
    }

    .player-server-btn {
        min-height: 42px;
        flex: 1 1 calc(33% - 8px);
        padding: 10px 6px;
        font-size: 13px;
        border-radius: 8px;
    }

    .episode-nav {
        margin-top: 20px;
    }

    .episode-nav-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        gap: 8px;
        padding-bottom: 6px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .episode-nav-item {
        flex: 0 0 auto;
        scroll-snap-align: start;
        min-width: 76px;
        min-height: 44px;
        padding: 10px 14px;
    }

    .ep-name {
        max-width: 100px;
    }

    .snai-section-label {
        font-size: 19px;
    }

    .snai-section-title {
        padding-bottom: 12px;
    }

    .snai-section-lead {
        font-size: 12px;
    }

    .continue-watching-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        margin: 0 -16px;
        padding: 0 16px 8px;
        scroll-snap-type: x proximity;
    }

    .continue-card {
        flex: 0 0 min(150px, 42vw);
        scroll-snap-align: start;
    }

    .continue-remove {
        opacity: 1;
    }

    footer,
    .site-footer {
        padding: 32px 16px;
        padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 20px));
    }

    .footer-instagram-row {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }

    .footer-instagram {
        width: 100%;
        justify-content: center;
    }

    .error-code {
        font-size: 72px;
    }
}

@media (max-width: 380px) {
    .logo {
        font-size: 16px;
    }

    nav a {
        font-size: 12px;
    }

    .hero-content h1 {
        font-size: 22px;
    }

    .movies-grid {
        gap: 10px;
    }

    .cast-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-server-switch {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .watch-container {
        padding: 100px 5% 40px;
    }

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

    .player-server-btn {
        min-height: 44px;
        padding: 11px 24px;
    }
}



.continue-watching-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
}

.continue-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(223, 177, 91, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.continue-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.continue-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.continue-poster {
    aspect-ratio: 2 / 3;
    background: #120e0f;
    overflow: hidden;
}

.continue-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.continue-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.continue-progress-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-glow), var(--gold));
    transition: width 0.3s ease;
}

.continue-card-body {
    padding: 12px 14px 14px;
}

.continue-card-body h3 {
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.continue-card-sub {
    font-size: 12px;
    opacity: 0.65;
    margin: 0 0 6px;
}

.continue-percent {
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
}

.continue-remove {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .continue-remove,
.movie-card:hover .watch-later-remove,
.continue-remove:focus {
    opacity: 1;
}

/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.active {
    display: flex;
    opacity: 1;
}

.auth-modal-content {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid rgba(223, 177, 91, 0.2);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 20px rgba(223, 177, 91, 0.1);
    transform: translateY(20px);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalSlideIn {
    to { transform: translateY(0); }
}

.auth-close {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

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

.auth-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    margin-bottom: 10px;
}

.auth-header h2 span {
    color: var(--gold);
}

.auth-header p {
    color: #888;
    font-size: 14px;
}

.auth-form .input-group {
    margin-bottom: 20px;
    text-align: right;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 14px;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    transition: all 0.3s ease;
    text-align: left;
    direction: ltr;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-auth:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(223, 177, 91, 0.3);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-switch span {
    color: #888;
}

.auth-switch a {
    color: var(--gold);
    text-decoration: none;
    margin-right: 5px;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: #fff;
}

.auth-message {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    min-height: 20px;
}

.auth-message.error {
    color: #ff4d4d;
}

.auth-message.success {
    color: #4CAF50;
}

.btn-login {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-right: 15px;
}

.btn-login:hover {
    background: var(--gold);
    color: #000;
}

@media (max-width: 768px) {
    .btn-login {
        padding: 6px 15px;
        font-size: 13px;
        margin-right: 10px;
    }
}

/* ── User Dropdown ───────────────────────────────────────────── */
.user-dropdown {
    display: none;
    position: absolute;
    z-index: 10000;
    min-width: 260px;
    background: linear-gradient(145deg, #1c1c1c, #111);
    border: 1px solid rgba(223,177,91,0.25);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(223,177,91,0.08);
    padding: 16px;
    animation: dropdownFadeIn 0.25s ease;
}

.user-dropdown.active { display: block; }

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.user-dropdown-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gold);
    color: #000;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-dropdown-name {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}

.user-dropdown-email {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    word-break: break-all;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 12px 0;
}

.change-name-section label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
    text-align: right;
}

.change-name-row {
    display: flex;
    gap: 8px;
}

.change-name-row input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    text-align: right;
    transition: border-color 0.2s;
}

.change-name-row input:focus {
    outline: none;
    border-color: var(--gold);
}

.btn-save-name {
    padding: 8px 16px;
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-save-name:hover { background: #fff; }
.btn-save-name:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 70, 70, 0.08);
    color: #ff6b6b;
    border: 1px solid rgba(255,70,70,0.2);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 70, 70, 0.2);
    border-color: rgba(255,70,70,0.5);
}
