/* ===========================
   Achievements Page - Arcade Style
   Same cream/yellow as index.html
   =========================== */
:root {
    --bg-cream:    #FFF9E6;
    --bg-light:    #FFFDE7;
    --cab-white:   #FFFFFF;
    --cab-border:  #1A1A1A;
    --screen-bg:   #FFFFF0;
    --screen-line: rgba(0,0,0,0.04);
    --accent-org:  #FF8C00;
    --accent-yel:  #FFCC00;
    --accent-red:  #E53935;
    --accent-grn:  #2E7D32;
    --text-dark:   #1A1A1A;
    --text-mid:    #4A4A4A;
    --text-muted:  #9A9A9A;
    --shadow:      5px 5px 0px #1A1A1A;
    --shadow-sm:   3px 3px 0px #1A1A1A;
    --font-retro:  'Press Start 2P', monospace;
    --font-head:   'Space Grotesk', sans-serif;
    --font-body:   'Inter', sans-serif;
    --transition:  0.25s cubic-bezier(0.4,0,0.2,1);
    --bounce:      0.35s cubic-bezier(0.34,1.56,0.64,1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-cream);
    background-image: radial-gradient(circle at 30% 20%, rgba(255,204,0,0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(255,140,0,0.10) 0%, transparent 50%);
    min-height: 100vh;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { text-decoration:none; color:inherit; }
ul { list-style:none; }
button { cursor:pointer; font-family:var(--font-body); border:none; }

/* ===========================
   Navbar
   =========================== */
.navbar {
    position: fixed; top:0; left:0; right:0;
    z-index: 1000;
    background: #1A1A1A;
    border-bottom: 2px solid rgba(255,255,255,0.06);
}
.nav-container {
    max-width: 1200px; margin:0 auto;
    padding: 0 2rem; height:64px;
    display:flex; align-items:center; justify-content:space-between;
}
.nav-logo { display:flex; align-items:center; }
.logo-circle {
    width:36px; height:36px; border-radius:50%;
    border: 2.5px solid #FF5722;
    display:flex; align-items:center; justify-content:center;
    transition: transform var(--bounce);
}
.logo-circle:hover { transform:scale(1.1) rotate(15deg); }
.logo-dot { width:12px; height:12px; border-radius:50%; background:#FF5722; }
.nav-links { display:flex; align-items:center; gap:0.2rem; }
.nav-link {
    padding:0.5rem 0.85rem; font-size:0.875rem; font-weight:500;
    color:#CCCCCC; border-radius:6px; transition:all var(--transition); position:relative;
}
.nav-link:hover, .nav-link.active { color:#fff; background:rgba(255,255,255,0.08); }
.nav-link.active::after {
    content:''; position:absolute; bottom:2px; left:50%; transform:translateX(-50%);
    width:18px; height:2px; background:#FF5722; border-radius:2px;
}
.nav-cta {
    padding:0.55rem 1.4rem; font-size:0.85rem; font-weight:600;
    color:#fff; background:#FF5722; border-radius:9999px;
    transition:all var(--transition);
}
.nav-cta:hover { background:#e64a19; transform:translateY(-1px); }
.nav-toggle { display:none; flex-direction:column; gap:5px; background:none; border:none; padding:4px; }
.nav-toggle span { width:24px; height:2px; background:#fff; border-radius:2px; }

/* ===========================
   Page Layout
   =========================== */
.page {
    padding: 92px 1.5rem 3rem;
    display:flex; flex-direction:column; align-items:center; gap:1.5rem;
}

/* ===========================
   Header
   =========================== */
.page-header { text-align:center; }
.arcade-title {
    font-family: var(--font-retro);
    font-size: clamp(0.9rem, 3vw, 1.6rem);
    color: var(--text-dark);
    letter-spacing: 0.06em;
    text-shadow:
        3px 3px 0 var(--accent-yel),
        6px 6px 0 rgba(0,0,0,0.1);
    line-height: 1.5;
}
.arcade-sub {
    font-family: var(--font-retro);
    font-size: 0.5rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    animation: blink 1.5s steps(1) infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.credits-row {
    display:flex; align-items:center; justify-content:center; gap:0.35rem;
    margin-top: 0.65rem;
}
.credits-label {
    font-family: var(--font-retro);
    font-size: 0.52rem;
    color: var(--text-dark);
    border: 2px solid var(--cab-border);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--accent-yel);
    box-shadow: var(--shadow-sm);
}
.credit-coin {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--accent-org);
    border: 2.5px solid var(--cab-border);
    box-shadow: var(--shadow-sm);
    display:inline-block;
}

/* ===========================
   Arcade Cabinet
   =========================== */
.arcade-cabinet {
    width: 100%; max-width: 600px;
    background: var(--cab-white);
    border: 3px solid var(--cab-border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: riseUp 0.5s ease-out both;
}
@keyframes riseUp {
    from { opacity:0; transform:translateY(24px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Screen Top Bar */
.screen-topbar {
    display:flex; align-items:center; justify-content:space-between;
    padding: 0.55rem 1rem;
    background: var(--bg-cream);
    border-bottom: 2px solid var(--cab-border);
}
.stage-label, .score-label {
    font-family: var(--font-retro);
    font-size: 0.48rem;
    color: var(--text-muted);
}
.playing-label {
    font-family: var(--font-retro);
    font-size: 0.48rem;
    color: var(--accent-grn);
    animation: blink 2s steps(1) infinite;
}

/* Arcade Screen */
.arcade-screen {
    padding: 1.5rem 1.5rem 1rem;
    background: var(--screen-bg);
    background-image: repeating-linear-gradient(
        0deg,
        transparent, transparent 27px,
        var(--screen-line) 27px, var(--screen-line) 28px
    );
    min-height: 320px;
    display:flex; align-items:center; justify-content:center;
    border-bottom: 2px solid var(--cab-border);
}

/* Achievement Card */
.ach-card {
    text-align: center;
    display:flex; flex-direction:column; align-items:center; gap:0.9rem;
    animation: cardIn 0.35s ease-out both;
    width: 100%;
}
@keyframes cardIn {
    from { opacity:0; transform:scale(0.95); }
    to   { opacity:1; transform:scale(1); }
}

.ach-icon-wrap {
    width: 72px; height: 72px;
    border: 3px solid var(--cab-border);
    border-radius: 12px;
    background: var(--bg-cream);
    display:flex; align-items:center; justify-content:center;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.ach-emoji { font-size: 2.4rem; line-height:1; }

.ach-quote {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-mid);
    max-width: 440px;
    position: relative;
    padding: 0 0.5rem;
}
.ach-quote::before {
    content: '\201C\201C';
    color: var(--accent-org);
    font-size: 1.3rem;
    font-weight: 900;
    margin-right: 0.15rem;
    vertical-align: -3px;
}
.ach-quote::after {
    content: '\201D';
    color: var(--accent-org);
    font-size: 1.3rem;
    font-weight: 900;
    margin-left: 0.1rem;
    vertical-align: -3px;
}

.ach-stars { display:flex; gap:0.35rem; justify-content:center; }
.star-sq {
    width: 22px; height: 22px;
    background: var(--accent-yel);
    border: 2px solid var(--cab-border);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--bounce);
}
.star-sq:hover { transform:scale(1.15) rotate(5deg); }

.ach-name-box {
    border: 2.5px solid var(--cab-border);
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    background: var(--cab-white);
    box-shadow: var(--shadow-sm);
    min-width: 220px;
}
.ach-name {
    font-family: var(--font-head);
    font-size: 1rem; font-weight:900;
    letter-spacing: 0.04em;
    color: var(--text-dark);
}
.ach-cat {
    font-size: 0.72rem; font-weight:500;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Screen Bottom Dots */
.screen-bottombar {
    display:flex; gap:0.45rem; justify-content:center;
    padding: 0.6rem;
    background: var(--bg-cream);
    border-bottom: 2px solid var(--cab-border);
}
.dot-ind-ach {
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--cab-border);
    background: transparent; cursor:pointer;
    transition: all var(--transition);
}
.dot-ind-ach.active { background: var(--cab-border); }

/* Controls Panel */
.controls-panel {
    display:flex; align-items:center; justify-content:space-between;
    padding: 0.9rem 1.2rem;
    background: #EAEAEA;
    border-bottom: 2px solid var(--cab-border);
    gap: 1rem;
}
.ctrl-left, .ctrl-right { flex-shrink:0; }
.ctrl-mid { display:flex; gap:0.5rem; flex:1; justify-content:center; }

/* Joystick */
.joystick {
    width: 58px; height: 58px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #888, #444);
    border: 3px solid #222;
    box-shadow: 0 4px 0 #222, 0 6px 8px rgba(0,0,0,0.35);
    display:flex; align-items:center; justify-content:center;
    transition: all var(--bounce);
}
.joystick:hover { transform:scale(1.06); }
.joystick:active { transform:scale(0.93); box-shadow:0 2px 0 #222; }
.joystick-ball {
    width: 18px; height: 18px; border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #aaa, #555);
}

/* Control Buttons */
.ctrl-btn {
    width: 42px; height: 42px; border-radius: 50%;
    font-size: 1rem; font-weight: 700; color: #fff;
    border: 3px solid #1A1A1A;
    box-shadow: 0 4px 0 #1A1A1A;
    transition: all var(--bounce);
    display:flex; align-items:center; justify-content:center;
}
.ctrl-btn:hover { transform:scale(1.08); }
.ctrl-btn:active { transform:translateY(3px); box-shadow:0 1px 0 #1A1A1A; }
.ctrl-btn.orange { background: var(--accent-org); }
.ctrl-btn.red    { background: var(--accent-red); }

/* Boost button */
.boost-btn {
    padding: 0.45rem 0.8rem;
    font-family: var(--font-retro);
    font-size: 0.42rem;
    letter-spacing: 0.06em;
    background: var(--accent-yel);
    border: 3px solid #1A1A1A;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    color: #1A1A1A;
    transition: all var(--bounce);
}
.boost-btn:hover { transform:scale(1.06); background:#ffd740; }
.boost-btn:active { transform:translateY(2px); box-shadow:none; }

/* Ticker Tape */
.ticker-wrap {
    overflow: hidden;
    background: #1A1A1A;
    padding: 0.5rem 0;
}
.ticker {
    display: inline-block;
    white-space: nowrap;
    font-family: var(--font-retro);
    font-size: 0.42rem;
    color: var(--accent-yel);
    letter-spacing: 0.08em;
    animation: ticker 22s linear infinite;
    padding-left: 100%;
}
@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}
.ticker:hover { animation-play-state: paused; }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .nav-links {
        display:none; position:absolute; top:64px; left:0; right:0;
        background:#1A1A1A; flex-direction:column; padding:1rem 2rem;
        border-bottom:1px solid rgba(255,255,255,0.06);
    }
    .nav-links.active { display:flex; }
    .nav-link { padding:0.75rem 0; width:100%; }
    .nav-cta { display:none; }
    .nav-toggle { display:flex; }
    .arcade-title { font-size:0.85rem; }
    .ach-quote { font-size:0.82rem; }
}
