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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

/* Video Intro */
#video-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 1s ease-out;
}

#video-intro.fade-out {
    opacity: 0;
    pointer-events: none;
}

.supernova-burst {
    position: relative;
    width: 300px;
    height: 300px;
}

.burst-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #fff, #ffaa00, #ff4400);
    border-radius: 50%;
    animation: coreExplosion 3s ease-out forwards;
}

@keyframes coreExplosion {
    0% {
        width: 5px;
        height: 5px;
        opacity: 1;
        box-shadow: 0 0 20px #fff;
    }
    50% {
        width: 300px;
        height: 300px;
        opacity: 1;
        box-shadow: 0 0 200px #ff4400, 0 0 400px #ff4400;
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
        box-shadow: 0 0 300px #ff4400;
    }
}

.burst-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #ff6b35;
    border-radius: 50%;
    animation: ringExpand 3s ease-out forwards;
}

.burst-ring:nth-child(2) { animation-delay: 0.2s; }
.burst-ring:nth-child(3) { animation-delay: 0.4s; border-color: #ffaa00; }
.burst-ring:nth-child(4) { animation-delay: 0.6s; border-color: #ff4400; }

@keyframes ringExpand {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 800px;
        height: 800px;
        opacity: 0;
    }
}

/* Main Content */
#main-content {
    opacity: 0;
    transition: opacity 1s ease-in;
}

#main-content.visible {
    opacity: 1;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

/* Starfield background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Hero Section */
#hero {
    flex-direction: column;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.15), transparent 70%);
}

.hero-star {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #ff6b35, #f7931e);
    border-radius: 50%;
    box-shadow: 0 0 80px #ff6b35, 0 0 160px #ff6b35, 0 0 240px rgba(255, 107, 53, 0.5);
    margin-bottom: 4rem;
    animation: starGlow 4s ease-in-out infinite;
}

@keyframes starGlow {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.9;
        box-shadow: 0 0 80px #ff6b35, 0 0 160px #ff6b35, 0 0 240px rgba(255, 107, 53, 0.5);
    }
    50% { 
        transform: scale(1.3); 
        opacity: 1;
        box-shadow: 0 0 120px #ff6b35, 0 0 240px #ff6b35, 0 0 360px rgba(255, 107, 53, 0.8);
    }
}

.hero-text {
    max-width: 900px;
}

.hero-text h1 {
    font-size: 2.8rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 3rem;
    animation: fadeInUp 1.5s ease-out;
}

.hero-text h2 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
    animation: fadeInUp 1.5s ease-out 0.3s backwards;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    animation: bounce 2s infinite;
    font-size: 2.5rem;
    opacity: 0.5;
}

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

/* Content sections */
.content {
    max-width: 1000px;
    z-index: 1;
    opacity: 0;
    transform: translateY(80px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.content.visible {
    opacity: 1;
    transform: translateY(0);
}

.content h2 {
    font-size: 2.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
    line-height: 1.8;
}

.content p {
    font-size: 1.4rem;
    line-height: 2;
    font-weight: 300;
    opacity: 0.9;
}

/* Graph Section */
#drop {
    flex-direction: column;
    background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.08), transparent 80%);
}

.graph-wrapper {
    width: 100%;
    max-width: 1200px;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

#magnitudeGraph {
    width: 100%;
    height: 400px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s ease-out 0.3s;
}

.graph-wrapper.visible #magnitudeGraph {
    opacity: 1;
    transform: scale(1);
}

.graph-caption {
    text-align: center;
    margin-top: 2rem;
    font-size: 1.8rem;
    color: #ff6b35;
    font-weight: 500;
    opacity: 0;
    transition: opacity 1s ease-out 0.8s;
}

.graph-wrapper.visible .graph-caption {
    opacity: 1;
}

/* Question Section */
#question {
    background: radial-gradient(circle at center, rgba(255, 107, 53, 0.15), transparent);
}

#question .content {
    text-align: center;
}

#question h2 {
    font-size: 3.2rem;
    font-style: italic;
    background: linear-gradient(135deg, #ff6b35, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.5;
}

/* Reveal Section */
#reveal .insight {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(247, 147, 30, 0.1));
    border-left: 4px solid #ff6b35;
    padding: 2.5rem;
    margin-top: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
}

.insight strong {
    color: #ff6b35;
    font-size: 1.5rem;
}

/* Final Section - Cinematic Ending */
#final {
    background: radial-gradient(circle at center, rgba(255, 107, 53, 0.1), transparent 70%);
    flex-direction: column;
}

.final-star-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 300px;
    margin-bottom: 3rem;
}

.final-betelgeuse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #ff6b35, #f7931e);
    border-radius: 50%;
    box-shadow: 0 0 100px #ff6b35, 0 0 200px #ff6b35;
    animation: finalPulse 6s ease-in-out infinite;
}

@keyframes finalPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(0.4);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.orbit-line {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px dashed rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-line:nth-child(2) {
    width: 200px;
    height: 200px;
}

.orbit-line:nth-child(3) {
    width: 350px;
    height: 350px;
}

.orbit-line:nth-child(4) {
    width: 500px;
    height: 500px;
}

#final .content {
    text-align: center;
    font-size: 1.6rem;
    font-style: italic;
    font-weight: 300;
    max-width: 800px;
}

.final-quote {
    font-size: 2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.final-subtext {
    font-size: 1.3rem;
    opacity: 0.7;
    margin-top: 2rem;
}

.distance-text {
    margin-top: 3rem;
    font-size: 1rem;
    opacity: 0.5;
    font-style: normal;
}

/* Footer */
#footer {
    background: rgba(10, 10, 20, 0.8);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 107, 53, 0.2);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-data {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.footer-data a {
    color: #ff6b35;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-data a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 107, 53, 0.1);
}

.footer-links a:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.footer-links svg {
    width: 20px;
    height: 20px;
}

.footer-credit {
    font-size: 0.9rem;
    opacity: 0.5;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text h2 {
        font-size: 2.8rem;
    }
    
    .content h2 {
        font-size: 1.8rem;
    }
    
    .content p {
        font-size: 1.2rem;
    }
    
    #question h2 {
        font-size: 2.2rem;
    }

    .final-quote {
        font-size: 1.6rem;
    }

    .graph-wrapper {
        padding: 1rem;
    }

    #magnitudeGraph {
        height: 300px;
    }
}
