:root {
    --color-bg: #0a0e27;
    --color-surface: #151933;
    --color-text: #e0e6ff;
    --color-text-dim: #8b92b8;
    --color-primary: #00f5ff;
    --color-secondary: #ff00ff;
    --color-accent-1: #00ff88;
    --color-accent-2: #ffaa00;
    --color-accent-3: #ff4488;
    --color-accent-4: #8844ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f4d 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: pulse 4s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.08) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 900px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 245, 255, 0.5)); }
    50% { filter: drop-shadow(0 0 40px rgba(255, 0, 255, 0.5)); }
}

.hero p {
    font-size: 1.3rem;
    color: var(--color-text-dim);
    margin-bottom: 40px;
}

.scroll-indicator {
    font-size: 2rem;
    color: var(--color-primary);
    animation: bounce 2s infinite;
    margin-top: 60px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(20px); }
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
}

/* Category Sections */
.category {
    margin-bottom: 100px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.category-icon {
    font-size: 3rem;
}

.category-name {
    font-size: 2rem;
    font-weight: 700;
}

/* Fact Cards */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.fact-card {
    background: var(--color-surface);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.fact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--card-accent);
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.fact-number {
    font-size: 0.9rem;
    color: var(--card-accent);
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.fact-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text);
}

/* Color variations for categories */
.space .fact-card { --card-accent: #00f5ff; }
.animals .fact-card { --card-accent: #00ff88; }
.tech .fact-card { --card-accent: #ff00ff; }
.history .fact-card { --card-accent: #ffaa00; }
.science .fact-card { --card-accent: #ff4488; }
.geography .fact-card { --card-accent: #00d9ff; }
.sport .fact-card { --card-accent: #44ff88; }
.food .fact-card { --card-accent: #ffcc00; }

/* Footer */
.footer {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-surface);
    color: var(--color-text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
    font-size: 1rem;
    margin-bottom: 10px;
}

/* Category Links */
.category-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    font-size: 1rem;
}

.category-link {
    color: var(--color-primary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-link:hover {
    background: rgba(0, 245, 255, 0.2);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 245, 255, 0.3);
}

.separator {
    color: var(--color-text-dim);
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.2rem;
    }

    .container {
        padding: 60px 20px;
    }

    .facts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 90vh;
        padding: 30px 20px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    .category-name {
        font-size: 1.5rem;
    }

    .facts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fact-card {
        padding: 25px;
    }

    .category-links {
        flex-direction: column;
        gap: 10px;
    }

    .category-link {
        width: 100%;
        text-align: center;
    }

    .separator {
        display: none;
    }

    .container {
        padding: 40px 15px;
    }

    .category {
        margin-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero::before,
    .hero::after {
        width: 300px;
        height: 300px;
    }

    .scroll-indicator {
        font-size: 1.5rem;
        margin-top: 40px;
    }

    .category-icon {
        font-size: 2rem;
    }

    .category-name {
        font-size: 1.3rem;
    }

    .fact-card {
        padding: 20px;
    }

    .fact-number {
        font-size: 0.8rem;
    }

    .fact-text {
        font-size: 1rem;
    }

    .footer {
        padding: 40px 15px;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .facts-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    }
}
