/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f0f23, #1a1a2e);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 100px;
}

/* Background Pattern like Index */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: url('../../../../images/bg/bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f23, #1a1a2e);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.loading-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 20px 0 8px;
    color: #ffffff;
}

.loading-content p {
    font-size: 14px;
    color: #94a3b8;
}

/* Main Container */
.main-container {
    min-height: 100vh;
    opacity: 0;
    animation: fadeIn 0.3s ease 0.1s forwards;
    position: relative;
    z-index: 1;
}

/* Logo Section */
.logo-section {
    padding: 40px 20px 20px;
    text-align: center;
}

.logo-container {
    max-width: 400px;
    margin: 0 auto;
}

.site-logo-img {
    max-width: 280px;
    height: auto;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px rgba(74, 222, 128, 0.3));
}

.logo-subtitle {
    font-size: 16px;
    color: #94a3b8;
    font-weight: 400;
}

/* Library Content */
.library-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* Category Cards */
.category-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    backdrop-filter: blur(20px);
    height: 180px;
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../../../../images/bg/bg.png');
    background-size: 80px 80px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

.category-card:hover .card-background {
    opacity: 0.2;
}

.category-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.category-icon {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.category-card:hover .category-icon {
    transform: scale(1.15) rotate(8deg);
}

.category-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
    color: white;
}

.card-content {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    z-index: 2;
}

.category-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
}

.category-card p {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 0;
}

.category-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Count Badge */
.count-badge {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #4ade80;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* Category Specific Styles */
.category-card.hindi .category-icon {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
}

.category-card.hindi .card-background {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.category-card.hindi .category-badge {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

.category-card.special .category-icon {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
}

.category-card.special .card-background {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.category-card.special .category-badge {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
}

.category-card.movie .category-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
}

.category-card.movie .card-background {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.category-card.movie .category-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.category-card.subbed .category-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.3);
}

.category-card.subbed .card-background {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.category-card.subbed .category-badge {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.category-card.dubbed .category-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.category-card.dubbed .card-background {
    background: linear-gradient(135deg, #10b981, #059669);
}

.category-card.dubbed .category-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.category-card.popular .category-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.3);
}

.category-card.popular .card-background {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.category-card.popular .category-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.category-card.home .category-icon {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 8px 32px rgba(74, 222, 128, 0.3);
}

.category-card.home .card-background {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.category-card.home .category-badge {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
}

.category-card.upcoming .category-icon {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.category-card.upcoming .card-background {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.category-card.upcoming .category-badge {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .logo-section {
        padding: 30px 16px 16px;
    }
    
    .site-logo-img {
        max-width: 220px;
    }
    
    .library-content {
        padding: 16px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-card {
        height: 160px;
    }
    
    .category-icon {
        width: 48px;
        height: 48px;
        top: 20px;
        left: 20px;
    }
    
    .category-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .card-content {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    .category-card h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .site-logo-img {
        max-width: 140px;
    }
    
    .categories-grid {
        gap: 16px;
    }
    
    .category-card {
        height: 140px;
    }
    
    .category-icon {
        width: 44px;
        height: 44px;
        top: 16px;
        left: 16px;
    }
    
    .card-content {
        bottom: 16px;
        left: 16px;
        right: 16px;
    }
    
    .category-card h3 {
        font-size: 18px;
    }
    
    .category-badge {
        top: 16px;
        right: 16px;
        padding: 4px 8px;
        font-size: 10px;
    }
}
