/* ============================================================
   prototype.moe — Moe × Pixel × Prototype
   Palette:
     #4c1d95  Deep Moe Purple
     #ec4899  Sakura Pink
     #fdf2f8  Soft Blush
     #2e1065  Credits Purple
     #fbbf24  Star Gold
     #ffffff  Clean White
     #1a1a1a  UI Black
     #8b5cf6  Proto Violet
============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a1a;
    background: #fdf2f8;
    overflow-x: hidden;
}

/* ============================================================
   SPARKLE ANIMATIONS
============================================================ */
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50%       { opacity: 1; transform: scale(1) rotate(45deg); }
}

@keyframes sparkle-slow {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50%       { opacity: 0.9; transform: scale(1.2) rotate(30deg); }
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.sparkle {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fbbf24;
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle-inline {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin: 0 8px;
}

/* ============================================================
   HERO — Game Title Screen
============================================================ */
#hero {
    background: linear-gradient(135deg, #4c1d95 0%, #8b5cf6 40%, #ec4899 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 48px 24px;
}

/* Hero sparkles positioned absolutely */
.hero-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-stars .sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
}

.sparkle-1 {
    top: 18%;
    left: 12%;
    animation-delay: 0s;
    animation-duration: 2.1s;
}
.sparkle-2 {
    top: 30%;
    right: 15%;
    animation-delay: 0.6s;
    animation-duration: 1.8s;
    width: 12px;
    height: 12px;
}
.sparkle-3 {
    bottom: 35%;
    left: 20%;
    animation-delay: 1.1s;
    animation-duration: 2.4s;
}
.sparkle-4 {
    top: 55%;
    right: 22%;
    animation-delay: 0.3s;
    animation-duration: 1.6s;
    width: 10px;
    height: 10px;
}
.sparkle-5 {
    bottom: 25%;
    right: 10%;
    animation-delay: 0.9s;
    animation-duration: 2.8s;
    width: 6px;
    height: 6px;
}
.sparkle-6 {
    top: 10%;
    left: 50%;
    animation-delay: 1.5s;
    animation-duration: 2.0s;
    width: 12px;
    height: 12px;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hero-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(251, 191, 36, 0.4), 0 4px 24px rgba(0,0,0,0.3);
}

.hero-dot {
    color: #fbbf24;
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.hero-tagline {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
    margin-top: 8px;
    font-style: italic;
}

/* Blinking START prompt */
.hero-start {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: #fbbf24;
    animation: blink 1.2s step-end infinite;
    z-index: 2;
    white-space: nowrap;
}

/* ============================================================
   STAGE SELECT GRID
============================================================ */
#stage-select {
    background: #fdf2f8;
    padding: 64px 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 40px;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: #4c1d95;
    text-align: center;
}

.stage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Stage Cards */
.stage-card {
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.stage-card:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

/* Stage Banner Colors */
.stage-banner {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
}

.stage-banner-purple  { background: #4c1d95; }
.stage-banner-pink    { background: #ec4899; }
.stage-banner-violet  { background: #8b5cf6; }
.stage-banner-amber   { background: #fbbf24; }

.stage-number {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.08em;
    background: rgba(0,0,0,0.2);
    padding: 1px 7px;
    border-radius: 4px;
}

/* Amber banner: dark text for contrast */
.stage-banner-amber .stage-number {
    color: rgba(0,0,0,0.75);
    background: rgba(0,0,0,0.1);
}
.stage-banner-amber .stage-name {
    color: rgba(0,0,0,0.75);
}

.stage-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.05em;
}

.stage-body {
    padding: 20px 20px 24px;
}

.stage-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.stage-card-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4a4a4a;
    margin-bottom: 14px;
}

.stage-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

/* ============================================================
   ABOUT SECTION
============================================================ */
#about {
    background: linear-gradient(135deg, #4c1d95 0%, #8b5cf6 100%);
    padding: 80px 24px;
    position: relative;
    overflow: hidden;
}

.about-inner {
    max-width: 660px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.about-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sparkle-about {
    position: absolute;
    background: #fbbf24;
}

.sparkle-a1 {
    width: 10px;
    height: 10px;
    top: 10%;
    left: 8%;
    animation-delay: 0.4s;
    animation-duration: 2.5s;
}
.sparkle-a2 {
    width: 7px;
    height: 7px;
    top: 60%;
    right: 10%;
    animation-delay: 1.2s;
    animation-duration: 2.0s;
}
.sparkle-a3 {
    width: 12px;
    height: 12px;
    bottom: 15%;
    left: 15%;
    animation-delay: 0.8s;
    animation-duration: 3.0s;
}

.about-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
}

.about-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px;
}

.about-text strong {
    color: #fbbf24;
    font-weight: 600;
}

.about-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.1em;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 24px;
    background: rgba(255,255,255,0.07);
}

.badge-star {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fbbf24;
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    animation: sparkle 2s ease-in-out infinite;
}

/* ============================================================
   CREDITS ROLL FOOTER
============================================================ */
@keyframes creditsScroll {
    from { transform: translateY(100%); }
    to   { transform: translateY(-100%); }
}

#credits {
    background: #2e1065;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.credits-decor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 28px 24px 16px;
    position: relative;
    z-index: 2;
}

.credits-title-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: #fbbf24;
    text-transform: uppercase;
}

.credits-star {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #fbbf24;
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    animation: sparkle-slow 3s ease-in-out infinite;
}

.credits-star-left  { animation-delay: 0s; }
.credits-star-right { animation-delay: 1.5s; }

.credits-scroll-wrapper {
    height: 320px;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.credits-scroll {
    animation: creditsScroll 20s linear infinite;
    padding: 0 24px;
    text-align: center;
}

.credits-section-head {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 0.05em;
    padding: 8px 0;
}

.credits-role {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ec4899;
    margin-top: 20px;
    margin-bottom: 4px;
}

.credits-name {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.8;
}

.credits-entry {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    line-height: 2;
}

.credits-spacer {
    height: 20px;
}

.credits-footer-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px 24px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.credits-heart {
    color: #ec4899;
    font-size: 1rem;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
    .stage-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    #stage-select {
        padding: 48px 16px;
    }

    #about {
        padding: 60px 20px;
    }
}
