/* ───────────────────────────────────────────────
   Root Color Palette
──────────────────────────────────────────────── */
:root {
    /* Accent & Branding */
    --accent: #f5c518;
    --accent-dark: #e0b800;

    /* Backgrounds */
    --bg-black: #000;
    --bg-dark: #121212;
    --bg-medium: #1a1a1a;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;

    /* Text */
    --text-light: #ffffff;
    --text-dark: #000000;
    --text-muted: #888888;
    --text-gray: #bbb;

    /* Borders & UI */
    --border: #dee2e6;
    --hover-dark: #2c2c2c;
}

/* ───────────────────────────────────────────────
   Base and Typography
──────────────────────────────────────────────── */
body {
    background-color: var(--bg-black);
    color: var(--text-light);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.text-accent {
    color: var(--accent);
}

.section-heading {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main, .container {
    flex-grow: 1;
}

/* ───────────────────────────────────────────────
   Navbar and Search
──────────────────────────────────────────────── */
.navbar {
    background-color: var(--bg-dark);
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.search-header {
    background-color: var(--bg-dark);
    border-bottom: 1px solid #222;
}

.search-header .logo img {
    max-height: 48px;
    width: auto;
}

.search-input {
    background-color: var(--bg-white);
    border: 1px solid #ccc;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}

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

.btn-accent {
    background-color: var(--accent);
    color: var(--text-dark);
    border: none;
}

.btn-accent:hover {
    background-color: var(--accent-dark);
}

/* ───────────────────────────────────────────────
   Responsive Logo
──────────────────────────────────────────────── */
.logo img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .logo img {
        max-width: 150px;
    }

    .search-header .container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-header .logo {
        text-align: center;
    }
}

/* ───────────────────────────────────────────────
   Hero Slider (Swiper)
──────────────────────────────────────────────── */
.heroSwiper-container {
    width: 100%;
    max-width: 849px;
    height: 500px;
    position: relative;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
}

.heroSwiper {
    height: 100%;
    position: relative;
}

.hero-slide {
    position: relative;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.1) 60%);
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 3rem 2rem;
}

.hero-overlay .container {
    z-index: 2;
    position: relative;
}

/* ───────────────────────────────────────────────
   Swiper Arrows – IMDb Style
──────────────────────────────────────────────── */
.swiper-button-next,
.swiper-button-prev {
    font-size: 1.5rem;
    line-height: 1;
    opacity: 1 !important;
    pointer-events: all !important;
    z-index: 10;
    top: 50%;
    padding: 0.75rem 1rem;
    background: rgba(18, 18, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 0.375rem;
    color: var(--text-light);
    transition: all 0.25s ease-out;
    position: absolute;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    cursor: pointer;
}

.swiper-button-prev {
    left: 0.5rem;
}

.swiper-button-next {
    right: 0.5rem;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: rgba(18, 18, 18, 0.9);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.5rem;
    font-weight: bold;
    color: inherit;
}

/* ───────────────────────────────────────────────
   Up Next Sidebar
──────────────────────────────────────────────── */
.up-next {
    height: 500px;
    overflow-y: auto;
    background: linear-gradient(
            0deg,
            transparent 0%,
            transparent 50%,
            rgba(18, 18, 18, 0.7) 78%,
            rgba(18, 18, 18, 1) 100%
    );
    border-radius: 1rem;
}

/* ───────────────────────────────────────────────
   Responsive Layout Adjustments
──────────────────────────────────────────────── */
@media (max-width: 992px) {
    .heroSwiper-container {
        max-width: 100%;
    }

    .up-next {
        width: 100%;
        height: auto;
    }
}

/* ───────────────────────────────────────────────
   Table and Row Hover
──────────────────────────────────────────────── */
.table th,
.table td {
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: var(--hover-dark);
    transition: background-color 0.2s ease;
}

.schedule-show-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.table tbody tr:hover .schedule-show-link {
    text-decoration: underline;
}

/* ───────────────────────────────────────────────
   Tabs Styling
──────────────────────────────────────────────── */
.nav-tabs {
    border-bottom: none;
    margin-bottom: -1px;
}

.nav-tabs .nav-link {
    background-color: var(--bg-light);
    color: #555;
    font-weight: 500;
    border: 1px solid var(--border);
    border-bottom: none;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    margin-right: 0.25rem;
    padding: 0.75rem 1.25rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-tabs .nav-link.active {
    background-color: var(--bg-white);
    color: var(--text-dark);
    border-color: var(--border) var(--border) var(--bg-white);
    font-weight: 600;
}

.nav-tabs .nav-link:hover {
    background-color: #f5f5f5;
    color: var(--accent);
}

.tab-content {
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

/* ───────────────────────────────────────────────
   Card Poster Ratio (Search & Cast)
──────────────────────────────────────────────── */
.card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
    background-color: var(--bg-black);
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: contain;
}

/* ───────────────────────────────────────────────
   Card Styling (Dark Theme)
──────────────────────────────────────────────── */
.card.show-card {
    background-color: var(--bg-medium);
    color: var(--text-light);
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body .btn {
    margin-top: auto;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-text {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.badge {
    font-size: 0.75rem;
}