/* Most Forgettable — FunSlop.com
   Assemble the beige-est possible answer; evade the memory's recall check. */

:root {
    --bg-dark: #090b10;
    --neon-green: #39ff14;
    --neon-purple: #bd00ff;
    --cyan: #05d9e8;
    --pink: #ff2a6d;
    --gold: #ffd54a;
    --text-primary: #f0f4f8;
    --text-muted: #8b9bb4;
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Outfit', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body { min-height: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* Ambient glow — a sad, forgettable beige-leaning purple */
.glow-bg {
    position: fixed;
    top: -80px;
    left: -80px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, var(--neon-purple) 0%, transparent 70%);
    opacity: 0.12;
    z-index: -1;
    filter: blur(60px);
    pointer-events: none;
    animation: float 14s infinite alternate;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(120px, 60px); }
}

.game-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    user-select: none;
    -webkit-user-select: none;
}

.content {
    text-align: center;
    padding: 2.5rem 1.25rem 6rem;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
}

.title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
    background: linear-gradient(45deg, var(--text-muted), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Control hints */
.controls-inline {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.control-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
}

.control-pill .key {
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 0.1rem 0.45rem;
    font-size: 0.8rem;
}

.control-pill.action .key { color: var(--cyan); }
.control-pill.special .key { color: var(--neon-green); }

.state-playing .controls-inline,
.state-studying .controls-inline,
.state-recall .controls-inline,
.state-gameover .controls-inline { display: none; }

.instruction {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    min-height: 1.4em;
    line-height: 1.4;
}

.hud {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--cyan);
    margin-bottom: 0.35rem;
    min-height: 1.2em;
    letter-spacing: 0.3px;
}

.best-score {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    min-height: 1.2em;
}

/* The recall prompt card */
.prompt-card {
    margin: 0.75rem auto 1rem;
    max-width: 460px;
    background: rgba(189, 0, 255, 0.07);
    border: 1px solid rgba(189, 0, 255, 0.3);
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
}

.prompt-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--neon-purple);
    margin-bottom: 0.35rem;
}

.prompt-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
}

/* The phrase the player assembles */
.answer-builder {
    margin: 0.5rem auto 1rem;
    max-width: 520px;
}

.answer-line {
    min-height: 3.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
}

.chip-placeholder {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 300;
    font-size: 0.95rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--bg-dark);
    background: var(--cyan);
    border-radius: 8px;
    padding: 0.3rem 0.65rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(5, 217, 232, 0.25);
    transition: transform 0.1s, filter 0.15s;
    animation: chip-in 0.18s ease-out;
}

.chip:hover { filter: brightness(1.1); }
.chip:active { transform: scale(0.92); }

@keyframes chip-in {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Salience meter */
.salience-meter {
    margin: 0.9rem auto 0.4rem;
    max-width: 420px;
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.salience-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.25s ease, background 0.25s;
    background: var(--neon-green);
}

.salience-fill.sal-low { background: var(--neon-green); box-shadow: 0 0 10px rgba(57,255,20,0.5); }
.salience-fill.sal-mid { background: var(--gold); box-shadow: 0 0 10px rgba(255,213,74,0.5); }
.salience-fill.sal-high { background: var(--pink); box-shadow: 0 0 12px rgba(255,42,109,0.6); }

.salience-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    min-height: 1.2em;
    line-height: 1.35;
    margin: 0 auto;
    max-width: 460px;
}

/* The bland word tiles */
.tile-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 0.5rem auto 0.5rem;
    max-width: 560px;
}

.tile {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.tile:hover { border-color: var(--cyan); color: var(--cyan); }
.tile:active { transform: scale(0.93); }
.tile:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.tile.tile-bland { /* the safe, beige default — no extra glow */ }

.tile.tile-warm {
    border-color: rgba(255, 213, 74, 0.4);
    color: var(--gold);
}
.tile.tile-warm:hover { border-color: var(--gold); box-shadow: 0 0 10px rgba(255,213,74,0.25); }

.tile.tile-vivid {
    border-color: rgba(255, 42, 109, 0.5);
    color: var(--pink);
    text-shadow: 0 0 8px rgba(255, 42, 109, 0.4);
}
.tile.tile-vivid:hover { border-color: var(--pink); box-shadow: 0 0 12px rgba(255,42,109,0.4); color: var(--pink); }

/* Action buttons */
.buttons {
    display: none;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.1rem;
    flex-wrap: wrap;
}

.state-playing .buttons { display: flex; }

.game-btn {
    font-family: var(--font-body);
    padding: 0.85rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
    min-width: 130px;
    color: var(--bg-dark);
}

.game-btn:active { transform: scale(0.95); }
.game-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.btn-submit {
    background: var(--neon-green);
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.3);
}
.btn-submit:hover { filter: brightness(1.1); box-shadow: 0 0 26px rgba(57, 255, 20, 0.5); }

.btn-clear {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-clear:hover { border-color: var(--pink); color: var(--pink); }

/* Start / restart button */
.btn-start {
    background: linear-gradient(45deg, var(--cyan), var(--neon-green));
    margin-top: 1.5rem;
    padding: 0.95rem 2rem;
    font-size: 1.15rem;
    box-shadow: 0 0 22px rgba(5, 217, 232, 0.35);
}
.btn-start:hover { filter: brightness(1.08); box-shadow: 0 0 30px rgba(5, 217, 232, 0.55); }

/* Study + recall stage */
.study-stage {
    margin: 1.25rem auto 0;
    max-width: 520px;
}

.batch {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.batch-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    opacity: 0;
    animation: card-in 0.3s ease-out forwards;
}

@keyframes card-in {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.batch-card.mine {
    border-color: var(--cyan);
    background: rgba(5, 217, 232, 0.06);
}

.batch-card.recalled {
    border-color: var(--pink);
    background: rgba(255, 42, 109, 0.1);
    box-shadow: 0 0 18px rgba(255, 42, 109, 0.25);
    animation: card-in 0.3s ease-out forwards, shake 0.3s ease-in-out 0.05s;
}

.batch-card.forgotten {
    border-color: var(--neon-green);
    background: rgba(57, 255, 20, 0.08);
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.2);
}

.batch-card.forgotten .batch-text {
    color: var(--text-muted);
    opacity: 0.55;
    text-decoration: line-through;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-7px); }
    75% { transform: translateX(7px); }
}

.batch-tag {
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.batch-card.mine .batch-tag { color: var(--cyan); }
.batch-card.recalled .batch-tag { color: var(--pink); }
.batch-card.forgotten .batch-tag { color: var(--neon-green); }

.batch-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.verdict-line {
    font-size: 1rem;
    font-weight: 500;
    min-height: 1.3em;
    line-height: 1.4;
    margin-top: 0.25rem;
}

.verdict-line.good { color: var(--neon-green); text-shadow: 0 0 12px rgba(57,255,20,0.4); }
.verdict-line.bad { color: var(--pink); text-shadow: 0 0 12px rgba(255,42,109,0.4); }

.hint {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
    min-height: 1.2em;
    line-height: 1.4;
}

/* New best celebration */
.state-gameover.new-best .hud {
    color: var(--gold);
    text-shadow: 0 0 14px rgba(255, 213, 74, 0.5);
    animation: score-pop 0.4s ease-out;
}
.state-gameover.new-best .instruction { color: var(--gold); }

@keyframes score-pop {
    0% { transform: scale(0.85); opacity: 0; }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

.state-idle, .state-gameover { cursor: pointer; }

/* SEO / how-to content */
.how-to-play {
    text-align: left;
    margin: 3rem auto 0;
    max-width: 560px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem;
}

.how-to-play h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.how-to-play h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
    color: var(--cyan);
}

.how-to-play p {
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.how-to-play strong { color: var(--text-primary); font-weight: 500; }

.how-to-play ol {
    margin: 0.5rem 0 0.75rem 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.fun-fact {
    margin-top: 1.25rem;
    padding: 1rem;
    border-left: 3px solid var(--neon-purple);
    background: rgba(189, 0, 255, 0.06);
    border-radius: 0 10px 10px 0;
}

.fun-fact p { margin: 0; }

.related-games {
    margin: 2rem auto 0;
    max-width: 560px;
    text-align: center;
}

.related-games h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.related-games-list {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.related-game-link {
    text-decoration: none;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, color 0.2s;
}

.related-game-link:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

/* Home link */
.home-link {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    transition: border-color 0.2s, color 0.2s;
    z-index: 10;
}

.home-link:hover { border-color: var(--neon-purple); color: var(--neon-purple); }
.home-link:active { transform: translateX(-50%) scale(0.95); }
.home-link:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Responsive */
@media (max-width: 600px) {
    .title { font-size: 1.75rem; }
    .instruction { font-size: 1rem; }
    .prompt-text { font-size: 1rem; }
    .hud { font-size: 0.82rem; }
    .tile { font-size: 0.9rem; padding: 0.45rem 0.7rem; }
    .chip { font-size: 0.95rem; }
    .game-btn { padding: 0.75rem 1.2rem; font-size: 0.95rem; min-width: 110px; }
    .salience-label { font-size: 0.82rem; }
    .batch-text { font-size: 0.92rem; }
    .verdict-line { font-size: 0.92rem; }
}
