:root {
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Colors - Dynamic Palette */
    --color-bg-start: #0f172a;
    --color-bg-end: #1e293b;
    --color-sun: #fbbf24;
    --color-sun-glow: rgba(251, 191, 36, 0.2);
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-accent: #38bdf8;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 20px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background: linear-gradient(to bottom, var(--color-bg-start), var(--color-bg-end));
    height: 100vh;
    overflow: hidden;
    transition: background 1s ease;
}

/* --- Sky & Background --- */
.sky-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.cinematic-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease, transform 10s linear;
    filter: brightness(0.4) saturate(1.2);
    z-index: -1;
}

.cinematic-bg.active {
    opacity: 1;
    transform: scale(1.1);
}

.sun {
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--color-sun);
    border-radius: 50%;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 60px var(--color-sun);
    transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: sunBreathe 4s ease-in-out infinite;
}

@keyframes sunBreathe {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 0 80px var(--color-sun);
    }
}

.sun-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-sun-glow) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    transition: opacity 1s ease;
}

.heat-haze {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.1"/%3E%3C/svg%3E');
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

/* --- Main UI --- */
.app-container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.app-header {
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.brand-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text-main);
}

.brand-text .highlight {
    color: var(--color-sun);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    backdrop-filter: blur(10px);
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
}

.story-card {
    max-width: 500px;
    width: 100%;
    padding: 3rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

.story-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.story-text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.data-display {
    display: flex;
    justify-content: center;
    gap: 3rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.data-item .value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-main);
}

.god-mode-panel {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    padding: 1.5rem;
    width: 300px;
    z-index: 100;
}

/* Ticker */
.live-ticker-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    z-index: 200;
    display: flex;
    align-items: center;
    overflow: hidden;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--color-sun);
}

.ticker-content {
    display: flex;
    animation: tickerLoop 40s linear infinite;
    gap: 40px;
}

@keyframes tickerLoop {
    0% {
        transform: translateX(100vw);
    }

    100% {
        transform: translateX(-100%);
    }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Notification */
.impact-notification {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid var(--color-sun);
    padding: 1rem 2rem;
    border-radius: 4rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.impact-notification.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notif-icon {
    font-size: 1.5rem;
    background: var(--color-sun);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: rotatePulse 4s infinite;
}

@keyframes rotatePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Verification Overlay */
.verification-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.verification-btn:hover {
    color: var(--color-sun);
    border-color: var(--color-sun);
}

.proof-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-sun);
    border-radius: 24px;
    padding: 2rem;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.proof-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* Live Feed Placeholder */
.live-feed-placeholder {
    width: 100%;
    height: 120px;
    background: #000;
    margin: 1rem 0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.feed-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.6rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
}

.feed-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ef4444;
    font-size: 0.6rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Dynamic States */
body.state-warming {
    --color-bg-start: #3b82f6;
    --color-bg-end: #93c5fd;
    --color-sun: #fcd34d;
}

body.state-simmering {
    --color-bg-start: #0ea5e9;
    --color-bg-end: #bae6fd;
    --color-sun: #fbbf24;
}

body.state-cooking {
    --color-bg-start: #f59e0b;
    --color-bg-end: #fef3c7;
    --color-sun: #f59e0b;
}

body.state-high-heat {
    --color-bg-start: #ea580c;
    --color-bg-end: #ffedd5;
    --color-sun: #ef4444;
}

body.state-high-heat .clouds {
    opacity: 0;
}

/* Existing Animations */
.sun-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.05) 0deg, rgba(255, 255, 255, 0.05) 10deg, transparent 10deg, transparent 20deg);
    border-radius: 50%;
    animation: rotateRays 30s linear infinite;
    opacity: 0.4;
    z-index: -1;
}

@keyframes rotateRays {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-10vh);
        opacity: 0;
    }
}

.reveal-text {
    animation: slideUpFade 0.8s ease-out forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 2;
    opacity: 0.8;
    transition: opacity 1s ease;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    filter: blur(20px);
    animation: drift linear infinite;
}

@keyframes drift {
    from {
        transform: translateX(-200px);
    }

    to {
        transform: translateX(100vw);
    }
}