/* Main CSS for DramaBox Streaming */

/* Drama Card Styles */
.drama-card {
    transition: transform 0.2s, box-shadow 0.2s;
    background: linear-gradient(145deg, #374151, #1f2937);
}

.drama-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

/* Text Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tab Navigation */
.tab-btn {
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #f59e0b !important;
    border-color: #f59e0b !important;
}

.tab-btn:hover:not(.active) {
    color: #fff;
    border-color: #6b7280;
}

/* Episode Buttons */
.episode-btn {
    transition: all 0.2s ease;
    min-width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.episode-btn:hover {
    transform: scale(1.05);
}

.episode-btn.active {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Genre Tags */
.genre-tag {
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #4b5563, #374151);
    border: 1px solid #6b7280;
}

.genre-tag:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #f59e0b;
    transform: translateY(-1px);
}

.genre-tag.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #f59e0b;
}

/* Corner Badge */
.corner-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    z-index: 10;
}

/* Search Input Focus */
input[type="text"]:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Loading Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Modal Animation */
.modal-enter {
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .drama-card {
        margin-bottom: 1rem;
    }
    
    .video-container {
        padding-bottom: 75%; /* 4:3 aspect ratio on mobile */
    }
    
    .episode-btn {
        min-width: 40px;
        height: 35px;
        font-size: 14px;
    }
    
    .tab-btn {
        font-size: 14px;
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .drama-card {
        border-radius: 8px;
    }
    
    .video-container {
        border-radius: 8px;
        overflow: hidden;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    .drama-card {
        background: linear-gradient(145deg, #1f2937, #111827);
    }
    
    input[type="text"] {
        background: #1f2937;
        border-color: #374151;
    }
}

/* Print styles */
@media print {
    .video-container,
    #videoModal,
    .episode-btn,
    button {
        display: none !important;
    }
}