body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    background: linear-gradient(45deg, #007bff, #6610f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    max-width: 1200px;
}

.media-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.media-thumbnail {
    border-radius: 12px;
    transition: transform 0.3s ease;
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.media-card:hover .media-thumbnail {
    transform: scale(1.02);
}

.media-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-channel {
    color: #718096;
    font-size: 0.8rem;
    font-style: italic;
}

.btn-download {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-download:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.section-title {
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.disclaimer-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tips-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.position-relative {
    position: relative;
}

.view-count-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.3s ease;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
}

.view-count-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.view-count-overlay i {
    font-size: 10px;
    opacity: 0.9;
}

.media-card:hover .view-count-overlay {
    background: rgba(0, 123, 255, 0.9);
}

.duration-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.3s ease;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
}

.duration-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.duration-overlay i {
    font-size: 10px;
    opacity: 0.9;
}

.media-card:hover .duration-overlay {
    background: rgba(220, 53, 69, 0.9);
}

.badge {
    font-size: 0.75rem;
    padding: 6px 12px;
}

/* Search Section Title - Icon and Text Color Fix */
.search-section h5,
.search-section .h5,
h5.text-primary,
.text-primary.h5 {
    background: linear-gradient(45deg, #8B5CF6, #3B82F6) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Search Icon Color Fix */
.search-section i.fas.fa-search,
.search-section .fa-search,
i.fa-search.text-primary,
.text-primary i.fa-search {
    background: linear-gradient(45deg, #8B5CF6, #3B82F6) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 1.2em !important;
}

/* Search Button - GRADIENT BACKGROUND SAME AS DOWNLOAD - MINIMAL FIX ONLY */
.btn-primary,
.btn-primary.btn-lg,
button[type="submit"],
input[type="submit"] {
    background: linear-gradient(45deg, #8B5CF6, #3B82F6) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover,
.btn-primary.btn-lg:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4) !important;
    color: white !important;
}

/* Download Options Styling */
.format-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.format-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.format-tab.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.premium-download {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #ffd700, #ffb347);
    color: #333;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.download-options {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.download-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-row {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.download-row:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.quality-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quality-label {
    font-weight: 600;
    color: #333;
}

.duration-info {
    font-size: 0.8rem;
    color: #666;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.quality-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.quality-badge.hd {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
}

.file-size {
    min-width: 90px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    margin: 0 15px;
    font-family: monospace;
}

/* Dynamic Download Button Sizing Based on File Size */
.download-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    /* Base size - will be overridden by data-size classes */
    padding: 10px 16px;
    font-size: 0.85rem;
    min-width: 140px;
}

.download-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.download-btn.premium {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.download-btn.premium:hover {
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

/* Size variations based on file size in MB - Updated thresholds */
.download-btn[data-size="small"] {
    padding: 8px 12px;
    font-size: 0.75rem;
    min-width: 120px;
}

.download-btn[data-size="medium"] {
    padding: 10px 16px;
    font-size: 0.85rem;
    min-width: 140px;
}

.download-btn[data-size="large"] {
    padding: 12px 20px;
    font-size: 0.9rem;
    min-width: 160px;
}

.download-btn[data-size="xlarge"] {
    padding: 14px 24px;
    font-size: 0.95rem;
    min-width: 180px;
}

/* File size color coding */
.file-size.small-file {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.file-size.medium-file {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.file-size.large-file {
    background: rgba(255, 87, 34, 0.1);
    color: #ff5722;
}

.file-size.xlarge-file {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

@media (max-width: 768px) {
    .media-thumbnail {
        height: 140px;
    }
    
    .view-count-overlay,
    .duration-overlay {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .download-row {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .quality-info {
        justify-content: center;
    }
    
    .file-size {
        margin: 0;
    }
    
    .download-btn {
        width: 100%;
        min-width: auto;
    }
    
    .duration-info {
        font-size: 0.75rem;
    }
}