/* ---------- Menu ---------- */
.menu-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 920px;
    margin: 0 auto;
}

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.1s;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 0 0 2px #5a5a5a, 0 12px 30px rgba(0, 0, 0, 0.4);
}

.menu-card h2 {
    font-size: 18px;
    color: var(--gold);
    text-shadow: 3px 3px 0 #7a5a00;
    margin: 0;
}

.menu-card p {
    margin: 0;
    font-size: 15px;
    min-height: 3em;
}

.menu-emoji {
    font-size: 56px;
    line-height: 1;
}

a.mc-btn {
    display: inline-block;
    text-decoration: none;
    color: #fff;
}

.menu-link {
    float: left;
    margin-bottom: 8px;
}

.screen.start::after {
    content: "";
    display: block;
    clear: both;
}

.hud-link {
    white-space: nowrap;
}

.title.pink {
    color: #ff7ac8;
    text-shadow: 4px 4px 0 #7a1f55, 0 0 24px rgba(0, 0, 0, 0.5);
}

.mc-btn.pink {
    background: #d64bb0;
    border-color: #ff9ee0 #6e1f57 #6e1f57 #ff9ee0;
    text-shadow: 2px 2px 0 #6e1f57;
}

.difficulty.two {
    grid-template-columns: repeat(2, 1fr);
}

.rule-icon.big-emoji {
    font-size: 40px;
    line-height: 1;
}

/* ---------- KlikKado: arena ---------- */
.kado-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.kado-message {
    font-family: var(--font-pixel);
    font-size: 14px;
    text-align: center;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    min-height: 1.6em;
}

.kado-message.good { color: var(--green-light); }
.kado-message.bad { color: #ff7a7a; }

.pattern-dots {
    display: flex;
    gap: 8px;
    min-height: 14px;
}

.pattern-dots .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.pattern-dots .dot.done {
    background: var(--green-light);
    border-color: #fff;
    box-shadow: 0 0 8px var(--green-light);
}

/* ---------- KlikKado: klikkies board ---------- */
.click-board.keys {
    display: flex;
    gap: 16px;
    padding: 26px 30px 34px;
    background: linear-gradient(#333, #151515);
    border-radius: 16px;
    border: 4px solid #0a0a0a;
    box-shadow: 0 14px 0 #050505, 0 24px 34px rgba(0, 0, 0, 0.55);
}

.key-btn {
    position: relative;
    width: 96px;
    height: 96px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.key-btn:disabled {
    cursor: default;
}

.key-btn .glow {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: radial-gradient(var(--k), transparent 70%);
    opacity: 0.3;
    filter: blur(8px);
    transition: opacity 0.1s;
}

.key-btn .cap {
    position: absolute;
    inset: 0 0 12px;
    border-radius: 12px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.05) 45%, rgba(0, 0, 0, 0.25)),
        var(--k);
    opacity: 0.92;
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), inset 0 -6px 0 rgba(0, 0, 0, 0.25);
    transition: transform 0.07s, filter 0.07s;
}

.key-btn .cap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 12px;
    border-radius: 0 0 12px 12px;
    background: var(--k);
    filter: brightness(0.5);
    transition: height 0.07s, bottom 0.07s;
}

.key-btn.lit .cap,
.key-btn:active:not(:disabled) .cap {
    transform: translateY(9px);
    filter: brightness(1.4) saturate(1.2);
}

.key-btn.lit .cap::after,
.key-btn:active:not(:disabled) .cap::after {
    height: 3px;
    bottom: -3px;
}

.key-btn.lit .glow {
    opacity: 1;
}

/* ---------- KlikKado: pop-it board ---------- */
.click-board.popit {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 24px;
    border-radius: 32px;
    background: linear-gradient(135deg, #ffd6e7, #d6f0ff 50%, #e7ffd6);
    border: 6px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.pop-btn {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 45%),
        var(--k);
    box-shadow: 0 7px 0 rgba(0, 0, 0, 0.18), inset 0 -6px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.08s, box-shadow 0.08s, filter 0.08s;
}

.pop-btn:disabled {
    cursor: default;
}

.pop-btn.lit,
.pop-btn:active:not(:disabled) {
    transform: scale(0.93);
    filter: brightness(0.85);
    background:
        radial-gradient(circle at 50% 65%, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 60%),
        var(--k);
    box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.35), inset 0 -2px 4px rgba(255, 255, 255, 0.5);
}

.click-board.locked {
    filter: saturate(0.85);
}

/* ---------- KlikKado: gift ---------- */
.gift-panel {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: pop 0.35s ease-out;
}

.gift {
    position: relative;
    font-size: 72px;
    line-height: 1;
}

.gift .lock {
    position: absolute;
    right: -14px;
    bottom: -6px;
    font-size: 30px;
}

.gift.shake {
    animation: shake 0.4s;
}

.gift.closed {
    filter: grayscale(0.6);
}

.gift-text {
    margin: 0;
    font-size: 17px;
    text-align: center;
}

.reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 28px;
    border-radius: 16px;
    border: 3px solid var(--rc, #ccc);
    box-shadow: 0 0 24px var(--rc, #ccc);
    animation: pop 0.5s ease-out;
    position: relative;
}

.reveal .sparkle {
    position: absolute;
    top: -14px;
    right: -10px;
    font-size: 28px;
    animation: twinkle 1s ease-in-out infinite alternate;
}

.reveal-emoji {
    font-size: 84px;
    line-height: 1;
}

.reveal-name {
    font-family: var(--font-pixel);
    font-size: 16px;
}

.reveal-rarity {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--rc, #ccc);
}

.reveal-badge {
    font-size: 15px;
    opacity: 0.9;
}

.reveal-badge.new {
    color: var(--gold);
    font-family: var(--font-pixel);
    font-size: 11px;
}

@keyframes twinkle {
    from { transform: scale(0.8) rotate(-10deg); opacity: 0.6; }
    to { transform: scale(1.2) rotate(10deg); opacity: 1; }
}

/* Rarity colours */
.r-common { --rc: #cfcfcf; }
.r-rare { --rc: #4fa8ff; }
.r-epic { --rc: #c95bff; }
.r-legendary { --rc: #ffd93b; }

/* ---------- KlikKado: album ---------- */
.dialog.album {
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
}

.album h3 {
    color: var(--rc, #ccc);
    margin: 16px 0 8px;
    text-align: left;
}

.album-progress {
    font-family: var(--font-pixel);
    font-size: 11px;
    margin: 0;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.album-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid var(--rc, #ccc);
    border-radius: 10px;
}

.album-item.unknown {
    opacity: 0.45;
    border-style: dashed;
}

.album-emoji {
    font-size: 34px;
    line-height: 1;
}

.album-name {
    font-size: 12px;
}

.album-count {
    position: absolute;
    top: 4px;
    right: 6px;
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--gold);
}

@media (max-width: 760px) {
    .menu-cards,
    .difficulty.two {
        grid-template-columns: 1fr;
    }

    .click-board.keys {
        gap: 10px;
        padding: 18px 16px 26px;
    }

    .key-btn {
        width: 68px;
        height: 68px;
    }

    .pop-btn {
        width: 70px;
        height: 70px;
    }
}
