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

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --accent: #e50914;
    --accent-hover: #f40612;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --border: #2a2a2a;
    --card-hover: #252525;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

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

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    padding: 0;
    transition: background 0.3s;
}

.navbar.scrolled {
    background: rgba(15,15,15,0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo-cine { color: #ffffff; }
.logo-flex { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-search {
    margin-left: auto;
    display: flex;
}

.nav-search form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    overflow: hidden;
    padding: 6px 15px;
}

.nav-search input {
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
    width: 200px;
}

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

.nav-search button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 5px;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 20px;
    margin-left: auto;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 15px 20px;
    background: rgba(15,15,15,0.98);
    gap: 15px;
}

.mobile-menu.active { display: flex; }

.mobile-menu a {
    color: var(--text-secondary);
    font-size: 16px;
}

.mobile-menu form {
    display: flex;
    gap: 10px;
}

.mobile-menu input {
    flex: 1;
    padding: 8px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: white;
    outline: none;
}

.mobile-menu button {
    padding: 8px 15px;
    background: var(--accent);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

/* HERO */
.hero {
    position: relative;
    height: 85vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: brightness(0.5);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0f0f0f 0%, transparent 50%, transparent 80%, rgba(0,0,0,0.4) 100%),
                linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 60%);
}

.hero-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 15px;
    max-width: 600px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.hero-rating {
    color: #f5c518;
    font-weight: 700;
    font-size: 16px;
}

.hero-year, .hero-quality {
    color: var(--text-secondary);
    font-size: 14px;
}

.hero-quality {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: white;
    padding: 14px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.btn-play:hover {
    background: var(--accent-hover);
    transform: scale(1.03);
}

.btn-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 14px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: background 0.2s;
}

.btn-info:hover { background: rgba(255,255,255,0.25); }

/* SECTIONS */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.section-title {
    font-size: 22px;
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.section-link:hover { color: var(--accent-hover); }

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    z-index: 10;
}

.card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

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

.card-play {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin: 0 auto 10px;
}

.card-info {
    padding: 10px;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.card-year {
    font-size: 11px;
    color: var(--text-muted);
}

.card-rating {
    font-size: 11px;
    color: #f5c518;
    font-weight: 600;
}

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
}

/* MOVIE PAGE */
.movie-hero {
    position: relative;
    padding-top: 80px;
    min-height: 500px;
}

.movie-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3);
}

.movie-backdrop-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0f0f0f 20%, transparent 80%);
}

.movie-details {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.movie-poster-wrap img {
    width: 220px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.movie-info { flex: 1; }

.movie-title {
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 10px;
}

.movie-meta-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    align-items: center;
}

.tag {
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.15);
}

.tag-red { background: var(--accent); border-color: var(--accent); }

.rating-badge {
    color: #f5c518;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.movie-overview {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 25px;
    max-width: 700px;
}

/* PLAYER */
.player-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.server-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.server-tab {
    padding: 8px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.server-tab.active,
.server-tab:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

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

/* SEARCH */
.search-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.search-bar-big {
    display: flex;
    margin-bottom: 40px;
    gap: 10px;
}

.search-bar-big input {
    flex: 1;
    padding: 15px 25px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 18px;
    outline: none;
}

.search-bar-big button {
    padding: 15px 30px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* FOOTER */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: flex;
    gap: 60px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 15px;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 100px;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 5px;
}

.disclaimer {
    font-size: 11px;
    color: #444;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links, .nav-search { display: none; }
    .hamburger { display: block; }
    .hero { height: 70vh; }
    .hero-content { padding: 0 20px; }
    .movie-details { flex-direction: column; }
    .movie-poster-wrap img { width: 150px; }
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .footer-top { flex-direction: column; gap: 30px; }
}

/* LOADING */
.loading {
    display: flex;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 30px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* GENRE TAGS */
.genre-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.genre-tag {
    padding: 6px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.genre-tag:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
