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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f0f1e;
    min-height: 100vh;
    color: #e0e0e0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

header {
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

h1 {
    margin-bottom: 15px;
    text-align: center;
}

.logo-link {
    display: inline-block;
    transition: all 0.3s;
}

.logo-link:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.platform-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.platform-btn {
    padding: 12px 25px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.6);
    color: #b0b0c0;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s;
}

.platform-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.platform-btn.active {
    background: #fcc509;
    border-color: #fcc509;
    color: #0f0f1e;
    box-shadow: 0 5px 20px rgba(252, 197, 9, 0.4);
    font-weight: 700;
}

.category-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    padding: 10px 20px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.6);
    color: #b0b0c0;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.nav-btn.active {
    background: linear-gradient(135deg, #fcc509 0%, #ff8c00 100%);
    border-color: #fcc509;
    color: #0f0f1e;
    box-shadow: 0 5px 20px rgba(252, 197, 9, 0.4);
    font-weight: 700;
}

.nav-btn-random {
    background: #fcc509;
    border-color: rgba(252, 197, 9, 0.5);
    color: #0f0f1e;
    font-weight: 700;
}

.nav-btn-random:hover {
    background: #e6b308;
    box-shadow: 0 5px 20px rgba(252, 197, 9, 0.5);
}

.nav-btn-random.active {
    background: #fcc509;
    box-shadow: 0 5px 20px rgba(252, 197, 9, 0.6);
}

.refresh-btn {
    padding: 10px 20px;
    border: 1px solid rgba(252, 197, 9, 0.5);
    background: #fcc509;
    color: #0f0f1e;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    transform: translateY(-2px) rotate(180deg);
    box-shadow: 0 5px 20px rgba(252, 197, 9, 0.5);
}

.search-section {
    display: flex;
    gap: 10px;
    margin: 30px 0 10px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.popular-search {
    max-width: 600px;
    margin: 0 auto 20px auto;
    padding: 15px;
    background: rgba(20, 20, 35, 0.6);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
}

.popular-search-title {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.popular-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-chip {
    padding: 8px 15px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.6);
    color: #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s;
}

.keyword-chip:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.4);
}

.filter-section {
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.filter-section label {
    font-weight: 600;
    color: #667eea;
}

.filter-section select {
    padding: 10px 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.8);
    color: #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.filter-section select:hover {
    border-color: #667eea;
    background: rgba(40, 40, 60, 0.9);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-controls button {
    padding: 10px 20px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination-controls button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.pagination-controls button:disabled {
    background: rgba(60, 60, 80, 0.5);
    border-color: rgba(102, 126, 234, 0.1);
    cursor: not-allowed;
    opacity: 0.4;
}

#pageInfo {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
    text-align: center;
}

#searchInput {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.8);
    color: #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    outline: none;
    transition: all 0.3s;
}

#searchInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

#searchInput::placeholder {
    color: #808090;
}

#searchBtn {
    padding: 12px 30px;
    border: 1px solid rgba(252, 197, 9, 0.3);
    background: #fcc509;
    color: #0f0f1e;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#searchBtn svg {
    width: 16px;
    height: 16px;
    stroke: #0f0f1e;
}

#searchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(252, 197, 9, 0.5);
    background: #e6b308;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #fcc509;
    font-size: 1.2em;
    display: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    border: 4px solid rgba(252, 197, 9, 0.2);
    border-top-color: #fcc509;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Loading Skeleton */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.skeleton-card {
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    overflow: hidden;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    height: 350px;
    background: linear-gradient(90deg, rgba(30, 30, 50, 0.6) 25%, rgba(50, 50, 70, 0.6) 50%, rgba(30, 30, 50, 0.6) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-content {
    padding: 15px;
}

.skeleton-title {
    height: 20px;
    background: rgba(50, 50, 70, 0.6);
    border-radius: 4px;
    margin-bottom: 10px;
    animation: shimmer 1.5s infinite;
}

.skeleton-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.skeleton-badge {
    height: 24px;
    width: 80px;
    background: rgba(50, 50, 70, 0.6);
    border-radius: 12px;
    animation: shimmer 1.5s infinite;
}

.skeleton-tags {
    display: flex;
    gap: 5px;
}

.skeleton-tag {
    height: 20px;
    width: 60px;
    background: rgba(50, 50, 70, 0.6);
    border-radius: 10px;
    animation: shimmer 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Quality selector */
.quality-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quality-selector label {
    color: #b0b0c0;
    font-size: 0.85em;
    font-weight: 600;
}

.quality-btn {
    padding: 6px 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.6);
    color: #b0b0c0;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.3s;
}

.quality-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
}

.quality-btn.active {
    background: #fcc509;
    border-color: #fcc509;
    color: #0f0f1e;
    font-weight: 700;
}

.error {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.5);
    color: #ff6b6b;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    display: none;
}

.column-section {
    margin-bottom: 40px;
}

.column-title {
    color: #fcc509;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(252, 197, 9, 0.5);
}

.drama-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.drama-card {
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.drama-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    border-color: #667eea;
}

.drama-cover {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.drama-info {
    padding: 15px;
}

.drama-title {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 8px;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drama-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #a0a0b0;
}

.drama-episodes {
    background: #fcc509;
    color: #0f0f1e;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 700;
}

.drama-views {
    color: #808090;
}

.drama-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.tag {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    color: #b0b0c0;
}

.corner-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8em;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0f1e;
    z-index: 1000;
    overflow-y: auto;
}

.detail-page {
    background: #0f0f1e;
    width: 100%;
    min-height: 100vh;
}

.detail-header {
    position: relative;
    height: 50vh;
    min-height: 300px;
}

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

.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.8);
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.5);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.back-btn:hover {
    background: rgba(102, 126, 234, 0.8);
    transform: translateX(-5px);
}

.detail-body {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.detail-title {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.detail-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.detail-intro {
    line-height: 1.6;
    color: #b0b0c0;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.modal-content {
    background: #0f0f1e;
    max-width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    overflow-y: auto;
}

.modal-header {
    position: relative;
    height: 50vh;
    min-height: 300px;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(102, 126, 234, 0.8);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

.modal-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.modal-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.modal-intro {
    line-height: 1.6;
    color: #b0b0c0;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.modal-tag {
    background: #fcc509;
    color: #0f0f1e;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 700;
}

.episode-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.load-episodes-btn {
    padding: 15px 30px;
    border: 1px solid rgba(252, 197, 9, 0.3);
    background: #fcc509;
    color: #0f0f1e;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s;
    width: 100%;
}

.load-episodes-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(252, 197, 9, 0.5);
    background: #e6b308;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.episode-btn {
    padding: 15px 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.6);
    color: #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s;
}

.episode-btn:hover:not(.locked) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.4);
}

.episode-btn.locked {
    background: rgba(60, 60, 80, 0.3);
    border-color: rgba(255, 107, 107, 0.3);
    color: #808090;
    cursor: not-allowed;
    opacity: 0.5;
}

.video-player {
    margin-top: 20px;
    padding: 0;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.video-controls-top {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(15, 15, 30, 0.95);
    align-items: center;
    justify-content: space-between;
}

.episode-nav-btn {
    padding: 10px 20px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s;
    white-space: nowrap;
}

.episode-nav-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.5);
}

.episode-nav-btn:disabled {
    background: rgba(60, 60, 80, 0.5);
    border-color: rgba(102, 126, 234, 0.1);
    cursor: not-allowed;
    opacity: 0.4;
}

.episode-selector {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.8);
    color: #e0e0e0;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    outline: none;
    font-weight: 600;
}

.episode-selector option {
    background: #1a1a2e;
    color: #e0e0e0;
}

.episode-selector option:disabled {
    color: #808090;
}

.video-player video {
    width: 100%;
    height: auto;
    min-height: 60vh;
    max-height: 80vh;
    background: #000;
    display: block;
    object-fit: contain;
}

/* Fullscreen video styles */
video:fullscreen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

video:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

video:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

video:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

/* Auto-play notification */
.autoplay-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    border: 2px solid #fcc509;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 30px rgba(252, 197, 9, 0.4);
    animation: slideUp 0.3s ease-out;
}

/* Fullscreen notification positioning */
video:fullscreen .autoplay-notification,
video:-webkit-full-screen .autoplay-notification,
video:-moz-full-screen .autoplay-notification,
video:-ms-fullscreen .autoplay-notification {
    position: absolute;
    bottom: 100px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.autoplay-notification p {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: #ffffff;
}

.autoplay-notification button {
    padding: 8px 18px;
    background: rgba(255, 107, 107, 0.3);
    border: 2px solid rgba(255, 107, 107, 0.8);
    color: #ff6b6b;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.3s;
    white-space: nowrap;
}

.autoplay-notification button:hover {
    background: rgba(255, 107, 107, 0.5);
    transform: scale(1.1);
    border-color: #ff6b6b;
}

/* Ensure video container can hold absolute positioned elements in fullscreen */
video:fullscreen,
video:-webkit-full-screen,
video:-moz-full-screen,
video:-ms-fullscreen {
    position: relative;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header .container {
        padding: 15px;
    }
    
    .logo-img {
        height: 45px;
    }
    
    h1 {
        margin-bottom: 15px;
    }
    
    .platform-nav {
        gap: 8px;
        padding-bottom: 15px;
        margin-bottom: 15px;
        justify-content: center;
    }
    
    .platform-btn {
        padding: 10px 16px;
        font-size: 0.85em;
        border-radius: 20px;
        border-width: 2px;
        flex: 0 1 auto;
        min-width: fit-content;
    }
    
    .category-nav {
        gap: 8px;
        margin-bottom: 0;
        justify-content: center;
    }
    
    .nav-btn {
        padding: 10px 16px;
        font-size: 0.85em;
        border-radius: 20px;
        flex: 0 1 auto;
        min-width: fit-content;
    }
    
    .search-section {
        gap: 8px;
        margin: 15px 0 10px 0;
    }
    
    #searchInput {
        font-size: 14px;
        padding: 10px 15px;
        border-radius: 20px;
    }
    
    #searchBtn {
        padding: 10px 20px;
        font-size: 0.9em;
        border-radius: 20px;
    }
    
    #searchBtn svg {
        width: 14px;
        height: 14px;
    }
    
    .popular-search {
        padding: 10px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .popular-search-title {
        font-size: 0.8em;
        margin-bottom: 8px;
    }
    
    .keyword-chip {
        padding: 5px 10px;
        font-size: 0.75em;
        border-radius: 15px;
    }
    
    .filter-section {
        padding: 12px;
        gap: 8px;
        border-radius: 12px;
        margin: 15px 0;
    }
    
    .filter-section label {
        font-size: 0.85em;
    }
    
    .filter-section select {
        padding: 7px 12px;
        font-size: 0.85em;
        border-radius: 18px;
    }
    
    .pagination-controls button {
        padding: 7px 12px;
        font-size: 0.85em;
        border-radius: 18px;
    }
    
    #pageInfo {
        font-size: 0.85em;
        min-width: 60px;
    }
    
    .column-title {
        font-size: 1.4em;
        margin-bottom: 15px;
        padding: 0 5px;
    }
    
    .drama-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .drama-card {
        border-radius: 12px;
    }
    
    .drama-cover {
        height: 280px;
    }
    
    .drama-info {
        padding: 12px;
    }
    
    .drama-title {
        font-size: 0.95em;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .drama-meta {
        font-size: 0.85em;
        margin-bottom: 8px;
    }
    
    .drama-episodes {
        font-size: 0.8em;
        padding: 4px 10px;
        border-radius: 12px;
    }
    
    .drama-views {
        font-size: 0.85em;
    }
    
    .drama-tags {
        gap: 6px;
        margin-top: 8px;
    }
    
    .tag {
        font-size: 0.7em;
        padding: 4px 8px;
        border-radius: 10px;
    }
    
    .corner-badge {
        font-size: 0.75em;
        padding: 5px 10px;
        top: 10px;
        right: 10px;
        border-radius: 8px;
    }
    
    .episode-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    
    .episode-btn {
        padding: 12px 6px;
        font-size: 0.85em;
        border-radius: 8px;
    }
    
    .modal-title {
        font-size: 1.3em;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .video-player {
        margin: 20px -15px 0 -15px;
        border-radius: 0;
        width: calc(100% + 30px);
    }
    
    .video-player video {
        min-height: 70vh;
        max-height: 85vh;
        width: 100%;
    }
    
    .video-controls-top {
        padding: 8px;
        gap: 6px;
    }
    
    .episode-nav-btn {
        padding: 7px 12px;
        font-size: 0.8em;
        border-radius: 15px;
    }
    
    .episode-selector {
        padding: 7px 10px;
        font-size: 0.8em;
        border-radius: 15px;
    }
    
    .detail-header {
        height: 40vh;
        min-height: 250px;
    }
    
    .back-btn {
        padding: 8px 15px;
        font-size: 0.9em;
        top: 12px;
        left: 12px;
    }
    
    .detail-body {
        padding: 15px;
    }
    
    .detail-title {
        font-size: 1.3em;
    }
    
    .detail-meta {
        font-size: 0.85em;
    }
    
    .detail-intro {
        font-size: 0.9em;
    }
    
    .load-episodes-btn {
        padding: 12px 20px;
        font-size: 0.9em;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    header .container {
        padding: 15px 12px;
    }
    
    .logo-img {
        height: 40px;
    }
    
    h1 {
        margin-bottom: 12px;
    }
    
    .platform-nav {
        gap: 6px;
        padding-bottom: 12px;
        margin-bottom: 12px;
        justify-content: center;
    }
    
    .platform-btn {
        padding: 8px 12px;
        font-size: 0.8em;
        border-radius: 18px;
        border-width: 2px;
    }
    
    .category-nav {
        gap: 6px;
        justify-content: center;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.8em;
        border-radius: 18px;
    }
    
    .search-section {
        margin: 12px 0 8px 0;
    }
    
    .popular-search {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .popular-search-title {
        font-size: 0.75em;
        margin-bottom: 6px;
    }
    
    .popular-keywords {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .keyword-chip {
        padding: 6px 10px;
        font-size: 0.7em;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .drama-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .drama-cover {
        height: 240px;
    }
    
    .drama-info {
        padding: 10px;
    }
    
    .drama-title {
        font-size: 0.9em;
        line-height: 1.3;
    }
    
    .column-title {
        font-size: 1.3em;
        margin-bottom: 12px;
        padding: 0 5px;
    }
    
    .drama-meta {
        font-size: 0.8em;
    }
    
    .drama-episodes {
        font-size: 0.75em;
        padding: 3px 8px;
    }
    
    .drama-tags {
        gap: 5px;
        margin-top: 6px;
    }
    
    .tag {
        font-size: 0.68em;
        padding: 3px 7px;
    }
    
    .episode-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
    
    .episode-btn {
        padding: 10px 5px;
        font-size: 0.8em;
    }
    
    .video-player video {
        min-height: 75vh;
        max-height: 90vh;
    }
}


/* Action buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.favorite-btn,
.continue-btn,
.share-btn {
    padding: 12px 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.6);
    color: #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-btn:hover,
.continue-btn:hover,
.share-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-2px);
}

.favorite-btn.active {
    background: #fcc509;
    border-color: #fcc509;
    color: #0f0f1e;
    font-weight: 700;
}

.continue-btn,
.share-btn {
    background: #fcc509;
    border-color: #fcc509;
    color: #0f0f1e;
    font-weight: 700;
}

.share-btn:hover {
    background: #e6b308;
    border-color: #e6b308;
}

/* Video controls bottom */
.video-controls-bottom {
    padding: 15px;
    background: rgba(15, 15, 30, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.speed-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.speed-btn {
    padding: 6px 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 50, 0.6);
    color: #b0b0c0;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.3s;
}

.speed-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
}

.speed-btn.active {
    background: #fcc509;
    border-color: #fcc509;
    color: #0f0f1e;
    font-weight: 700;
}

.pip-btn {
    padding: 8px 16px;
    border: 1px solid rgba(252, 197, 9, 0.3);
    background: #fcc509;
    color: #0f0f1e;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85em;
    transition: all 0.3s;
}

.pip-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 15px rgba(252, 197, 9, 0.5);
    background: #e6b308;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid #fcc509;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(252, 197, 9, 0.4);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile responsive for new controls */
@media (max-width: 768px) {
    .action-buttons {
        gap: 8px;
    }
    
    .favorite-btn,
    .continue-btn,
    .share-btn {
        padding: 10px 16px;
        font-size: 0.85em;
        flex: 1;
        justify-content: center;
    }
    
    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .skeleton-image {
        height: 280px;
    }
    
    .video-controls-bottom {
        padding: 10px;
        gap: 10px;
    }
    
    .speed-controls {
        width: 100%;
        justify-content: center;
    }
    
    .speed-btn {
        padding: 5px 10px;
        font-size: 0.75em;
    }
    
    .pip-btn {
        width: 100%;
        padding: 10px;
        font-size: 0.8em;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        top: 70px;
    }
}
