/* ==========================================================================
   BANTU STREAM CONNECT - ENHANCED STYLESHEET
   Version: 3.3 (Simple Working Fix)
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES & THEME
   ========================================================================== */
:root {
    /* Primary Colors */
    --deep-black: #0A0E12;
    --deep-navy: #0F172A;
    --soft-white: #F8FAFC;
    --slate-grey: #94A3B8;
    --bantu-blue: #1D4ED8;
    --warm-gold: #F59E0B;
    
    /* Status Colors */
    --error-color: #EF4444;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    
    /* Glow Effects */
    --glow-cycle-1: #00A3FF;
    --glow-cycle-2: #0066FF;
    --glow-cycle-3: #8B5CF6;
    --glow-cycle-4: #EC4899;
    
    /* UI Elements */
    --card-bg: rgba(15, 23, 42, 0.6);
    --card-border: rgba(148, 163, 184, 0.2);
    --hover-overlay: rgba(255, 255, 255, 0.05);
    --active-overlay: rgba(245, 158, 11, 0.1);
    
    /* Gradients */
    --gold-glow: rgba(245, 158, 11, 0.3);
    --blue-glow: rgba(29, 78, 216, 0.3);
    --indigo: #4F46E5;
    
    /* Accessibility */
    --focus-outline: #F59E0B;
    --focus-outline-width: 3px;
    
    /* Layout */
    --header-height: 70px;
    --container-max-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 8px 20px rgba(245, 158, 11, 0.3);
    --shadow-blue: 0 10px 25px rgba(29, 78, 216, 0.4);
}

/* ==========================================================================
   2. BASE RESETS & ACCESSIBILITY
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--deep-black);
    color: var(--soft-white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility: Focus Management */
:focus-visible {
    outline: var(--focus-outline-width) solid var(--focus-outline);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

/* Accessibility: Skip to Content */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bantu-blue);
    color: white;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    z-index: 9999;
}

.skip-to-content:focus {
    top: 10px;
}

/* Screen Reader Only */
.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;
}

/* ==========================================================================
   3. SIMPLE HEADER - FIXED FOR BOTH MOBILE AND DESKTOP
   ========================================================================== */
.header {
    background: rgba(10, 14, 18, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    flex-wrap: nowrap;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 80px;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 18px;
    background: linear-gradient(to right, var(--soft-white), var(--bantu-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Search Section - Centered */
.search-section {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
    position: relative;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    padding: 10px 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.search-bar:focus-within {
    border-color: var(--warm-gold);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.search-icon {
    color: var(--slate-grey);
    margin-right: 10px;
    font-size: 14px;
}

#global-search {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--soft-white);
    font-size: 14px;
    outline: none;
    width: 100%;
}

#global-search::placeholder {
    color: var(--slate-grey);
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.search-filter-btn,
.search-clear-btn {
    background: transparent;
    border: none;
    color: var(--slate-grey);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-filter-btn:hover,
.search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--soft-white);
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    min-width: 50px;
    flex-shrink: 0;
}

.profile-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.3);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

/* ==========================================================================
   4. RESPONSIVE DESIGN - SIMPLE AND EFFECTIVE
   ========================================================================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
        padding: 12px 15px;
        gap: 10px;
    }
    
    .logo-section {
        order: 1;
        flex: 0 0 auto;
    }
    
    .search-section {
        order: 3;
        flex: 0 0 100%;
        margin: 10px 0 0 0;
        max-width: 100%;
    }
    
    .profile-section {
        order: 2;
        flex: 0 0 auto;
    }
    
    .logo-text {
        font-size: 16px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .logo-text {
        font-size: 15px;
    }
    
    .search-bar {
        padding: 8px 14px;
    }
    
    .profile-btn {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================================================
   5. LOADING SCREEN
   ========================================================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--deep-black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity var(--transition-base);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--bantu-blue);
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Small spinner for search loading */
.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--warm-gold);
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   6. ANIMATED BACKGROUND
   ========================================================================== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.glow-cycle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
    animation: float 8s infinite ease-in-out;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--glow-cycle-1);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background: var(--glow-cycle-2);
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.glow-3 {
    width: 350px;
    height: 350px;
    background: var(--glow-cycle-3);
    bottom: 10%;
    left: 20%;
    animation-delay: 4s;
}

.glow-4 {
    width: 250px;
    height: 250px;
    background: var(--glow-cycle-4);
    top: 20%;
    right: 20%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) scale(1); 
    }
    50% { 
        transform: translateY(-20px) scale(1.05); 
    }
}

/* ==========================================================================
   7. MAIN LAYOUT & CONTAINER
   ========================================================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 2;
    padding-bottom: 100px; /* Space for content */
}

/* Search Filters Dropdown */
.search-filters-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--deep-navy);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-section {
    margin-bottom: 15px;
}

.filter-section label {
    display: block;
    color: var(--slate-grey);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-section select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    color: var(--soft-white);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-base);
}

.filter-section select:focus {
    border-color: var(--warm-gold);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
}

.filter-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-btn.apply {
    background: var(--bantu-blue);
    color: white;
}

.filter-btn.apply:hover {
    background: #1E40AF;
    transform: translateY(-2px);
}

.filter-btn.reset {
    background: rgba(255, 255, 255, 0.1);
    color: var(--soft-white);
    border: 1px solid var(--card-border);
}

.filter-btn.reset:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--deep-navy);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
    max-height: 500px;
    overflow-y: auto;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--card-border);
}

.search-results-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--soft-white);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--slate-grey);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--soft-white);
}

.search-results-content {
    padding: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: 5px;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-thumbnail {
    width: 60px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 15px;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-details {
    flex: 1;
    min-width: 0;
}

.search-result-details h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--soft-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-creator {
    font-size: 12px;
    color: var(--slate-grey);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--slate-grey);
}

.search-result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-loading,
.search-error,
.no-results {
    padding: 30px 20px;
    text-align: center;
    color: var(--slate-grey);
}

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.search-loading .spinner-small {
    margin-bottom: 10px;
}

.search-error i,
.no-results i {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--error-color);
}

.search-tip {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.8;
}

/* ==========================================================================
   8. DEVELOPMENT CARD
   ========================================================================== */
.development-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
    border-top: 2px solid var(--warm-gold);
}

.development-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--warm-gold), var(--bantu-blue), var(--warm-gold));
    border-radius: calc(var(--border-radius-lg) + 2px);
    z-index: -1;
    opacity: 0.2;
    animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
    0% { opacity: 0.1; }
    100% { opacity: 0.3; }
}

.development-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.pulse-icon-container {
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-base);
}

.pulse-icon-container:hover,
.pulse-icon-container:focus {
    transform: scale(1.05);
}

.pulse-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pulse-icon svg {
    width: 50px;
    height: 50px;
}

.pulse-path {
    stroke: url(#pulseGradient);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: pulsePath 2.5s ease-in-out infinite;
}

@keyframes pulsePath {
    0%, 100% {
        stroke-width: 3;
        opacity: 0.9;
    }
    50% {
        stroke-width: 4;
        opacity: 1;
    }
}

.pulse-node {
    fill: var(--warm-gold);
    animation: pulseNode 2.5s ease-in-out infinite;
}

@keyframes pulseNode {
    0%, 100% {
        r: 4;
        opacity: 0.8;
    }
    50% {
        r: 5;
        opacity: 1;
    }
}

.pulse-ripple {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    animation: ripple 3s ease-in-out infinite;
}

@keyframes ripple {
    0%, 100% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.5;
    }
}

.development-content h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--soft-white), var(--warm-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.development-message {
    color: rgba(248, 250, 252, 0.85);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 16px;
}

.development-message strong {
    color: var(--warm-gold);
    font-weight: 600;
}

.cta-hint {
    color: #60a5fa;
    font-style: italic;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.cta-hint svg {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

/* ==========================================================================
   9. HERO SECTION
   ========================================================================== */
.hero {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--bantu-blue), var(--warm-gold));
    border-radius: calc(var(--border-radius-lg) + 2px);
    z-index: -1;
    opacity: 0.1;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--soft-white), var(--bantu-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: rgba(248, 250, 252, 0.8);
    margin-bottom: 25px;
    font-size: 18px;
}

.hero-btn {
    background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
    color: var(--soft-white);
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 48px;
    min-width: 140px;
}

.hero-btn:hover,
.hero-btn:focus {
    transform: translateY(-3px);
    box-shadow: var(--shadow-blue);
}

/* ==========================================================================
   10. CONTENT SECTIONS
   ========================================================================== */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--soft-white), var(--warm-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trending-title {
    position: relative;
}

.trending-badge {
    background: linear-gradient(135deg, #EF4444, #F59E0B);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 20px;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

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

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

.time-filter {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px;
}

.time-btn {
    padding: 6px 12px;
    border-radius: 50px;
    background: transparent;
    border: none;
    color: var(--slate-grey);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.time-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.time-btn.active {
    background: var(--bantu-blue);
    color: white;
}

.see-all-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--warm-gold);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 40px;
}

.see-all-btn:hover,
.see-all-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--warm-gold);
}

/* ==========================================================================
   11. ENHANCED CONTENT CARDS & GRID - IMPROVED FOR DESKTOP
   ========================================================================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    transition: all var(--transition-base);
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    contain: layout style paint; /* Performance optimization */
    animation: fadeIn 0.5s ease;
}

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

.content-card:hover,
.content-card:focus-within {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(245, 158, 11, 0.3);
}

.card-thumbnail {
    position: relative;
    height: 160px; /* Increased for desktop */
    overflow: hidden;
    background: var(--deep-navy);
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
    background: var(--deep-navy);
}

.content-card:hover .card-thumbnail img,
.content-card:focus-within .card-thumbnail img {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.trending-badge-small {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #EF4444, #F59E0B);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

.share-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--warm-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all var(--transition-base);
    font-size: 0;
}

.share-btn::before {
    content: attr(aria-label);
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.share-btn:hover,
.share-btn:focus {
    background: rgba(245, 158, 11, 0.2);
    transform: scale(1.1);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    color: var(--soft-white);
    line-height: 1.4;
}

.creator-btn {
    background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
    color: var(--soft-white);
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 32px;
    margin-bottom: 10px;
}

.creator-btn:hover,
.creator-btn:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

.card-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--slate-grey);
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Fallback states */
.trending-fallback,
.recommended-fallback,
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--slate-grey);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    border: 1px dashed var(--card-border);
}

.trending-fallback i,
.recommended-fallback i,
.empty-state i {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--slate-grey);
    opacity: 0.5;
}

/* ==========================================================================
   12. INFINITE SCROLL SENTINEL
   ========================================================================== */
.scroll-sentinel {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    margin: 20px 0;
}

.scroll-sentinel.visible {
    opacity: 1;
}

.sentinel-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sentinel-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--bantu-blue);
    animation: spin 1s linear infinite;
}

.scroll-sentinel p {
    color: var(--slate-grey);
    font-size: 14px;
}

/* ==========================================================================
   13. BROWSE ALL CTA
   ========================================================================== */
.browse-all-cta {
    text-align: center;
    margin: 50px 0;
}

.cta-button {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--soft-white);
    padding: 18px 35px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 60px;
}

.cta-button:hover,
.cta-button:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--warm-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */
.footer {
    border-top: 1px solid var(--card-border);
    padding: 30px 20px;
    text-align: center;
    color: var(--slate-grey);
    background: rgba(10, 14, 18, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.footer-links a {
    color: var(--warm-gold);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-base);
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--soft-white);
    text-decoration: underline;
    background: rgba(255, 255, 255, 0.05);
}

.footer-contact {
    margin-top: 20px;
    font-size: 14px;
    color: var(--slate-grey);
}

.footer-contact a {
    color: var(--warm-gold);
    text-decoration: none;
}

.footer-contact a:hover,
.footer-contact a:focus {
    text-decoration: underline;
}

/* ==========================================================================
   15. TOAST NOTIFICATIONS
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    color: var(--soft-white);
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.toast.error {
    background: rgba(239, 68, 68, 0.9);
}

.toast.success {
    background: rgba(16, 185, 129, 0.9);
}

.toast.info {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.toast.warning {
    background: rgba(245, 158, 11, 0.9);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================================================
   16. CUSTOM SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-navy);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bantu-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--warm-gold);
}

::-webkit-scrollbar-corner {
    background: var(--deep-black);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--bantu-blue) var(--deep-navy);
}

/* ==========================================================================
   17. ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --soft-white: #FFFFFF;
        --deep-black: #000000;
        --bantu-blue: #0000FF;
        --warm-gold: #FFD700;
        --card-border: #FFFFFF;
    }
    
    .content-card {
        border: 2px solid var(--card-border);
    }
    
    .search-bar,
    .search-filters-dropdown,
    .search-results-dropdown {
        border: 2px solid var(--card-border);
    }
    
    button,
    .icon-btn,
    .profile-btn,
    .hero-btn,
    .see-all-btn,
    .creator-btn,
    .cta-button,
    .filter-btn,
    .time-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@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;
    }
    
    .glow-cycle,
    .pulse-ripple,
    .pulse-path,
    .pulse-node,
    .cta-hint svg,
    .trending-badge,
    .content-card {
        animation: none !important;
    }
    
    .content-card:hover,
    .content-card:focus-within,
    .search-bar:focus-within,
    button:hover,
    button:focus {
        transform: none !important;
    }
    
    .content-card:hover .card-thumbnail img,
    .content-card:focus-within .card-thumbnail img {
        transform: none !important;
    }
}

/* ==========================================================================
   18. RESPONSIVE DESIGN - IMPROVED FOR LAPTOP
   ========================================================================== */

/* Large Desktop (1400px and above) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 32px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 28px;
    }
    
    .card-thumbnail {
        height: 180px;
    }
    
    .development-header {
        gap: 30px;
    }
    
    .hero {
        padding: 50px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 20px;
    }
}

/* Desktop (1024px to 1399px) */
@media (min-width: 1024px) and (max-width: 1399px) {
    .container {
        padding: 28px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 24px;
    }
    
    .card-thumbnail {
        height: 160px;
    }
    
    .header {
        padding: 12px 20px;
        gap: 20px;
    }
    
    .search-section {
        max-width: 500px;
    }
    
    .logo-text {
        font-size: 16px;
    }
}

/* Laptop (900px to 1023px) */
@media (min-width: 900px) and (max-width: 1023px) {
    .container {
        padding: 24px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .card-thumbnail {
        height: 150px;
    }
    
    .header {
        padding: 12px 16px;
        gap: 16px;
    }
    
    .search-section {
        max-width: 400px;
    }
    
    .logo-text {
        font-size: 15px;
    }
    
    .development-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .development-content h2 {
        font-size: 24px;
    }
}

/* Tablet (768px to 899px) */
@media (max-width: 899px) {
    .container {
        padding: 20px;
        max-width: 100%;
    }
    
    .header {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
        padding: 12px 16px;
        gap: 12px;
    }
    
    .logo-section {
        order: 1;
        flex: 0 0 auto;
    }
    
    .search-section {
        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
        margin: 12px 0 0 0;
    }
    
    .profile-section {
        order: 2;
        flex: 0 0 auto;
    }
    
    .search-filters-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .search-results-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 70vh;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }
    
    .development-card {
        padding: 20px;
    }
    
    .development-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .pulse-icon {
        width: 60px;
        height: 60px;
    }
    
    .pulse-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .development-content h2 {
        font-size: 22px;
    }
    
    .hero {
        padding: 30px 20px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .card-thumbnail {
        height: 120px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .trending-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .time-filter {
        order: 2;
    }
    
    .see-all-btn {
        order: 1;
    }
    
    .footer-links {
        gap: 10px;
    }
    
    .footer-links a {
        font-size: 12px;
    }
    
    /* Touch targets for mobile */
    button,
    [role="button"],
    .icon-btn,
    .profile-btn,
    .creator-btn,
    .search-result-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    .hero-btn,
    .cta-button {
        min-height: 48px;
        min-width: 120px;
        width: 100%;
        justify-content: center;
    }
    
    /* Adjust toast position for mobile */
    .toast {
        left: 20px;
        right: 20px;
        bottom: 80px;
        max-width: none;
    }
}

/* Mobile (480px to 767px) */
@media (max-width: 767px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .card-thumbnail {
        height: 100px;
    }
    
    .card-title {
        font-size: 14px;
        min-height: 36px;
    }
    
    .creator-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .card-stats {
        font-size: 11px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .development-content h2 {
        font-size: 18px;
    }
    
    .development-message {
        font-size: 14px;
    }
    
    .hero h1 {
        font-size: 20px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .time-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .card-thumbnail {
        height: 90px;
    }
    
    .card-content {
        padding: 12px;
    }
    
    .card-title {
        font-size: 13px;
        min-height: 32px;
        margin-bottom: 8px;
    }
    
    .creator-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .card-stats {
        font-size: 10px;
        gap: 8px;
    }
    
    .logo {
        gap: 8px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo-text {
        font-size: 13px;
    }
    
    .header {
        padding: 10px 12px;
    }
}

/* ==========================================================================
   19. PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* Image loading states */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Containment for performance */
.content-section {
    contain: layout style paint;
}

/* Optimize image rendering */
img {
    content-visibility: auto;
    will-change: transform;
}

/* Reduce repaints on scroll */
.header {
    will-change: transform;
}

/* Optimize animations */
@media (prefers-reduced-motion: no-preference) {
    .glow-cycle,
    .pulse-path,
    .pulse-node,
    .trending-badge {
        will-change: transform, opacity;
    }
}

/* ==========================================================================
   20. BROWSER-SPECIFIC FIXES
   ========================================================================== */

/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .header {
        -webkit-backdrop-filter: blur(20px);
    }
    
    .content-card,
    .search-filters-dropdown,
    .search-results-dropdown {
        -webkit-backdrop-filter: blur(10px);
    }
    
    /* Fix for Safari backdrop-filter with border-radius */
    .development-card,
    .hero,
    .content-card,
    .search-filters-dropdown,
    .search-results-dropdown {
        -webkit-mask-image: -webkit-radial-gradient(white, black);
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .header {
        background: rgba(10, 14, 18, 0.95);
    }
    
    /* Firefox scrollbar fix */
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--bantu-blue) var(--deep-navy);
    }
}

/* ==========================================================================
   21. UTILITY CLASSES
   ========================================================================== */

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Display Utilities */
.hidden { display: none !important; }
.visible { display: block !important; }
.flex { display: flex; }
.grid { display: grid; }

/* Spacing Utilities */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }
.p-5 { padding: 32px; }

/* Color Utilities */
.text-gold { color: var(--warm-gold); }
.text-blue { color: var(--bantu-blue); }
.text-white { color: var(--soft-white); }
.text-grey { color: var(--slate-grey); }

.bg-card { background: var(--card-bg); }
.bg-dark { background: var(--deep-black); }
.bg-navy { background: var(--deep-navy); }

/* ==========================================================================
   END OF STYLESHEET
   ========================================================================== */
