/* ═══════════════════════════════════════════════════
   PHANTOM MOVIES - MAIN STYLESHEET
   ═══════════════════════════════════════════════════ */

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

/* ─── CSS VARIABLES ─── */
:root {
    --black: #050810;
    --dark: #0b0f1a;
    --card-bg: #0e1422;
    --panel: #0a0f1c;
    --blue: #5bc4f5;
    --blue-dim: #2a7aaa;
    --blue-glow: rgba(91, 196, 245, 0.15);
    --text: #e8f0f8;
    --muted: #7a8fa8;
    --border: rgba(91, 196, 245, 0.12);
    --red: #ff4757;
    --green: #2dce89;
    --yellow: #ffd700;
}

/* ─── BASE ─── */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--black);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

/* ─── LOADING SCREEN ─── */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.6s;
}

.loading-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 40px;
    letter-spacing: 4px;
}

.loading-logo span {
    color: var(--blue);
}

.loading-bar {
    width: 200px;
    height: 2px;
    background: rgba(91, 196, 245, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.loading-fill {
    height: 100%;
    background: var(--blue);
    animation: loadBar 1.5s ease forwards;
}

@keyframes loadBar {
    from { width: 0; }
    to { width: 100%; }
}

/* ─── TOAST NOTIFICATIONS ─── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0d1526;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 13px;
    color: var(--text);
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s;
    max-width: 280px;
    pointer-events: none;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--green);
    color: var(--green);
}

.toast.error {
    border-color: var(--red);
    color: var(--red);
}

/* ─── NAVIGATION ─── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 68px;
    background: rgba(5, 8, 16, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    letter-spacing: 3px;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: var(--blue);
    clip-path: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%, 20% 50%);
    flex-shrink: 0;
}

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

.nav-links {
    display: flex;
    gap: 26px;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-links a:hover {
    color: var(--blue);
}

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

/* ─── SEARCH ─── */
.search-wrap {
    position: relative;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px 8px 34px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    outline: none;
    width: 190px;
    transition: all 0.3s;
}

.search-input:focus {
    width: 250px;
    border-color: rgba(91, 196, 245, 0.4);
}

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

.search-icon-s {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    font-size: 12px;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #0d1526;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: none;
    z-index: 200;
    max-height: 300px;
    overflow-y: auto;
}

.search-results.show {
    display: block;
}

.search-item {
    padding: 9px 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-item:hover {
    background: rgba(91, 196, 245, 0.08);
}

/* ─── HERO SECTION ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 0 5% 80px;
    overflow: hidden;
    padding-top: 68px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 70% 40%, rgba(91, 196, 245, 0.08) 0%, transparent 60%),
                linear-gradient(to bottom, var(--black) 0%, var(--dark) 50%, var(--black) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blue-glow);
    border: 1px solid rgba(91, 196, 245, 0.25);
    color: var(--blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 22px;
}

h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(52px, 8vw, 96px);
    line-height: 0.92;
    letter-spacing: 2px;
    color: var(--text);
    margin-bottom: 18px;
}

h1 em {
    font-style: italic;
    font-family: 'Playfair Display', serif;
    color: var(--blue);
    font-size: 0.75em;
    display: block;
    letter-spacing: 4px;
}

.hero-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 460px;
    margin-bottom: 32px;
}

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

.hero-stats {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    padding-top: 28px;
}

.stat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 34px;
    line-height: 1;
    color: var(--blue);
}

.stat-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ─── BUTTONS ─── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--blue);
    color: var(--black);
    border: none;
    padding: 13px 26px;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}

.btn-primary:hover {
    background: #87d9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(91, 196, 245, 0.3);
}

.play-ico {
    width: 16px;
    height: 16px;
    background: var(--black);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    display: inline-block;
}

/* ─── SECTIONS ─── */
section {
    padding: 72px 5%;
}

.sec-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
}

.sec-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    letter-spacing: 2px;
    color: var(--text);
}

.sec-title span {
    color: var(--blue);
}

/* ─── FEATURED MOVIE ─── */
.featured {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    min-height: 320px;
    margin: 72px 5% 0;
}

.feat-poster {
    background: linear-gradient(135deg, #0d1825, #071220);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feat-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.feat-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feat-tag {
    display: inline-flex;
    background: var(--blue-glow);
    border: 1px solid rgba(91, 196, 245, 0.2);
    color: var(--blue);
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 10px;
    margin-bottom: 16px;
    width: fit-content;
}

.feat-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 44px;
    letter-spacing: 2px;
    line-height: 0.95;
    margin-bottom: 12px;
}

.feat-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 20px;
    max-width: 380px;
}

.feat-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ─── GENRE PILLS ─── */
.genre-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.genre-pill {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.genre-pill:hover,
.genre-pill.active {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-glow);
}

/* ─── MOVIE GRID ─── */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 18px;
}

.movie-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    border-color: rgba(91, 196, 245, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 28px rgba(91, 196, 245, 0.1);
}

.movie-poster {
    aspect-ratio: 2/3;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #071525, #0d2035);
}

.poster-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-ph img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--blue);
    color: var(--black);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 3px;
    z-index: 2;
    letter-spacing: 1px;
}

.movie-info {
    padding: 11px;
}

.movie-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── FOOTER ─── */
footer {
    border-top: 1px solid var(--border);
    padding: 52px 5% 32px;
}

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

.footer-brand p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 240px;
    margin-top: 12px;
}

.footer-col h4 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

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

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

.footer-col ul a {
    color: #8899b0;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 22px;
}

.footer-copy {
    font-size: 11px;
    color: var(--muted);
}

.footer-copy span {
    color: var(--blue);
}

/* ─── UTILITY ─── */
.empty-state {
    text-align: center;
    padding: 44px 20px;
    color: var(--muted);
    grid-column: 1/-1;
    font-size: 14px;
}

.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .featured {
        grid-template-columns: 1fr;
    }
    
    .feat-poster {
        min-height: 200px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .search-input {
        width: 150px;
    }
    
    .search-input:focus {
        width: 200px;
    }
}
