/* ========================================
   MovieStream — Dark Cinema Theme
   ======================================== */

:root {
    --bg-primary:   #0a0a12;
    --bg-secondary: #12121e;
    --bg-card:      #16162a;
    --bg-hover:     #1e1e38;
    --bg-input:     #1a1a30;
    --text-primary: #eaeaf0;
    --text-secondary: #9090a8;
    --text-muted:   #606078;
    --accent:       #e53e3e;
    --accent-hover: #f05252;
    --accent-glow:  rgba(229, 62, 62, 0.25);
    --gold:         #f6c358;
    --green:        #48bb78;
    --border:       #252540;
    --radius:       10px;
    --radius-sm:    6px;
    --radius-lg:    16px;
    --shadow:       0 4px 24px rgba(0,0,0,0.4);
    --font-display: 'Space Grotesk', sans-serif;
    --font-body:    'IBM Plex Sans Thai', 'Space Grotesk', sans-serif;
    --transition:   0.2s ease;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

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

/* ========== Navbar ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 18, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 0;
}
.nav-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 60px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}
.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    flex-shrink: 0;
}
.search-form input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 16px;
    width: 200px;
    font-size: 0.9rem;
    outline: none;
    font-family: var(--font-body);
}
.search-form input::placeholder { color: var(--text-muted); }
.search-form button {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 14px;
    cursor: pointer;
    transition: var(--transition);
}
.search-form button:hover { color: var(--accent); }
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

/* ========== Hero ========== */
.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(10,10,18,0.6) 50%, rgba(10,10,18,0.3) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 60px;
}
.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
    margin-bottom: 12px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    max-width: 700px;
}
.hero p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 16px;
    line-height: 1.7;
}
.hero-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}
.hero-rating {
    color: var(--gold);
    font-weight: 600;
}
.hero-year { color: var(--text-secondary); }
.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.hero-dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-play {
    background: var(--accent);
    color: #fff;
}
.btn-play:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ========== Sections ========== */
.section {
    padding: 40px 0;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
}
.see-all {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.see-all:hover { color: var(--accent-hover); }

/* ========== Card Grid ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}
.card-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.card-scroll .card {
    flex: 0 0 170px;
    scroll-snap-align: start;
}
.card {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}
.card-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg-secondary);
}
.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card-poster img {
    transform: scale(1.06);
}
.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge-movie { background: var(--accent); color: #fff; }
.badge-tv { background: #6366f1; color: #fff; }
.card-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity var(--transition);
}
.card:hover .card-play { opacity: 1; }
.card-info {
    padding: 10px 12px;
}
.card-info h3 {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-year {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ========== Watch Page ========== */
.watch-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 500px;
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.15;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}
.watch-page {
    padding-top: 24px;
    padding-bottom: 60px;
}
.player-section {
    margin-bottom: 24px;
}
.player-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.player-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* Watch Info */
.watch-info {
    margin-bottom: 32px;
}
.watch-info-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 28px;
    align-items: flex-start;
}
.watch-poster img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.watch-details h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.watch-tagline {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 16px;
}
.watch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.meta-item {
    background: var(--bg-card);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.meta-item.rating { color: var(--gold); border-color: rgba(246,195,88,0.3); }
.type-badge {
    background: var(--accent) !important;
    color: #fff !important;
    border: none !important;
}
.watch-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.genre-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    background: var(--bg-hover);
    color: var(--text-secondary);
    transition: var(--transition);
}
.genre-tag:hover {
    background: var(--accent);
    color: #fff;
}
.watch-overview h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.watch-overview p {
    color: var(--text-primary);
    line-height: 1.8;
}

/* ========== Episodes ========== */
.episodes-section {
    margin-bottom: 40px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.episodes-section h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 16px;
}
.season-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.season-tab {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.season-tab:hover { border-color: var(--text-muted); }
.season-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.episode-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
    align-items: center;
}
.episode-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}
.episode-card.current {
    border-color: var(--accent);
    background: rgba(229, 62, 62, 0.08);
}
.ep-thumb {
    flex: 0 0 80px;
    height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-primary);
    position: relative;
}
.ep-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ep-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}
.ep-playing {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 62, 62, 0.7);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
}
.ep-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ep-number {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.ep-name {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== Cast ========== */
.cast-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.cast-card {
    flex: 0 0 100px;
    text-align: center;
}
.cast-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    border: 2px solid var(--border);
}
.cast-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
}
.cast-char {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ========== Browse / Genre Pages ========== */
.page-content {
    padding: 32px 20px 60px;
}
.page-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.page-title small {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}
.browse-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.browse-tab {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.browse-tab:hover { color: var(--text-primary); border-color: var(--text-muted); }
.browse-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.type-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.type-switch a {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: var(--transition);
}
.type-switch a.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Genre Grid */
.genre-section-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 24px 0 12px;
}
.genre-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.genre-card {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.92rem;
    transition: var(--transition);
}
.genre-card:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ========== Search ========== */
.search-big {
    max-width: 600px;
    margin: 40px auto;
}
.search-big form {
    display: flex;
    gap: 12px;
}
.search-big input {
    flex: 1;
    padding: 14px 24px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
}
.search-big input:focus { border-color: var(--accent); }
.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    font-size: 1.1rem;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.page-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== Footer ========== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 40px;
}
.footer-inner {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.footer-brand {
    flex: 1;
    min-width: 200px;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
}
.footer-links {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--text-primary); }
.footer-note {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.footer-note a {
    color: var(--accent);
}
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 8px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 12px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.show { display: flex; }
    .mobile-menu-btn { display: block; }
    .search-form input { width: 140px; }

    .hero { height: 400px; }
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 0.88rem; }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    .card-scroll .card { flex: 0 0 140px; }

    .watch-info-grid {
        grid-template-columns: 1fr;
    }
    .watch-poster {
        display: none;
    }
    .watch-details h1 { font-size: 1.5rem; }

    .episode-grid {
        grid-template-columns: 1fr;
    }

    .page-title { font-size: 1.4rem; }
    .footer-inner { flex-direction: column; gap: 20px; }
}

/* ========== AV Specific ========== */
.badge-av { background: #d946ef; color: #fff; }
.av-badge { background: #d946ef !important; color: #fff !important; border: none !important; }
.av-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1e38, #2a1a3e);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.av-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.av-search-bar input {
    flex: 1;
    padding: 10px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: var(--font-body);
    outline: none;
}
.av-search-bar input:focus { border-color: #d946ef; }
.av-quick-play {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}
.av-quick-play input {
    flex: 1;
    padding: 10px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: var(--font-body);
    outline: none;
}
.av-quick-play input:focus { border-color: #d946ef; }
.av-tags-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.active-tag {
    background: #d946ef !important;
    color: #fff !important;
}
.av-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.av-empty a { color: var(--accent); }
.av-hero-box {
    background: linear-gradient(135deg, #1e1e38, #2a1a3e);
    border: 1px solid rgba(217, 70, 239, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
}
.av-hero-box p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-size: 0.92rem;
}
.av-hero-box .av-quick-play {
    max-width: 500px;
    margin: 0 auto;
}
.av-details h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

/* ========== Admin ========== */
.admin-login {
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
}
.admin-login form {
    display: flex;
    gap: 10px;
}
.admin-login input {
    flex: 1;
    padding: 12px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
}
.admin-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.admin-panel h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 16px;
}
.admin-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 12px; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 0.82rem; color: var(--text-secondary); }
.form-group input, .admin-form textarea {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}
.form-group input:focus, .admin-form textarea:focus { border-color: var(--accent); }
.admin-form textarea { resize: vertical; }
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }
.form-hint code { background: var(--bg-card); padding: 2px 6px; border-radius: 4px; }
.msg { padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.msg-ok { background: rgba(72, 187, 120, 0.15); color: var(--green); border: 1px solid rgba(72, 187, 120, 0.3); }
.msg-error { background: rgba(229, 62, 62, 0.15); color: var(--accent); border: 1px solid rgba(229, 62, 62, 0.3); }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.admin-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
}
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(37,37,64,0.5);
}

/* Admin Search Results */
.search-results-admin {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.sr-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.sr-info {
    flex: 1;
    min-width: 0;
}
.sr-info strong {
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sr-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.sr-meta code {
    background: var(--bg-primary);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
}
.sr-add-form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.sr-cat-input {
    width: 80px;
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
}

@media (max-width: 768px) {
    .form-row { flex-direction: column; }
    .av-search-bar, .av-quick-play { flex-direction: column; }
}

@media (max-width: 480px) {
    .search-form { display: none; }
    .hero { height: 340px; }
    .hero-content { padding-bottom: 40px; }
    .hero h1 { font-size: 1.3rem; }
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .card-scroll .card { flex: 0 0 120px; }
    .card-info { padding: 8px; }
    .card-info h3 { font-size: 0.8rem; }
}
