/* =====================================================
   YouNiverse Data Story - Cosmic Theme CSS
   ===================================================== */

/* CSS Variables */
:root {
    --bg-dark: #0a0a1a;
    --bg-card: rgba(20, 20, 40, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #e2e2ed;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Animated Stars Background */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle fill="%23ffffff" cx="50" cy="50" r="0.5" opacity="0.8"/></svg>') repeat;
    background-size: 200px 200px;
    animation: animateStars 100s linear infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle fill="%23ffffff" cx="30" cy="70" r="0.3" opacity="0.5"/></svg>') repeat;
    background-size: 300px 300px;
    animation: animateStars 150s linear infinite;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle fill="%238b5cf6" cx="70" cy="30" r="0.4" opacity="0.6"/></svg>') repeat;
    background-size: 250px 250px;
    animation: animateStars 200s linear infinite;
}

@keyframes animateStars {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    font-size: 1.5rem;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-purple);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #8b5cf6 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(139, 92, 246, 0.5);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
}

.arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent-purple);
    border-bottom: 2px solid var(--accent-purple);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(10px); }
    60% { transform: translateY(5px); }
}

/* Main Content */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Sections */
.section {
    margin-bottom: 6rem;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.section-number {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin: 2rem 0 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Highlighted text */
.highlight {
    color: var(--accent-purple);
    font-weight: 600;
}

/* Quote blocks */
.quote {
    border-left: 3px solid var(--accent-purple);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-primary);
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, #0d1849ff 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color : #ffffff;
}

.stat-number {
    font-family: var(--font-display), "Inter", "Arial", sans-serif;
    font-size: 3em;
    font-weight: bold;
    color: #0b0000ff;
    margin-bottom: 10px;

    /* The Gradient Logic */
    background: var(--gradient-1);
    -webkit-text-fill-color: transparent;
    background-clip: text;

    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;


    /* THE FIXES: */
    display: inline-block;           /* Fixes mask calculation for small glyphs */
    line-height: 1.1;                /* Prevents vertical clipping of the % sign */
    padding: 0 0.05em;               /* Gives the '.' and '%' a tiny bit of horizontal room */
}
.stat-label {
    margin-top: 0.5rem;
    color: rgba(255,255,255,0.8);
    font-size: 1em;
}

/* Visualization containers */
.viz-container {
    background: #1A1A1A;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 40px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.viz-network {
    background: #000000;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 40px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
#full-network-viz,
#interactive-core-viz {
    border-radius: 14px;     /* match card radius */
    overflow: hidden;
}

.viz-container iframe {
    display: block;          /* removes inline baseline gap */
    border: none !important; /* kills default iframe border */
    background: #050505;     /* matches graph background */
}


.viz-title {
    font-family: var(--font-display);
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    padding-top:20px;
}

.viz-placeholder {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-style: italic;
}



.insight-box {
    background: #132f34ff;
    padding: 15px;
    border-left: 4px solid #17a2b8;
    margin: 20px 0;
    color: #ffffff;
    border-radius: 4px;
}

/* Question cards */
.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.question-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.question-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.question-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.question-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.question-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Images */
.image-container {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    margin-top: 4rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.team {
    font-family: var(--font-display);
    color: var(--accent-purple) !important;
}

.credits {
    font-size: 0.85rem;
    color: var(--text-secondary) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .section {
        padding: 2rem 1.5rem;
    }
    
    .content {
        padding: 2rem 1rem;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

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

/* Utility classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
