/* ============================================
   MODERN DARK THEME WITH GLASSMORPHISM
   ============================================ */

/* CSS Variables for Theme */
:root {
    /* Primary Colors - Purple/Cyan Gradient Theme */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-color: #00d4ff;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7b2cbf 100%);
    
    /* Background Colors - Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --text-accent: #00d4ff;
    
    /* Border & Shadow */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(102, 126, 234, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', var(--font-primary);
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   BASE STYLES & RESET
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, #fff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.25rem); }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: var(--transition-base);
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md) 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
}

/* Navigation */
.modern-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.modern-nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
}

.modern-nav a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.modern-nav a:hover,
.modern-nav a.active {
    color: var(--text-primary);
    background: var(--bg-glass);
    box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.1);
}

/* Header Buttons */
.header-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-glass);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.btn-accent {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    color: white;
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.btn-glow:hover::before {
    left: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px var(--space-lg) var(--space-3xl);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--accent-color);
    margin-bottom: var(--space-lg);
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, #fff 0%, #667eea 50%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-label {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Main Content + Sidebar Layouts */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 300px;
    gap: var(--space-xl);
}

.main-grid-sidebar {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--space-3xl);
}

.main-content-area {
    grid-column: 1 / 4;
}

.main-content-single {
    max-width: 900px;
    margin: 0 auto;
}

.content-wrapper-full {
    width: 100%;
}

@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr 1fr 300px;
    }
    .main-content-area {
        grid-column: 1 / 3;
    }
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    
    .main-grid,
    .main-grid-sidebar {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .main-content-area {
        grid-column: span 1;
    }
    
    .main-content-single {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .grid-4,
    .grid-3,
    .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-base);
}

.card:hover {
    border-color: var(--border-glow);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   FEATURE CARDS (FOR GAME SECTIONS)
   ============================================ */
.feature-card {
    background: linear-gradient(145deg, rgba(26, 26, 37, 0.9), rgba(18, 18, 26, 0.9));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-base);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.feature-card h3 {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.feature-card ul {
    list-style: none;
    padding: 0;
}

.feature-card li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.feature-card li:last-child {
    border-bottom: none;
}

.feature-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* ============================================
   ARTICLE CARDS (FOR NEWS/BLOG)
   ============================================ */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.article-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    padding: var(--space-lg);
}

.article-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.article-title a {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

.article-title a:hover {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more:hover {
    gap: var(--space-sm);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.95rem;
    min-width: 0; /* Allow text to wrap/be contained */
}

.sidebar-list a span {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

.sidebar-list a:hover {
    color: var(--accent-color);
}

.sidebar-list img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--accent-color);
}

.breadcrumbs .separator {
    color: var(--text-muted);
}

.breadcrumbs .current {
    color: var(--text-primary);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
    list-style: none;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-base);
}

.pagination a:hover {
    background: var(--bg-glass);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.pagination .current {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    padding: var(--space-lg);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
}

.faq-question:hover {
    background: var(--bg-glass);
}

.faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.modern-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand img {
    height: 40px;
    margin-bottom: var(--space-md);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* ============================================
   CONTENT STYLES
   ============================================ */
.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.content-wrapper p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.content-wrapper ul,
.content-wrapper ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
}

.content-wrapper li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.content-wrapper strong {
    color: var(--text-primary);
    font-weight: 600;
}

.content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
}

/* ============================================
   AD BANNER PLACEHOLDER
   ============================================ */
.ad-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    margin: var(--space-xl) 0;
}

.ad-banner img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-base);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .modern-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: var(--space-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
    }
    
    .modern-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .modern-nav ul {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions {
        display: none;
    }
}

/* Mobile Header Actions */
@media (max-width: 640px) {
    .header-container {
        padding: 0 var(--space-md);
    }
    
    .logo img {
        height: 35px;
    }
    
    /* Show header actions in mobile menu */
    .modern-nav.active + .header-actions,
    .modern-nav.active ~ .header-actions {
        display: none !important; /* Hide them if we have the mobile-fixed-bottom-bar */
    }
    
    .hero-section {
        min-height: 80vh;
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .section {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .card,
    .feature-card {
        padding: var(--space-lg);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .header-container {
        padding: 0 var(--space-sm);
    }
    
    .logo img {
        height: 30px;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        padding: var(--space-xs);
    }
    
    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
    }
    
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .glass-card,
    .card {
        padding: var(--space-md);
    }
    
    .sidebar {
        position: static;
    }
    
    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 var(--space-sm);
        font-size: 0.85rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ============================================
   MOBILE FIXED BOTTOM BAR
   ============================================ */
.mobile-fixed-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

.mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    flex: 1;
    max-width: 160px;
    text-align: center;
}

.mobile-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mobile-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

.mobile-btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.mobile-btn-secondary:hover {
    background: var(--bg-glass);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

/* Show on mobile devices only */
@media (max-width: 768px) {
    .mobile-fixed-bottom-bar {
        display: flex !important;
    }
    
    /* Add padding to footer to prevent content from being hidden behind the bar */
    .modern-footer {
        padding-bottom: calc(var(--space-3xl) + 80px);
    }
    
    /* Adjust back to top button position on mobile */
    .back-to-top {
        bottom: 80px;
    }
}

/* Landscape mode adjustment */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-fixed-bottom-bar {
        padding: 8px 16px;
    }
    
    .mobile-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* Stagger animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.hidden { display: none; }
.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;
}
