/* ============================================
   ORION'S 9TH BIRTHDAY — SPACE × MINECRAFT
   ============================================ */

:root {
    /* Space palette */
    --void: #060818;
    --deep-space: #0a0e27;
    --nebula-dark: #141852;
    --nebula: #1e2a78;
    --nebula-light: #3b4cc0;
    --star-white: #f0f0ff;
    --star-warm: #fbbf24;
    --star-blue: #7dd3fc;

    /* Minecraft palette */
    --mc-green: #5daa3a;
    --mc-green-light: #7bc74d;
    --mc-green-dark: #3b7a1a;
    --mc-dirt: #866043;
    --mc-dirt-dark: #593d2a;
    --mc-diamond: #2ed8d8;
    --mc-gold: #fcdb05;
    --mc-obsidian: #1b1033;
    --mc-lapis: #2546a8;
    --mc-redstone: #c62828;
    --mc-emerald: #17d651;

    /* Ender/portal purple */
    --ender: #9b59b6;
    --ender-glow: #c084fc;

    /* Typography */
    --font-pixel: 'Press Start 2P', monospace;
    --font-body: 'Quicksand', sans-serif;

    /* Spacing */
    --section-pad: clamp(3rem, 8vh, 6rem);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--star-white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ---- Starfield Canvas ---- */
#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---- Floating Minecraft Blocks ---- */
.floating-blocks {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.mc-block {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    opacity: 0.25;
    animation: float var(--duration) ease-in-out var(--delay) infinite;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.mc-block.grass {
    background:
        linear-gradient(to bottom, var(--mc-green) 0%, var(--mc-green) 35%, var(--mc-dirt) 35%, var(--mc-dirt) 100%);
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.2);
}
.mc-block.diamond {
    background: var(--mc-diamond);
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.2), inset 4px 4px 0 rgba(255,255,255,0.2);
}
.mc-block.obsidian {
    background: var(--mc-obsidian);
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.3), inset 4px 4px 0 rgba(100,50,150,0.2);
}
.mc-block.gold {
    background: var(--mc-gold);
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.2), inset 4px 4px 0 rgba(255,255,255,0.3);
}
.mc-block.emerald {
    background: var(--mc-emerald);
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.2), inset 4px 4px 0 rgba(255,255,255,0.2);
}
.mc-block.lapis {
    background: var(--mc-lapis);
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.25), inset 4px 4px 0 rgba(150,180,255,0.2);
}
.mc-block.redstone {
    background: var(--mc-redstone);
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.25), inset 4px 4px 0 rgba(255,100,100,0.2);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(3deg); }
    50% { transform: translateY(-8px) rotate(-2deg); }
    75% { transform: translateY(-25px) rotate(1deg); }
}

/* ---- Main content layer ---- */
main {
    position: relative;
    z-index: 2;
}

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

/* Orion constellation behind hero */
.constellation {
    position: absolute;
    width: clamp(250px, 40vw, 400px);
    height: auto;
    opacity: 0.15;
    z-index: 0;
    animation: constellationPulse 6s ease-in-out infinite;
}

.constellation-line {
    stroke: var(--star-blue);
    stroke-width: 1;
    opacity: 0.6;
    stroke-dasharray: 4 4;
}

.constellation-line.belt {
    stroke: var(--star-warm);
    stroke-width: 1.5;
    opacity: 0.8;
}

.star-dot {
    fill: var(--star-white);
    filter: drop-shadow(0 0 4px var(--star-blue));
    animation: twinkle 3s ease-in-out infinite;
}

.star-dot.bright {
    fill: var(--star-warm);
    r: 5;
    filter: drop-shadow(0 0 8px var(--star-warm));
}

.star-dot.belt-star {
    fill: var(--star-warm);
    filter: drop-shadow(0 0 6px var(--star-warm));
}

@keyframes constellationPulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

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

.hero-content {
    position: relative;
    z-index: 1;
    animation: heroEntrance 1.2s ease-out both;
}

@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pixel-badge {
    font-family: var(--font-pixel);
    font-size: clamp(0.55rem, 1.5vw, 0.75rem);
    background: var(--mc-green);
    color: #fff;
    padding: 0.6em 1.5em;
    display: inline-block;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    box-shadow:
        4px 4px 0 var(--mc-green-dark),
        inset -2px -2px 0 rgba(0,0,0,0.2);
    animation: badgeBounce 2s ease-in-out 1.5s infinite;
}

@keyframes badgeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.hero-title {
    font-family: var(--font-pixel);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.title-line-1 {
    display: block;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    color: var(--star-white);
    text-shadow:
        0 0 20px rgba(125, 211, 252, 0.5),
        0 0 60px rgba(125, 211, 252, 0.2),
        3px 3px 0 var(--nebula-dark);
}

.title-line-2 {
    display: block;
    font-size: clamp(3rem, 10vw, 7rem);
    background: linear-gradient(180deg, var(--mc-gold) 0%, var(--star-warm) 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.5));
    line-height: 1.2;
}

.title-line-2 .th {
    font-size: 0.35em;
    vertical-align: super;
}

.title-line-3 {
    display: block;
    font-size: clamp(1.2rem, 3.5vw, 2.5rem);
    color: var(--ender-glow);
    text-shadow:
        0 0 30px rgba(192, 132, 252, 0.4),
        3px 3px 0 var(--nebula-dark);
}

.hero-subtitle {
    font-family: var(--font-pixel);
    font-size: clamp(0.45rem, 1.2vw, 0.65rem);
    color: var(--mc-diamond);
    letter-spacing: 3px;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.6s both;
}

.hero-date {
    font-family: var(--font-pixel);
    font-size: clamp(0.6rem, 1.5vw, 0.85rem);
    color: var(--star-warm);
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.9s both;
}

.date-icon {
    display: inline-block;
    animation: spin 4s linear infinite;
    margin: 0 0.5em;
}

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

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

/* Creeper face pixel art */
.creeper-face {
    position: absolute;
    bottom: 15%;
    right: 8%;
    opacity: 0.12;
    animation: creeperFloat 10s ease-in-out infinite;
}

.creeper-row {
    display: flex;
    gap: 0;
}

.creeper-row i {
    display: block;
    width: clamp(6px, 1vw, 10px);
    height: clamp(6px, 1vw, 10px);
    background: var(--mc-green-light);
}

.creeper-row i.g {
    background: var(--mc-green-dark);
}

@keyframes creeperFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Scroll CTA */
.scroll-cta {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--star-white);
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    letter-spacing: 2px;
    opacity: 0.5;
    transition: opacity 0.3s;
    animation: fadeUp 0.8s ease-out 1.5s both;
}

.scroll-cta:hover { opacity: 1; }

.arrow-down {
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--mc-green);
    border-bottom: 2px solid var(--mc-green);
    transform: rotate(45deg);
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(5px); }
}

/* ---- Section Titles ---- */
.section-title {
    font-family: var(--font-pixel);
    font-size: clamp(0.7rem, 2vw, 1.1rem);
    text-align: center;
    color: var(--mc-diamond);
    letter-spacing: 3px;
    margin-bottom: 2.5rem;
    text-shadow: 0 0 20px rgba(46, 216, 216, 0.3);
}

/* ---- COUNTDOWN ---- */
.countdown-section {
    padding: var(--section-pad) 2rem;
    text-align: center;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.countdown-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: rgba(20, 24, 82, 0.6);
    border: 2px solid rgba(93, 170, 58, 0.3);
    padding: clamp(0.8rem, 2vw, 1.5rem) clamp(1rem, 3vw, 2rem);
    min-width: clamp(70px, 15vw, 120px);
    backdrop-filter: blur(8px);
    box-shadow:
        0 0 20px rgba(93, 170, 58, 0.1),
        inset 0 0 20px rgba(93, 170, 58, 0.05);
}

.countdown-num {
    font-family: var(--font-pixel);
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    color: var(--mc-green-light);
    text-shadow: 0 0 15px rgba(123, 199, 77, 0.5);
}

.countdown-label {
    font-family: var(--font-pixel);
    font-size: clamp(0.35rem, 0.8vw, 0.5rem);
    color: var(--star-blue);
    letter-spacing: 2px;
}

.countdown-sep {
    font-family: var(--font-pixel);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--ender-glow);
    animation: blink 1s step-end infinite;
    align-self: flex-start;
    padding-top: clamp(0.8rem, 2vw, 1.5rem);
}

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

.countdown-note {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: rgba(240, 240, 255, 0.6);
    font-weight: 500;
}

/* ---- INFO SECTION ---- */
.info-section {
    padding: var(--section-pad) 2rem;
    display: flex;
    justify-content: center;
}

.info-card {
    max-width: 640px;
    width: 100%;
    background: linear-gradient(135deg, rgba(20, 24, 82, 0.7) 0%, rgba(27, 16, 51, 0.7) 100%);
    border: 2px solid rgba(155, 89, 182, 0.3);
    padding: clamp(2rem, 4vw, 3rem);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--mc-green), var(--mc-diamond), var(--ender-glow), var(--mc-green));
    background-size: 200% 100%;
    animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.info-card h3 {
    font-family: var(--font-pixel);
    font-size: clamp(0.55rem, 1.5vw, 0.8rem);
    color: var(--star-warm);
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(240, 240, 255, 0.8);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 500;
}

.info-highlights {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--mc-green);
    font-size: 0.95rem;
    font-weight: 500;
}

.info-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Pickaxe icon (CSS pixel art) */
.pickaxe-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 1.5rem;
    position: relative;
    opacity: 0.6;
}

.pickaxe-icon::before {
    content: '\26CF';
    font-size: 2rem;
    color: var(--mc-diamond);
}

/* ---- SIGNUP SECTION ---- */
.signup-section {
    padding: var(--section-pad) 2rem;
    max-width: 560px;
    margin: 0 auto;
}

.signup-intro {
    text-align: center;
    font-size: 1rem;
    color: rgba(240, 240, 255, 0.7);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    font-weight: 500;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    letter-spacing: 2px;
    color: var(--star-blue);
}

.optional {
    color: rgba(240, 240, 255, 0.35);
}

.form-group input {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.9rem 1rem;
    background: rgba(20, 24, 82, 0.5);
    border: 2px solid rgba(93, 170, 58, 0.25);
    color: var(--star-white);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input::placeholder {
    color: rgba(240, 240, 255, 0.25);
    font-weight: 400;
}

.form-group input:focus {
    border-color: var(--mc-green);
    box-shadow: 0 0 15px rgba(93, 170, 58, 0.2), inset 0 0 15px rgba(93, 170, 58, 0.05);
}

.form-group input.invalid {
    border-color: var(--mc-redstone);
    box-shadow: 0 0 10px rgba(198, 40, 40, 0.2);
}

.field-error {
    font-family: var(--font-pixel);
    font-size: 0.4rem;
    color: var(--mc-redstone);
    letter-spacing: 1px;
    min-height: 1rem;
}

.submit-btn {
    font-family: var(--font-pixel);
    font-size: clamp(0.55rem, 1.2vw, 0.7rem);
    letter-spacing: 2px;
    padding: 1.2rem 2rem;
    margin-top: 0.5rem;
    background: var(--mc-green);
    color: #fff;
    border: none;
    cursor: pointer;
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow:
        0 4px 0 var(--mc-green-dark),
        0 6px 20px rgba(93, 170, 58, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 var(--mc-green-dark),
        0 8px 30px rgba(93, 170, 58, 0.4);
}

.submit-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 var(--mc-green-dark),
        0 3px 10px rgba(93, 170, 58, 0.2);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---- Success / Error states ---- */
.signup-success,
.signup-error {
    text-align: center;
    padding: 2rem 0;
    animation: fadeUp 0.5s ease-out both;
}

.signup-success h3 {
    font-family: var(--font-pixel);
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    color: var(--mc-green-light);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(123, 199, 77, 0.4);
}

.signup-success p {
    font-size: 1.05rem;
    color: rgba(240, 240, 255, 0.8);
    line-height: 1.7;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.success-sub {
    color: rgba(240, 240, 255, 0.5) !important;
    font-size: 0.9rem !important;
}

.success-animation {
    margin-bottom: 1.5rem;
}

.success-star {
    font-size: 3rem;
    display: inline-block;
    animation: successPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both,
               spin 8s linear 0.6s infinite;
}

@keyframes successPop {
    from { transform: scale(0) rotate(-180deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.another-btn,
.retry-btn {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    letter-spacing: 1px;
    padding: 0.8rem 1.5rem;
    margin-top: 1.5rem;
    background: transparent;
    border: 2px solid var(--mc-green);
    color: var(--mc-green-light);
    cursor: pointer;
    transition: all 0.3s;
}

.another-btn:hover,
.retry-btn:hover {
    background: var(--mc-green);
    color: #fff;
}

.signup-error h3 {
    font-family: var(--font-pixel);
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    color: var(--mc-redstone);
    margin-bottom: 1rem;
}

.signup-error p {
    color: rgba(240, 240, 255, 0.7);
    margin-bottom: 1rem;
}

.retry-btn {
    border-color: var(--mc-redstone);
    color: var(--mc-redstone);
}

.retry-btn:hover {
    background: var(--mc-redstone);
    color: #fff;
}

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding: 3rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-stars {
    color: var(--star-warm);
    font-size: 0.7rem;
    letter-spacing: 1em;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.site-footer p {
    font-family: var(--font-pixel);
    font-size: 0.45rem;
    color: rgba(240, 240, 255, 0.3);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.footer-small {
    font-family: var(--font-body) !important;
    font-size: 0.8rem !important;
    color: rgba(240, 240, 255, 0.15) !important;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .creeper-face { display: none; }

    .countdown {
        gap: 0.4rem;
    }

    .countdown-sep {
        font-size: 1rem;
        padding-top: 0.6rem;
    }

    .mc-block {
        width: 25px;
        height: 25px;
        opacity: 0.15;
    }

    .info-item {
        font-size: 0.85rem;
    }

    .constellation {
        width: 200px;
        opacity: 0.1;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .creeper-face {
        right: 3%;
        bottom: 10%;
    }
}

/* ---- Utility: hidden ---- */
[hidden] {
    display: none !important;
}
