/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --accent: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --carousel-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --focus-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --notification-bg: rgba(37, 99, 235, 0.95);
    --card-radius: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --max-visible-items: 6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--dark);
    background: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.95), 
        rgba(124, 58, 237, 0.95));
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    color: white;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:active {
    transform: scale(0.98);
}

.logo i {
    font-size: 1.5rem;
    transition: transform var(--transition-normal);
}

.logo.refreshing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

nav {
    position: relative;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 80%;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    background: var(--primary);
    color: white;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: var(--primary-dark);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-success {
    background: var(--accent);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 3rem 0;
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    animation: pulse 15s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

.hero.hidden {
    display: none;
}

.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.hero p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.search-box {
    max-width: 500px;
    margin: 1.5rem auto;
    position: relative;
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    padding-right: 3rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    background: white;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.search-box button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.search-box button:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

/* ===== STATS CONTAINER ===== */
.stats-container {
    margin: 2.5rem 0;
    position: relative;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    perspective: 1000px;
}

.stat-card {
    background: white;
    padding: 1.75rem 1.5rem;
    border-radius: var(--card-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    will-change: transform;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    transition: transform var(--transition-normal);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    display: block;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== RESOURCE SECTIONS ===== */
.resource-section {
    padding: 3rem 0;
    transition: all var(--transition-normal);
    position: relative;
}

.resource-section:nth-child(even) {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.resource-section.hidden {
    display: none !important;
}

.resource-section.focused {
    position: relative;
    z-index: 100;
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--focus-shadow);
    margin: 2rem auto;
    max-width: 1400px;
    padding: 2rem 0;
    animation: focusIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

@keyframes focusIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.resource-section.focused .container {
    padding: 0 2rem;
}

.resource-section.focused .section-header {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.section-header h2 i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Show All / Show Less Button */
.toggle-resources {
    min-width: 110px;
}

.toggle-resources i {
    transition: transform var(--transition-normal);
}

.toggle-resources[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Back to Home Button */
.back-to-home {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    font-family: inherit;
    font-size: 0.9rem;
}

.back-to-home:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ===== VIDEO GRID ===== */
.video-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* Limit to 6 items in normal view on desktop */
.video-grid:not(.show-all) {
    --max-visible-items: 6;
}

.video-grid:not(.show-all) .video-card:nth-child(n+7) {
    display: none !important;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.video-grid.show-all {
    display: grid !important;
    opacity: 1;
}

/* When showing all items, show them all */
.video-grid.show-all .video-card {
    display: block !important;
}

.video-card {
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid var(--border);
    position: relative;
    animation: cardSlideIn 0.4s ease backwards;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, #1e293b, #334155);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-slow);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.video-thumbnail img[src*="data:image/svg"] {
    object-fit: contain;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.video-content {
    padding: 1.25rem;
    position: relative;
    z-index: 2;
}

.video-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
}

.video-description {
    color: var(--gray);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray);
    font-size: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.video-meta i {
    color: var(--primary);
    font-size: 0.8rem;
}

/* ===== RESOURCE GRID ===== */
.resource-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* Limit to 6 items in normal view on desktop */
.resource-grid:not(.show-all) {
    --max-visible-items: 6;
}

.resource-grid:not(.show-all) .resource-card:nth-child(n+7) {
    display: none !important;
}

.resource-grid.show-all {
    display: grid !important;
    opacity: 1;
}

/* When showing all items, show them all */
.resource-grid.show-all .resource-card {
    display: block !important;
}

.resource-card {
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    position: relative;
    animation: cardSlideIn 0.4s ease backwards;
}

.resource-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

/* Card Content */
.card-header {
    padding: 1.5rem 1.25rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.card-header i {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--dark);
    line-height: 1.4;
}

.card-content p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    line-height: 1.5;
}

.resource-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray);
    background: #f8fafc;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.resource-card:hover .detail-item {
    background: white;
}

.detail-item i {
    color: var(--primary);
    width: 14px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray);
    font-size: 0.8rem;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
    font-weight: 500;
}

.pdf-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Resource Type Colors */
.video-bg { background: linear-gradient(135deg, #ef4444, #f87171); }
.notes-bg { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.papers-bg { background: linear-gradient(135deg, #10b981, #34d399); }
.plans-bg { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.schemes-bg { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

/* ===== MOBILE CAROUSELS ===== */
.mobile-carousel-container {
    display: block;
    position: relative;
    margin: 0 -0.75rem;
    padding: 0 0.75rem;
}

/* On mobile, limit carousel to show only first 6 items */
.mobile-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-padding: 0 1.5rem;
    padding: 1.5rem 0.75rem;
    margin: 0 -0.75rem;
    scroll-behavior: smooth;
    position: relative;
}

.mobile-carousel::-webkit-scrollbar {
    display: none;
}

/* Show only first 6 items in carousel by default */
.mobile-carousel .resource-card,
.mobile-carousel .video-card {
    flex: 0 0 calc(85% - 0.75rem);
    max-width: 320px;
    scroll-snap-align: center;
    margin-right: 1.5rem;
    transform: scale(0.95);
    transition: all var(--transition-normal);
    opacity: 0.7;
    cursor: grab;
    user-select: none;
}

/* Hide items beyond 6th in carousel */
.mobile-carousel .resource-card:nth-child(n+7),
.mobile-carousel .video-card:nth-child(n+7) {
    display: none !important;
}

.mobile-carousel .resource-card:active,
.mobile-carousel .video-card:active {
    cursor: grabbing;
}

.mobile-carousel .resource-card.active,
.mobile-carousel .video-card.active {
    transform: scale(1);
    opacity: 1;
    box-shadow: var(--carousel-shadow);
}

.mobile-carousel .resource-card:last-child,
.mobile-carousel .video-card:last-child {
    margin-right: 1.5rem;
    padding-right: 0.75rem;
}

/* Show all items in carousel when section is focused */
.resource-section.focused .mobile-carousel .resource-card,
.resource-section.focused .mobile-carousel .video-card {
    display: flex !important;
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 0 0.75rem;
}

.carousel-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    background: white;
    color: var(--primary);
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    padding: 0;
    flex-shrink: 0;
}

.carousel-indicator.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.carousel-indicator:hover:not(.active) {
    background: var(--gray);
    transform: scale(1.1);
}

/* ===== VIDEO PLAYER SECTION ===== */
.video-player-section {
    display: none;
    padding: 0;
    background: #000;
    position: relative;
    z-index: 200;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    margin: 1.5rem 0;
}

.video-player-section.active {
    display: block;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.video-player-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    overflow: hidden;
}

.video-player-container.loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    z-index: 1;
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: opacity 0.3s ease;
}

.video-player-container.loading iframe {
    opacity: 0;
}

.video-player-info {
    padding: 1.5rem;
    background: white;
    border-radius: 0 0 var(--card-radius) var(--card-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-player-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 700;
    line-height: 1.3;
}

.video-player-description {
    color: var(--gray);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.video-player-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* ===== VIDEO NOTIFICATION ===== */
.video-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--notification-bg);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: var(--card-radius);
    z-index: 9999;
    box-shadow: var(--shadow-hover);
    animation: notificationSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 90%;
    width: 350px;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.notification-content span {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.notification-content span strong {
    font-weight: 700;
    color: white;
}

.notification-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.5), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section {
    text-align: center;
}

.footer-section h3 {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.625rem;
    transition: transform var(--transition-fast);
}

.footer-links li:hover {
    transform: translateX(5px);
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    justify-content: center;
    font-weight: 500;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: white;
}

.footer-links a i {
    transition: transform var(--transition-fast);
    font-size: 0.8rem;
}

.footer-links a:hover i {
    transform: translateX(3px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.social-links a {
    color: white;
    font-size: 1.25rem;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.85rem;
    position: relative;
}

.copyright::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.hosting-info {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0.8;
}

/* ===== ALERTS ===== */
#alertContainer {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 9998;
    max-width: 350px;
    width: calc(100% - 30px);
    pointer-events: none;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--card-radius);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: alertSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-hover);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--card-radius) 0 0 var(--card-radius);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.alert-success::before {
    background: var(--accent);
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
    color: #1e40af;
}

.alert-info::before {
    background: var(--primary);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.alert-error::before {
    background: var(--danger);
}

.alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.alert span {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
/* MOBILE FIRST - Default styles are for mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.9rem;
        padding: 0 1rem;
        margin-bottom: 1.25rem;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, 
            rgba(37, 99, 235, 0.98), 
            rgba(124, 58, 237, 0.98));
        flex-direction: column;
        padding: 1rem;
        display: none;
        box-shadow: var(--shadow-hover);
        backdrop-filter: blur(20px);
        border-radius: 0 0 var(--card-radius) var(--card-radius);
        animation: menuSlideDown 0.3s ease;
    }

    @keyframes menuSlideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 0.875rem 1rem;
        justify-content: flex-start;
        border-radius: 8px;
        margin-bottom: 0.375rem;
        font-size: 0.85rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Mobile: Show carousels, hide desktop grids */
    .video-grid,
    .resource-grid {
        display: none !important;
    }
    
    .mobile-carousel-container {
        display: block;
    }
    
    /* On mobile, show all items in carousel when not in focus mode */
    .mobile-carousel .resource-card,
    .mobile-carousel .video-card {
        flex: 0 0 calc(85% - 0.5rem);
        max-width: 280px;
    }
    
    /* Focus mode for mobile */
    .resource-section.focused {
        margin: 1rem auto;
        padding: 1.5rem 0;
        border-radius: var(--card-radius);
    }
    
    .resource-section.focused .container {
        padding: 0 1rem;
    }
    
    /* In focus mode on mobile: show grids, hide carousels */
    .resource-section.focused .video-grid,
    .resource-section.focused .resource-grid {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* In focus mode, show all items */
    .resource-section.focused .video-grid .video-card,
    .resource-section.focused .resource-grid .resource-card {
        display: block !important;
    }
    
    .resource-section.focused .mobile-carousel-container {
        display: none !important;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .back-to-home {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        padding: 0.875rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    /* Footer mobile adjustments */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links a {
        justify-content: center;
    }
    
    /* Video player mobile */
    .video-player-section {
        margin: 1rem 0;
        border-radius: 10px;
    }
    
    .video-player-info {
        padding: 1.25rem;
    }
    
    .video-player-title {
        font-size: 1.25rem;
    }
    
    .video-player-description {
        font-size: 0.9rem;
    }
    
    .video-player-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .video-player-actions .btn,
    .video-player-actions .back-to-videos {
        width: 100%;
        justify-content: center;
    }
    
    /* Notification mobile */
    .video-notification {
        width: calc(100% - 1.5rem);
        padding: 0.75rem 1rem;
        top: 70px;
    }
    
    .notification-content {
        gap: 0.5rem;
    }
    
    .notification-content i {
        font-size: 1.1rem;
    }
    
    /* On mobile, show only 3 items */
    .video-grid:not(.show-all) .video-card:nth-child(n+4),
    .resource-grid:not(.show-all) .resource-card:nth-child(n+4) {
        display: none !important;
    }
    
    .carousel-controls {
        gap: 1rem;
    }
    
    .carousel-btn {
        width: 38px;
        height: 38px;
    }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .video-grid,
    .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resource-section.focused .video-grid,
    .resource-section.focused .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    /* On tablet, limit to 4 items when not showing all */
    .video-grid:not(.show-all) .video-card:nth-child(n+5),
    .resource-grid:not(.show-all) .resource-card:nth-child(n+5) {
        display: none !important;
    }
}

/* DESKTOP - Override mobile styles */
@media (min-width: 769px) {
    /* Desktop: Show grids, hide carousels */
    .video-grid,
    .resource-grid {
        display: grid !important;
    }
    
    .mobile-carousel-container {
        display: none !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    /* Focus mode desktop adjustments */
    .resource-section.focused {
        margin: 2.5rem auto;
        padding: 2.5rem 0;
    }
    
    .resource-section.focused .video-grid,
    .resource-section.focused .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    /* Navigation desktop enhancements */
    .nav-links {
        gap: 0.5rem;
    }
    
    /* Hero desktop */
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.05rem;
    }
    
    /* On desktop, limit to 6 items when not showing all */
    .video-grid:not(.show-all) .video-card:nth-child(n+7),
    .resource-grid:not(.show-all) .resource-card:nth-child(n+7) {
        display: none !important;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .container {
        padding: 0;
    }
    
    .hero h1 {
        font-size: 2.75rem;
    }
    
    .video-grid,
    .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .resource-section.focused .video-grid,
    .resource-section.focused .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .pdf-actions {
        flex-direction: column;
    }
    
    .pdf-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .resource-details {
        grid-template-columns: 1fr;
    }
    
    /* Small mobile adjustments */
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .search-box {
        margin: 1.25rem auto;
    }
    
    .search-box input {
        padding: 0.75rem 1rem;
        padding-right: 2.5rem;
    }
    
    .video-player-title {
        font-size: 1.125rem;
    }
    
    .video-notification {
        padding: 0.625rem 0.875rem;
        width: calc(100% - 1rem);
    }
    
    .notification-content {
        gap: 0.375rem;
    }
    
    .notification-content i {
        font-size: 1rem;
    }
    
    /* On small mobile, show only 2 items */
    .video-grid:not(.show-all) .video-card:nth-child(n+3),
    .resource-grid:not(.show-all) .resource-card:nth-child(n+3) {
        display: none !important;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Empty State */
.no-resources {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray);
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.no-resources i {
    font-size: 2.5rem;
    color: var(--border);
    margin-bottom: 1rem;
}

.no-resources p {
    font-size: 1rem;
    font-weight: 500;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px;
}

/* Active section highlight */
section:target {
    animation: highlight 1.5s ease;
}

@keyframes highlight {
    0% {
        background: rgba(37, 99, 235, 0.15);
    }
    100% {
        background: transparent;
    }
}

/* Improved focus states for accessibility */
.btn:focus,
.search-box input:focus,
.carousel-btn:focus,
.back-to-home:focus,
.back-to-videos:focus,
.video-card:focus,
.resource-card:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Skip to main content for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0 0 6px 0;
    z-index: 9999;
    transition: top 0.3s;
    font-size: 0.85rem;
}

.skip-to-content:focus {
    top: 0;
}

/* Print styles */
@media print {
    .video-player-section,
    .mobile-menu-btn,
    .search-box,
    .video-notification,
    #alertContainer,
    .carousel-controls {
        display: none !important;
    }
    
    .video-grid,
    .resource-grid {
        display: grid !important;
        break-inside: avoid;
    }
    
    .resource-card,
    .video-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #0f172a;
        --dark: #f8fafc;
        --gray: #94a3b8;
        --border: #334155;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    }
    
    body {
        background: var(--light);
        color: var(--dark);
    }
    
    .hero {
        background: linear-gradient(135deg, #1e293b, #0f172a);
    }
    
    .stat-card,
    .resource-card,
    .video-card,
    .video-player-info {
        background: #1e293b;
        border-color: var(--border);
    }
    
    .video-title,
    .card-content h3,
    .video-player-title {
        color: var(--dark);
    }
    
    .detail-item {
        background: #334155;
    }
    
    .search-box input {
        background: #1e293b;
        border-color: var(--border);
        color: var(--dark);
    }
    
    .carousel-btn {
        background: #1e293b;
        border-color: var(--primary);
        color: var(--primary);
    }
    
    .alert {
        background: rgba(255, 255, 255, 0.05);
        color: var(--dark);
    }
    
    ::-webkit-scrollbar-track {
        background: #1e293b;
    }
}

/* Additional utility classes */
.skeleton-card {
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: pulse 1.5s ease-in-out infinite;
    border: 1px solid var(--border);
}

.skeleton-thumbnail {
    padding-bottom: 56.25%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-header {
    height: 80px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-content {
    padding: 1.25rem;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-line:first-child {
    width: 80%;
}

.skeleton-line:last-child {
    width: 60%;
    margin-bottom: 0;
}

@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-hidden {
    display: none;
}