:root {
    --bg-dark: #0a0d14;
    --bg-card: #121722;
    --bg-surface: #182030;
    --text-main: #f0f3f8;
    --text-muted: #8c9bb0;
    --accent: #e50914;
    --accent-hover: #b80710;
    --badge-blue: #0077ff;
    --badge-green: #00c853;
    --badge-gold: #ffab00;
    --badge-purple: #9c27b0;
    --border-color: #232b3e;
    --radius: 8px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

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

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

/* Header */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 20px;
}

.site-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-logo span {
    color: var(--accent);
}

/* Instant Search Bar */
.search-wrapper {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 10px 18px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    max-height: 420px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

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

.search-item:hover {
    background: var(--bg-surface);
}

.search-item img {
    width: 42px;
    height: 58px;
    object-fit: cover;
    border-radius: 4px;
}

.search-item-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
    color: #fff;
}

.search-item-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Nav Menu */
.main-nav {
    display: flex;
    gap: 16px;
    list-style: none;
}

.main-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 4px;
}

.main-nav a:hover, .main-nav .current-menu-item a {
    color: #fff;
    background: var(--bg-surface);
}

/* Main Content Grid */
.main-section {
    padding: 24px 0;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
}

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

.movie-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: #3b4760;
}

.poster-box {
    position: relative;
    padding-top: 145%;
    overflow: hidden;
    background: #151b26;
}

.poster-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.badge-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.badge-res { background: var(--badge-blue); }
.badge-audio { background: var(--badge-green); }
.badge-imdb { background: var(--badge-gold); color: #000; font-weight: 800; }

.movie-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.pagination .page-numbers {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.pagination .page-numbers.current, .pagination .page-numbers:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Single Movie Page */
.single-movie {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin: 24px 0;
}

.movie-header-block {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.movie-header-block h1 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
}

.movie-top-meta {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.movie-details-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    margin-bottom: 30px;
}

.movie-poster-large img {
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    width: 100%;
}

.movie-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.movie-specs-table tr {
    border-bottom: 1px solid var(--border-color);
}

.movie-specs-table th {
    text-align: left;
    padding: 10px 0;
    color: var(--text-muted);
    font-size: 13px;
    width: 140px;
}

.movie-specs-table td {
    padding: 10px 0;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.synopsis-box {
    margin: 24px 0;
    background: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
    border-left: 3px solid var(--accent);
}

/* Screenshots Gallery */
.screenshots-section {
    margin: 32px 0;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.screenshots-grid img {
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    width: 100%;
    transition: transform 0.2s;
}

.screenshots-grid img:hover {
    transform: scale(1.02);
}

/* Download Section & Resolution Boxes */
.download-section {
    margin: 36px 0 16px;
}

.download-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.download-box:hover {
    border-color: #3f4e6d;
}

.download-box-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-box-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s;
}

.download-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.btn-480p { background: #0077ff; }
.btn-480p:hover { background: #005fcc; }

.btn-720p { background: #00c853; }
.btn-720p:hover { background: #00a844; }

.btn-1080p { background: #e50914; }
.btn-1080p:hover { background: #b80710; }

.btn-4k { background: #9c27b0; }
.btn-4k:hover { background: #7b1fa2; }

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 48px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 12px 0;
    }
    .search-wrapper {
        width: 100%;
        max-width: 100%;
    }
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .movie-details-grid {
        grid-template-columns: 1fr;
    }
    .movie-poster-large {
        max-width: 240px;
        margin: 0 auto;
    }
    .download-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .download-btn {
        width: 100%;
        justify-content: center;
    }
}
