/* ================================================
   🎬 Movie Premiere App - Custom Styles
   Author: jvisualschool
   Version: 2.2.0 - Dark/Light Mode Support
   ================================================ */

/* ============= CSS Variables (Theme) ============= */
:root {
    /* Dark Mode (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.1);
    --header-bg: rgba(10, 10, 15, 0.95);
    --filter-panel-bg: rgba(26, 26, 46, 0.95);
    --modal-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --footer-bg: #111827;
    --input-bg: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --hero-overlay-start: rgba(10, 10, 15, 0.75);
    --hero-overlay-mid: rgba(10, 10, 15, 0.5);
}

[data-theme="light"] {
    /* Light Mode */
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-card-hover: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(248, 250, 252, 0.95);
    --filter-panel-bg: rgba(226, 232, 240, 0.95);
    --modal-bg: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    --footer-bg: #f1f5f9;
    --input-bg: rgba(0, 0, 0, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hero-overlay-start: rgba(248, 250, 252, 0.75);
    --hero-overlay-mid: rgba(248, 250, 252, 0.5);
}

/* ============= Base Styles ============= */
* {
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    color: #ffffff;
}

body.light-mode {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
    color: #1e293b;
}

/* ============= Typography ============= */
.font-display {
    font-family: 'Playfair Display', serif;
}

.hero-title {
    color: var(--text-primary);
    text-shadow: 0 1px 2px var(--shadow-color);
}

[data-theme="dark"] .hero-title {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .hero-title {
    color: #1e293b;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* ============= Theme Toggle Button ============= */
.theme-toggle-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    transform: rotate(15deg);
}

.theme-toggle-btn i {
    font-size: 1rem;
}

/* ============= Header ============= */
.header-gradient {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
}

/* ============= Section Title ============= */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

/* ============= Stat Cards ============= */
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

/* ============= Global Stats Banner ============= */
.global-stats-banner {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    display: inline-block;
}

.global-stats-banner p {
    color: var(--text-primary);
    font-weight: 500;
}

.stat-card span:last-child {
    color: var(--text-secondary);
}

#period-description {
    color: var(--text-secondary);
    font-weight: 500;
    text-shadow: 0 1px 1px var(--bg-primary);
}

[data-theme="light"] .global-stats-banner {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] #movie-search-input {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

[data-theme="light"] #movie-search-input::placeholder {
    color: #94a3b8;
}

[data-theme="light"] #search-btn {
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .hero-title {
    color: #0f172a;
    text-shadow: none;
}

[data-theme="light"] .hero-title .font-light {
    color: #334155;
}

[data-theme="light"] .global-stats-banner p {
    color: #0f172a;
    font-weight: 600;
}

[data-theme="light"] #period-description {
    color: #1e293b;
    font-weight: 600;
}

/* ============= Filter Panel ============= */
.filter-panel {
    background: var(--filter-panel-bg);
    backdrop-filter: blur(20px);
    border-color: var(--border-color);
}

/* ============= Period Filter Buttons ============= */
.period-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 9999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.period-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.period-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
    color: white;
    font-weight: 500;
}

/* ============= Date Input ============= */
.date-input {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.apply-date-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-date-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(236, 72, 153, 0.3);
}

/* ============= Genre Filter Buttons ============= */
.genre-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 9999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.genre-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.genre-btn.active {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    border-color: transparent;
    color: white;
    font-weight: 500;
}

/* ============= Featured Card ============= */
.featured-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.featured-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .featured-inner {
        grid-template-columns: 350px 1fr;
    }
}

.featured-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.featured-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 1rem;
}

.featured-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.featured-original-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.genre-tag {
    padding: 0.375rem 0.875rem;
    background: var(--bg-card-hover);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.featured-overview {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    border-radius: 9999px;
    font-weight: 600;
    width: fit-content;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    color: white;
}

.featured-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.3);
}

/* ============= Movie Cards ============= */
.movie-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-10px);
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: 0 20px 40px var(--shadow-color),
        0 0 60px rgba(236, 72, 153, 0.1);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.movie-poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.movie-rating {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.movie-rating i {
    color: #fbbf24;
}

.movie-country {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 500;
}

.movie-country.korean {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.movie-country.foreign {
    background: linear-gradient(135deg, #10b981, #14b8a6);
}

.movie-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
}

.movie-card:hover .movie-play-btn {
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    padding: 1rem;
    background: var(--bg-card);
}

.movie-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.movie-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.movie-date i {
    color: #f59e0b;
}

/* ============= D-Day Badge ============= */
.dday-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #ef4444, #f97316);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

.dday-badge.today {
    background: linear-gradient(135deg, #10b981, #14b8a6);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ============= Modal ============= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: modal-bg-fade 0.3s ease-out;
}

@keyframes modal-bg-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--modal-bg);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px var(--shadow-color);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-header {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(26, 26, 46, 0.5) 50%,
            #1a1a2e 100%);
}

.modal-poster {
    position: absolute;
    bottom: -50px;
    left: 2rem;
    width: 150px;
    aspect-ratio: 2/3;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.modal-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 4rem 2rem 2rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.modal-original-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-meta-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.modal-overview {
    margin-bottom: 2rem;
}

.modal-overview h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #f59e0b;
}

.modal-overview p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.3);
}

.modal-btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal-btn-secondary:hover {
    background: var(--bg-card-hover);
}

/* ============= Loading Animation ============= */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: #ec4899;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============= Empty State ============= */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ============= Scrollbar ============= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-card);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f59e0b, #ec4899);
    border-radius: 4px;
}

/* ============= Footer ============= */
.footer-section {
    background: var(--footer-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ============= Trailer Section ============= */
.trailer-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.trailer-container {
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-card);
}

.trailer-player {
    position: relative;
    width: 100%;
}

.trailer-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
    overflow: hidden;
}

.trailer-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.trailer-thumbnail:hover img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.trailer-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.8) 100%);
    transition: background 0.3s ease;
}

.trailer-thumbnail:hover .trailer-play-overlay {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.9) 100%);
}

.trailer-play-btn {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 10px 40px rgba(255, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.trailer-thumbnail:hover .trailer-play-btn {
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(255, 0, 0, 0.6);
}

.trailer-play-btn i {
    margin-left: 4px;
    /* 재생 아이콘 시각적 중앙 보정 */
}

.trailer-name {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Trailer iframe wrapper */
.trailer-iframe-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}

.trailer-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 1;
}

/* Trailer controls bar */
.trailer-controls {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.trailer-youtube-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 0, 0, 0.9);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trailer-youtube-btn:hover {
    background: #ff0000;
    transform: scale(1.05);
}

.trailer-close-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.trailer-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Trailer error fallback */
.trailer-error-fallback {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    z-index: 5;
}

.trailer-error-fallback.show {
    display: flex;
}

.trailer-error-fallback i {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 1rem;
}

.trailer-error-fallback p {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.trailer-youtube-btn-large {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border: none;
    border-radius: 9999px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trailer-youtube-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.4);
}

/* Trailer list (multiple videos) */
.trailer-list {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trailer-thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.trailer-thumb-item {
    position: relative;
    flex-shrink: 0;
    width: 140px;
    aspect-ratio: 16/9;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.trailer-thumb-item:hover {
    border-color: #f59e0b;
    transform: scale(1.05);
}

.trailer-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trailer-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trailer-thumb-item:hover .trailer-thumb-overlay {
    opacity: 1;
}

.trailer-thumb-overlay i {
    font-size: 1.5rem;
    color: white;
}

.trailer-thumb-type {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    padding: 0.125rem 0.375rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0.25rem;
    font-size: 0.625rem;
    color: #9ca3af;
}

/* Trailer empty state */
.trailer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: #6b7280;
    text-align: center;
}

.trailer-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.trailer-empty p {
    margin-bottom: 1rem;
}

.trailer-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border: none;
    border-radius: 9999px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trailer-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

/* Trailer loading state */
.trailer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: #9ca3af;
}

.trailer-loading .loading-spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
}

/* ============= Credits Section (Director & Cast) ============= */
.credits-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.credits-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.credits-loading .loading-spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Director Card */
.director-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
}

.director-card:hover {
    background: var(--bg-card-hover);
    transform: translateX(5px);
}

.person-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-avatar i {
    font-size: 1.5rem;
    color: white;
}

.person-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.person-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.person-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Cast Grid */
.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.cast-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.cast-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #ec4899, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.cast-card:hover .cast-avatar {
    border-color: #ec4899;
}

.cast-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-avatar i {
    font-size: 2rem;
    color: white;
}

.cast-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.cast-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cast-character {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============= Responsive ============= */
@media (max-width: 640px) {
    .featured-title {
        font-size: 1.5rem;
    }

    .modal-header {
        height: 200px;
    }

    .modal-poster {
        width: 100px;
        left: 1rem;
    }

    .modal-body {
        padding: 3rem 1rem 1rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    /* Trailer responsive */
    .trailer-play-btn {
        width: 4rem;
        height: 4rem;
        font-size: 1.25rem;
    }

    .trailer-thumb-item {
        width: 120px;
    }

    /* Cast responsive */
    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .cast-card {
        padding: 0.75rem;
    }

    .cast-avatar {
        width: 60px;
        height: 60px;
    }

    .cast-avatar i {
        font-size: 1.5rem;
    }

    .cast-name {
        font-size: 0.75rem;
    }

    .cast-character {
        font-size: 0.625rem;
    }

    .person-avatar {
        width: 50px;
        height: 50px;
    }
}

/* ============= Person Modal Styles ============= */
.person-modal-content {
    max-width: 900px !important;
    padding: 0 !important;
    overflow: hidden;
}

.person-detail-header {
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.person-detail-main {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.person-detail-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-card);
    border: 4px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.person-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-detail-photo i {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.person-detail-info {
    flex: 1;
}

.person-detail-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.person-detail-subname {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.person-basic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.person-detail-content {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.person-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.person-section-title i {
    color: var(--accent-primary);
}

.person-bio-text {
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.person-filmography {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.film-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.film-item:hover {
    transform: translateY(-5px);
}

.film-poster {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 2/3;
    margin-bottom: 0.75rem;
}

.film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film-rating {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fbbf24;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.film-info {
    text-align: center;
}

.film-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.film-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.film-year {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.person-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.45rem;
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

.timeline-year {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 3rem;
    font-size: 0.9rem;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-char {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.person-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.photo-item {
    aspect-ratio: 2/3;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-primary);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-tmdb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(1, 180, 228, 0.1);
    color: #01b4e4;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(1, 180, 228, 0.2);
}

.person-tmdb-link:hover {
    background: rgba(1, 180, 228, 0.2);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .person-detail-main {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .person-detail-name {
        font-size: 1.75rem;
    }

    .person-basic-meta {
        justify-content: center;
        gap: 1rem;
    }

    .person-filmography {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

/* ============= Splash Modal Styles ============= */
.splash-modal-content {
    max-width: 600px !important;
    padding: 0 !important;
    overflow-y: auto !important;
    border-radius: 2rem !important;
    animation: splash-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes splash-pop {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.splash-modal-body {
    display: flex;
    flex-direction: column;
}

.splash-image-container {
    width: 100%;
    overflow: hidden;
    background: #000;
}

.splash-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.splash-modal-content:hover .splash-image {
    transform: scale(1.02);
}

.splash-info-container {
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
}

.splash-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.splash-tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.splash-tech-stack span {
    padding: 0.4rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.splash-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.app-title-sub {
    transition: color 0.3s ease;
}

[data-theme="dark"] .app-title-sub {
    color: #ffffff !important;
    font-weight: 400 !important;
}

[data-theme="light"] .app-title-sub {
    color: #0f172a !important;
}