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

body {
    background: #0b0f1a;
    font-family: 'Inter', sans-serif;
    color: #edf2f7;
    line-height: 1.5;
}

/* Navbar */
.navbar {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 80, 120, 0.3);
    padding: 0.8rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff5078, #ff8e53);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    cursor: pointer;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #cbd5e6;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    font-size: 0.85rem;
}

.nav-btn.active, .nav-btn:hover {
    background: #ff5078;
    color: #0a0e17;
}

.search-box {
    display: flex;
    gap: 0.4rem;
    background: #1e2436;
    border-radius: 60px;
    padding: 0.2rem 0.2rem 0.2rem 1rem;
}

.search-box input {
    background: transparent;
    border: none;
    padding: 0.4rem 0;
    color: white;
    outline: none;
    width: 180px;
}

.search-box button {
    background: #ff5078;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 60px;
    cursor: pointer;
    font-weight: bold;
    color: #000;
}

/* Container */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Section */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 1rem 0 1.2rem;
    border-left: 4px solid #ff5078;
    padding-left: 1rem;
}

/* Grid Drama */
.drama-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
}

.drama-card {
    background: #11161f;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid #2a3a55;
}

.drama-card:hover {
    transform: translateY(-4px);
    border-color: #ff5078;
}

.drama-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: #1e2436;
}

.drama-card .info {
    padding: 0.6rem;
}

.drama-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.drama-card p {
    font-size: 0.7rem;
    color: #9aa7b9;
}

/* Detail */
.detail-container {
    background: #0f141f;
    border-radius: 1.2rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.detail-header {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.detail-header img {
    width: 200px;
    border-radius: 1rem;
    object-fit: cover;
}

.detail-info {
    flex: 1;
}

.detail-info h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.synopsis {
    margin: 0.8rem 0;
    line-height: 1.5;
    color: #cbd5e6;
}

.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.episode-btn {
    background: #1e2635;
    padding: 0.5rem;
    text-align: center;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: 0.2s;
}

.episode-btn:hover {
    background: #ff5078;
    color: #000;
}

/* Player */
.video-container {
    margin-top: 1rem;
}

video, iframe {
    width: 100%;
    min-height: 450px;
    border-radius: 1rem;
    background: #000;
    border: none;
}

.back-btn {
    background: #2a3a55;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    color: white;
    cursor: pointer;
    margin-bottom: 1rem;
    font-weight: 500;
}

.quality-selector {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.quality-btn {
    background: #2a3a55;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.quality-btn.active {
    background: #ff5078;
    color: #000;
}

/* Loading & Error */
.loading {
    text-align: center;
    padding: 2rem;
    color: #ff5078;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #2a3a55;
    border-top: 3px solid #ff5078;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 1rem;
}

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

.error {
    background: #2a1010;
    color: #ff8a8a;
    padding: 1rem;
    border-radius: 1rem;
    text-align: center;
    margin: 1rem 0;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.7rem;
    color: #6a7a8a;
    border-top: 1px solid #1f2a3a;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 640px) {
    .container { padding: 1rem; }
    .drama-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .detail-header img { width: 120px; }
}