/* Frog Hop — Simple Board Games */
:root {
    --fh-bg: #0a0f1e;
    --fh-panel: #101a2e;
    --fh-line: #24324d;
    --fh-text: #e6edf7;
    --fh-muted: #94a3b8;
    --fh-accent: #39d353;
    --fh-gold: #ffd700;
    --fh-danger: #ff5470;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--fh-bg);
    color: var(--fh-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.fh-container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px;
    text-align: center;
}

.fh-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.fh-back {
    color: var(--fh-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 4px;
}

.fh-title {
    margin: 0;
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--fh-accent), var(--fh-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.fh-header-right { display: flex; gap: 6px; }

.fh-icon-btn {
    background: var(--fh-panel);
    border: 1px solid var(--fh-line);
    color: var(--fh-text);
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 10px;
    font-size: 1.05rem;
    cursor: pointer;
}

.fh-icon-btn:active { transform: scale(0.94); }
.fh-sound-off { display: none; }
body.fh-muted .fh-sound-on { display: none; }
body.fh-muted .fh-sound-off { display: inline; }

.fh-hud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.fh-chip {
    background: var(--fh-panel);
    border: 1px solid var(--fh-line);
    border-radius: 10px;
    padding: 6px 10px;
    min-width: 92px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fh-chip-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: var(--fh-muted);
}

.fh-chip-value { font-size: 1rem; font-weight: 700; color: var(--fh-accent); }
.fh-lives { color: var(--fh-danger); letter-spacing: 0.1em; }

.fh-stage {
    background: radial-gradient(circle at 50% 0%, #12203a 0%, var(--fh-bg) 70%);
    border: 1px solid var(--fh-line);
    border-radius: 16px;
    padding: 14px 10px 16px;
    position: relative;
    overflow: hidden;
}

.fh-board-wrap {
    position: relative;
    width: min(640px, 100%);
    margin: 0 auto;
}

.fh-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 480 / 320;
    border-radius: 12px;
    border: 1px solid var(--fh-line);
    background: #0b1425;
    touch-action: none;
    cursor: pointer;
}

.fh-prompt {
    margin: 8px 0 0;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--fh-muted);
    font-weight: 700;
}

.fh-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 22, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
    animation: fh-fade 0.25s ease;
}

.hidden { display: none !important; }

@keyframes fh-fade { from { opacity: 0; } to { opacity: 1; } }

.fh-panel {
    background: var(--fh-panel);
    border: 1px solid var(--fh-line);
    border-radius: 18px;
    padding: 22px 20px;
    width: min(420px, 100%);
    max-height: 100%;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fh-logo {
    width: min(300px, 80%);
    height: auto;
    align-self: center;
    filter: drop-shadow(0 0 12px rgba(57, 211, 83, 0.45));
    max-width: 100%;
    margin-bottom: 2px;
}

.fh-panel-title {
    margin: 4px 0 6px;
    font-size: 1.35rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fh-gold);
}

.fh-tagline { color: var(--fh-muted); margin: 0; font-size: 0.95rem; }
.fh-section { text-align: left; }
.fh-label { display: block; font-size: 0.8rem; color: var(--fh-muted); margin-bottom: 6px; }

#playerNameInput {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--fh-line);
    background: #0b1425;
    color: var(--fh-text);
    font-size: 1rem;
    min-height: 44px;
}

#playerNameInput:focus { outline: 2px solid var(--fh-accent); border-color: transparent; }

.fh-btn {
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s ease, filter 0.15s ease;
}

.fh-btn-primary {
    background: linear-gradient(135deg, var(--fh-accent), #16a34a);
    color: #04120a;
}

.fh-btn-ghost {
    background: transparent;
    border-color: var(--fh-line);
    color: var(--fh-text);
}

.fh-btn:hover { filter: brightness(1.08); }
.fh-btn:active { transform: translateY(2px); }

.fh-hint { font-size: 0.82rem; color: var(--fh-muted); margin: 0; }

.fh-results { display: flex; gap: 12px; justify-content: center; margin-bottom: 6px; }

.fh-result {
    background: #0b1425;
    border: 1px solid var(--fh-line);
    border-radius: 12px;
    padding: 10px 16px;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fh-result-label { font-size: 0.65rem; letter-spacing: 0.14em; color: var(--fh-muted); }
.fh-result-value { font-size: 1.5rem; font-weight: 800; color: var(--fh-gold); }

@media (max-width: 480px) {
    .fh-container { padding: 8px; }
    .fh-chip { min-width: 78px; padding: 5px 8px; }
    .fh-stage { padding: 10px 6px 14px; }
    .fh-panel { padding: 18px 14px; }
}

.fh-skins { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.fh-skin {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.fh-skin:hover { transform: translateY(-2px); }
.fh-skin.is-active { border-color: var(--fh-gold); box-shadow: 0 0 0 3px rgba(255, 215, 94, 0.28); }
.fh-skin.is-locked { filter: grayscale(0.85) brightness(0.55); cursor: not-allowed; }
.fh-skin-hint { margin: 8px 0 0; font-size: 0.78rem; color: var(--fh-muted); text-align: center; min-height: 1.2em; }
.fh-badge {
    margin: 4px 0 0;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #1a1206;
    background: var(--fh-gold);
    border-radius: 999px;
    padding: 4px 14px;
    display: inline-block;
}
.fh-badge.hidden { display: none; }
.fh-end-note { margin: 10px 0 14px; font-size: 0.85rem; color: var(--fh-muted); white-space: pre-line; }
