/* ============================================================
   LORCANA MARKET — Enchanted Memory Game
   ❄️ Winterspell Edition — Disney Card Matching Mini-Game
   ============================================================ */

/* ── Game Launcher Button (Bottom Left) ────────────────── */
.game-launcher {
    position: fixed;
    bottom: 32px;
    left: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%,
        rgba(251, 191, 36, 0.12) 0%,
        rgba(124, 58, 237, 0.08) 30%,
        rgba(13, 17, 23, 0.92) 65%
    );
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1.5px solid rgba(251, 191, 36, 0.25);
    cursor: pointer;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(251, 191, 36, 0.05);
    animation: launcherFloat 4s ease-in-out infinite;
}

.game-launcher:hover {
    transform: scale(1.12);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow:
        0 0 25px rgba(251, 191, 36, 0.2),
        0 0 50px rgba(124, 58, 237, 0.1),
        inset 0 0 15px rgba(251, 191, 36, 0.06);
}

.game-launcher:active {
    transform: scale(0.92);
}

/* "Play" label below the launcher button */
.game-launcher-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: 800;
    color: rgba(251, 191, 36, 0.9);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5), 0 1px 4px rgba(0, 0, 0, 0.6);
    animation: launcherPlayBounce 2s ease-in-out infinite;
}

@keyframes launcherPlayBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    15%      { transform: translateX(-50%) translateY(-6px); }
    30%      { transform: translateX(-50%) translateY(0); }
    40%      { transform: translateX(-50%) translateY(-3px); }
    50%      { transform: translateX(-50%) translateY(0); }
}

.game-launcher-icon {
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.game-launcher:hover .game-launcher-icon {
    transform: rotate(60deg) scale(1.1);
    filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.7));
}

/* Pulse ring */
.game-launcher-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.15);
    animation: launcherPulseRing 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes launcherFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes launcherPulseRing {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0; }
}

/* Mobile position */
@media (max-width: 768px) {
    .game-launcher {
        bottom: 80px;
        left: 16px;
        width: 52px;
        height: 52px;
    }
    .game-launcher-icon {
        font-size: 22px;
    }
}

/* Rotate icon when menu is open */
.game-launcher.menu-open {
    transform: rotate(45deg) scale(1.05);
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.25);
}
.game-launcher.menu-open .game-launcher-pulse {
    display: none;
}

/* ── Slide-Up Game Menu ────────────────────────────────── */
.game-menu-panel {
    position: fixed;
    bottom: 32px;
    left: 24px;
    z-index: 9996;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding-bottom: 74px; /* above the launcher button */
}
.game-menu-panel.open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.game-menu-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1.5px solid rgba(251, 191, 36, 0.3);
    background: radial-gradient(circle at 40% 35%,
        rgba(251, 191, 36, 0.1) 0%,
        rgba(124, 58, 237, 0.06) 30%,
        rgba(13, 17, 23, 0.92) 65%
    );
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                0 0 15px rgba(251, 191, 36, 0.06);
    position: relative;
}
.game-menu-item:hover {
    transform: scale(1.15);
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.25),
                inset 0 0 12px rgba(251, 191, 36, 0.06);
}
.game-menu-item:active {
    transform: scale(0.95);
}

.game-menu-icon {
    font-size: 1.2rem;
    color: #fbbf24;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4));
}
.game-menu-icon svg {
    width: 22px;
    height: 22px;
    stroke: #fbbf24;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4));
}

.game-menu-label {
    font-size: 0.5rem;
    font-weight: 700;
    color: #fde68a;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
}

/* Staggered entrance animation */
.game-menu-panel.open .game-menu-item:nth-child(1) {
    transition-delay: 0.2s;
}
.game-menu-panel.open .game-menu-item:nth-child(2) {
    transition-delay: 0.15s;
}
.game-menu-panel.open .game-menu-item:nth-child(3) {
    transition-delay: 0.1s;
}
.game-menu-panel.open .game-menu-item:nth-child(4) {
    transition-delay: 0.05s;
}
.game-menu-panel.open .game-menu-item:nth-child(5) {
    transition-delay: 0s;
}
.game-menu-panel .game-menu-item {
    opacity: 0;
    transform: translateY(15px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.game-menu-panel.open .game-menu-item {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .game-menu-panel {
        bottom: 80px;
        left: 16px;
        padding-bottom: 62px;
    }
    .game-menu-item {
        width: 52px;
        height: 52px;
    }
    .game-menu-icon {
        font-size: 1rem;
    }
    .game-menu-icon svg {
        width: 18px;
        height: 18px;
    }
    .game-menu-label {
        font-size: 0.42rem;
    }
}

/* ── Game Modal Overlay ────────────────────────────────── */
.game-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 8, 14, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.game-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ── Game Modal Container ──────────────────────────────── */
.game-modal {
    position: relative;
    width: 95%;
    max-width: 860px;
    max-height: 92vh;
    background: linear-gradient(
        160deg,
        rgba(22, 27, 34, 0.97) 0%,
        rgba(13, 17, 23, 0.99) 100%
    );
    border: 1px solid rgba(165, 216, 255, 0.12);
    border-radius: 20px;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: none;
    touch-action: none;
    transform: translateY(30px) scale(0.92);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(165, 216, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.game-modal-overlay.active .game-modal {
    transform: translateY(0) scale(1);
}

/* ── Header ────────────────────────────────────────────── */
.game-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.game-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--ice-blue), var(--frost-cyan), var(--aurora-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.game-title-icon {
    -webkit-text-fill-color: initial;
    font-size: 0.9rem;
}

.game-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary, #8b949e);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.game-close:hover {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
}

/* ── Stats Bar ─────────────────────────────────────────── */
.game-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}

.game-stat {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    background: rgba(165, 216, 255, 0.04);
    border: 1px solid rgba(165, 216, 255, 0.06);
    border-radius: 10px;
}

.game-stat-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #6e7681);
    margin-bottom: 2px;
}

.game-stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ice-blue, #a5d8ff);
    font-variant-numeric: tabular-nums;
}

.game-stat-best .game-stat-value {
    color: var(--motion-gold, #fbbf24);
}

/* ── Game Board ────────────────────────────────────────── */
.game-board {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    perspective: 1000px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Grid layouts — horizontal: spread cards wide, minimal rows */
.game-board[data-pairs="6"] {
    grid-template-columns: repeat(6, 1fr);  /* 12 cards → 6×2 */
}
.game-board[data-pairs="8"] {
    grid-template-columns: repeat(8, 1fr);  /* 16 cards → 8×2 */
}
.game-board[data-pairs="12"] {
    grid-template-columns: repeat(8, 1fr);  /* 24 cards → 8×3 */
}

/* ── Game Card ─────────────────────────────────────────── */
.game-card {
    position: relative;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 10px;
}

.game-card.flipped {
    transform: rotateY(180deg);
}

.game-card.matched {
    transform: rotateY(180deg);
    pointer-events: none;
}

.game-card.matched .game-card-front {
    box-shadow: 0 0 20px rgba(165, 216, 255, 0.3),
                0 0 40px rgba(165, 216, 255, 0.1);
    border-color: rgba(165, 216, 255, 0.4);
}

.game-card.shake {
    animation: cardShake 0.5s ease-in-out;
}

/* Card faces — shared */
.game-card-front,
.game-card-back {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(165, 216, 255, 0.1);
    overflow: hidden;
}

/* Back face — ice crystal pattern */
.game-card-back {
    background: linear-gradient(
        145deg,
        rgba(22, 27, 34, 0.95) 0%,
        rgba(30, 40, 55, 0.95) 50%,
        rgba(22, 27, 34, 0.95) 100%
    );
    border-color: rgba(165, 216, 255, 0.12);
}

.game-card-back::before {
    content: '✦';
    font-size: 1.4rem;
    color: rgba(165, 216, 255, 0.2);
    text-shadow: 0 0 8px rgba(165, 216, 255, 0.1);
    animation: cardBackGlow 3s ease-in-out infinite;
}

.game-card-back::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 8px;
    border: 1px solid rgba(165, 216, 255, 0.06);
    pointer-events: none;
}

/* Shimmer on back */
.game-card-back .card-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(165, 216, 255, 0.04), transparent);
    animation: cardBackShimmer 4s ease-in-out infinite;
}

/* Front face — real card art */
.game-card-front {
    transform: rotateY(180deg);
    background: linear-gradient(
        160deg,
        rgba(30, 40, 55, 0.97) 0%,
        rgba(22, 27, 34, 0.99) 100%
    );
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

/* Card art image */
.game-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 9px 9px 0 0;
    transition: transform 0.3s ease, filter 0.3s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.game-card.matched .game-card-img {
    animation: matchedBounce 0.6s ease-out;
    filter: brightness(1.1) saturate(1.15);
}

.game-card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 0.48rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1;
    padding: 4px 2px 3px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7) 30%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    z-index: 2;
}

/* Ink color accent on card front */
.game-card-front[data-ink="amber"]    { border-color: rgba(251, 191, 36, 0.3); }
.game-card-front[data-ink="amethyst"] { border-color: rgba(155, 93, 229, 0.3); }
.game-card-front[data-ink="emerald"]  { border-color: rgba(45, 158, 79, 0.3); }
.game-card-front[data-ink="ruby"]     { border-color: rgba(230, 57, 70, 0.3); }
.game-card-front[data-ink="sapphire"] { border-color: rgba(0, 150, 199, 0.3); }
.game-card-front[data-ink="steel"]    { border-color: rgba(139, 158, 176, 0.3); }

.game-card-front[data-ink="amber"]    .game-card-name { color: #fbbf24; }
.game-card-front[data-ink="amethyst"] .game-card-name { color: #9b5de5; }
.game-card-front[data-ink="emerald"]  .game-card-name { color: #2d9e4f; }
.game-card-front[data-ink="ruby"]     .game-card-name { color: #e63946; }
.game-card-front[data-ink="sapphire"] .game-card-name { color: #0096c7; }
.game-card-front[data-ink="steel"]    .game-card-name { color: #8b9eb0; }

/* Matched glow per ink */
.game-card.matched .game-card-front[data-ink="amber"]    { box-shadow: 0 0 16px rgba(251, 191, 36, 0.2); }
.game-card.matched .game-card-front[data-ink="amethyst"] { box-shadow: 0 0 16px rgba(155, 93, 229, 0.2); }
.game-card.matched .game-card-front[data-ink="emerald"]  { box-shadow: 0 0 16px rgba(45, 158, 79, 0.2); }
.game-card.matched .game-card-front[data-ink="ruby"]     { box-shadow: 0 0 16px rgba(230, 57, 70, 0.2); }
.game-card.matched .game-card-front[data-ink="sapphire"] { box-shadow: 0 0 16px rgba(0, 150, 199, 0.2); }
.game-card.matched .game-card-front[data-ink="steel"]    { box-shadow: 0 0 16px rgba(139, 158, 176, 0.2); }

/* ── Game Actions ──────────────────────────────────────── */
.game-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.game-btn-restart {
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 10px;
    background: rgba(165, 216, 255, 0.08);
    border: 1px solid rgba(165, 216, 255, 0.15);
    color: var(--ice-blue, #a5d8ff);
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-btn-restart:hover {
    background: rgba(165, 216, 255, 0.14);
    border-color: rgba(165, 216, 255, 0.3);
    box-shadow: 0 0 16px rgba(165, 216, 255, 0.08);
}

.game-difficulty {
    display: flex;
    gap: 4px;
}

.game-diff-btn {
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary, #8b949e);
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.game-diff-btn:hover {
    background: rgba(165, 216, 255, 0.06);
    color: var(--text-primary, #e6edf3);
}

.game-diff-btn.active {
    background: rgba(165, 216, 255, 0.1);
    border-color: rgba(165, 216, 255, 0.2);
    color: var(--ice-blue, #a5d8ff);
    box-shadow: 0 0 10px rgba(165, 216, 255, 0.05);
}

.game-diff-btn.locked {
    opacity: 0.45;
    position: relative;
    cursor: not-allowed;
}

.game-diff-btn.locked::after {
    content: attr(data-cost) '💎';
    display: block;
    font-size: 0.55rem;
    color: #fbbf24;
    margin-top: 2px;
    letter-spacing: 0;
}

.game-diff-btn.guest-locked::after {
    content: '🔒 Login';
    color: #f87171;
}

/* ── Win Overlay ───────────────────────────────────────── */
.game-win-overlay {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(5, 8, 14, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
    z-index: 10;
}

.game-win-overlay.active {
    opacity: 1;
    visibility: visible;
}

.game-win-content {
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-win-overlay.active .game-win-content {
    transform: scale(1);
}

.game-win-stars {
    font-size: 2.2rem;
    margin-bottom: 8px;
    animation: starsGlow 1.5s ease-in-out infinite alternate;
}

.game-win-content h3 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--motion-gold, #fbbf24), #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
}

.game-win-content p {
    color: var(--text-secondary, #8b949e);
    font-size: 0.85rem;
    margin: 0 0 16px;
}

.game-btn-play-again {
    padding: 10px 28px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: var(--motion-gold, #fbbf24);
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-btn-play-again:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(124, 58, 237, 0.15));
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.15);
    transform: scale(1.05);
}

/* ── Animations ────────────────────────────────────────── */
@keyframes cardBackGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes cardBackShimmer {
    0%, 100% { left: -100%; }
    50% { left: 200%; }
}

@keyframes cardShake {
    0%, 100% { transform: rotateY(180deg) translateX(0); }
    20% { transform: rotateY(180deg) translateX(-6px); }
    40% { transform: rotateY(180deg) translateX(6px); }
    60% { transform: rotateY(180deg) translateX(-4px); }
    80% { transform: rotateY(180deg) translateX(4px); }
}

@keyframes matchedBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes starsGlow {
    from { filter: brightness(1) drop-shadow(0 0 8px rgba(251, 191, 36, 0.3)); }
    to   { filter: brightness(1.3) drop-shadow(0 0 16px rgba(251, 191, 36, 0.5)); }
}

/* Match sparkle explosion */
.match-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    animation: matchSparkleOut 0.7s ease-out forwards;
    z-index: 20;
}

@keyframes matchSparkleOut {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--sx), var(--sy)) scale(0);
    }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) {
    .game-modal {
        padding: 16px;
        border-radius: 16px;
        max-height: 88vh;
    }
    .game-title {
        font-size: 1.05rem;
    }
    .game-board {
        gap: 4px;
    }
    .game-board[data-pairs="6"] {
        grid-template-columns: repeat(4, 1fr);  /* mobile: 4×3 */
    }
    .game-board[data-pairs="8"] {
        grid-template-columns: repeat(4, 1fr);  /* mobile: 4×4 */
    }
    .game-board[data-pairs="12"] {
        grid-template-columns: repeat(4, 1fr);  /* mobile: 4×6 */
    }
    .game-card-name {
        font-size: 0.36rem;
    }
    .game-stats {
        gap: 4px;
    }
    .game-stat {
        padding: 6px 3px;
    }
    .game-stat-value {
        font-size: 0.85rem;
    }
    .game-actions {
        flex-direction: column;
        gap: 8px;
    }
}

/* ── Reduced Motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .game-card {
        transition: none;
    }
    .game-launcher {
        animation: none;
    }
    .game-launcher-pulse {
        display: none;
    }
    .game-card-back::before {
        animation: none;
    }
    .game-card-back .card-shimmer {
        display: none;
    }
    .match-sparkle {
        display: none;
    }
}

/* ── Diamond Notice (pay-to-play feedback) ─────────────── */
.game-diamond-notice {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 10px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.game-diamond-notice.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Session Timer Badge ───────────────────────────────── */
.game-session-badge {
    position: absolute;
    top: 14px;
    right: 54px;
    background: rgba(165, 216, 255, 0.1);
    border: 1px solid rgba(165, 216, 255, 0.25);
    color: var(--ice-blue, #a5d8ff);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    z-index: 20;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}

/* Empty board message */
.game-empty-board {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary, #8b949e);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Difficulty Reward Labels ──────────────────────────── */
.diff-reward {
    font-size: 0.55rem;
    font-weight: 700;
    opacity: 0.7;
    margin-left: 2px;
}

.game-diff-btn.active .diff-reward {
    opacity: 1;
    color: #fbbf24;
}

/* ── Boost! Toggle Row ─────────────────────────────────── */
.game-boost-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(251, 191, 36, 0.04);
    border: 1px solid rgba(251, 191, 36, 0.08);
    border-radius: 12px;
    transition: all 0.4s ease;
}

.game-boost-row.active {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.08),
                inset 0 0 20px rgba(251, 191, 36, 0.03);
}

/* Circular toggle track */
.game-boost-toggle {
    flex-shrink: 0;
    cursor: pointer;
}

.boost-track {
    width: 48px;
    height: 26px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.boost-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b949e, #6e7681);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Active state */
.game-boost-row.active .boost-track {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.15);
}

.game-boost-row.active .boost-knob {
    left: 24px;
    background: linear-gradient(135deg, #fde68a, #fbbf24, #f59e0b);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5),
                0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Label */
.boost-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-secondary, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.game-boost-row.active .boost-label {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.boost-multi {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fbbf24;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.game-boost-row.active .boost-multi {
    opacity: 1;
    animation: boostPulse 1.5s ease-in-out infinite alternate;
}

/* Hint text */
.boost-hint {
    font-size: 0.62rem;
    color: var(--text-muted, #6e7681);
    font-weight: 500;
    margin-left: auto;
    opacity: 0.7;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.game-boost-row.active .boost-hint {
    opacity: 1;
    color: #f59e0b;
}

@keyframes boostPulse {
    from { opacity: 0.8; transform: scale(1); }
    to   { opacity: 1; transform: scale(1.08); }
}

/* ── Boost Shuffle Animation ───────────────────────────── */
.game-card.boost-shuffling {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Boost active indicator on board */
.game-board.boost-active {
    box-shadow: inset 0 0 30px rgba(251, 191, 36, 0.05);
    border-radius: 12px;
}

/* Mobile adjustments for boost row */
@media (max-width: 480px) {
    .game-boost-row {
        padding: 8px 10px;
        gap: 8px;
    }
    .boost-label {
        font-size: 0.72rem;
    }
    .boost-hint {
        font-size: 0.52rem;
    }
    .boost-track {
        width: 42px;
        height: 22px;
        border-radius: 11px;
    }
    .boost-knob {
        width: 16px;
        height: 16px;
        top: 2px;
        left: 2px;
    }
    .game-boost-row.active .boost-knob {
        left: 22px;
    }
}

/* ── Game Header Actions (leaderboard btn + close btn) ── */
.game-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-leaderboard-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    color: #ffd700;
    transition: background .2s, transform .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.game-leaderboard-btn:hover {
    background: rgba(255,215,0,.15);
    transform: scale(1.1);
}
.game-leaderboard-btn svg {
    display: block;
}

/* ── Game Leaderboard Overlay ─────────────────────────── */
.game-leaderboard-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.game-leaderboard-overlay.active {
    opacity: 1;
    visibility: visible;
}

.game-leaderboard-panel {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255,215,0,.25);
    border-radius: 16px;
    width: 400px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0,0,0,.6), 0 0 30px rgba(255,215,0,.08);
    animation: lbSlideIn .3s ease-out;
}

@keyframes lbSlideIn {
    from { transform: translateY(24px) scale(.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.game-leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.game-leaderboard-header h3 {
    margin: 0;
    font-size: 15px;
    color: #ffd700;
    font-weight: 700;
}
.game-leaderboard-header .game-leaderboard-close {
    background: rgba(255,255,255,.08);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.game-leaderboard-header .game-leaderboard-close:hover {
    background: rgba(255,80,80,.2);
    color: #f66;
}

/* Difficulty tabs */
.game-leaderboard-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 20px 6px;
}
.lb-tab {
    flex: 1;
    padding: 7px 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    color: #888;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
}
.lb-tab:hover {
    background: rgba(255,255,255,.08);
    color: #ccc;
}
.lb-tab.active {
    background: rgba(255,215,0,.12);
    border-color: rgba(255,215,0,.4);
    color: #ffd700;
}

/* Leaderboard list */
.game-leaderboard-list {
    padding: 8px 14px 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.lb-loading, .lb-empty {
    text-align: center;
    color: #777;
    padding: 32px 16px;
    font-size: 13px;
}
.lb-empty { color: #999; }

.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background .15s;
}
.lb-row:hover {
    background: rgba(255,255,255,.04);
}
.lb-row + .lb-row {
    border-top: 1px solid rgba(255,255,255,.04);
}

.lb-rank {
    width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
}
.lb-top1 .lb-rank { font-size: 18px; }
.lb-top2 .lb-rank { font-size: 16px; }
.lb-top3 .lb-rank { font-size: 16px; }

.lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
}
.lb-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.lb-avatar-letter {
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
}

.lb-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-name .rarity-badge-icon {
    width: 13px;
    height: 13px;
}

.lb-score {
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Top 3 glow accents */
.lb-top1 { background: rgba(255,215,0,.06); }
.lb-top1 .lb-name { color: #ffd700; }
.lb-top2 { background: rgba(192,192,192,.04); }
.lb-top2 .lb-name { color: #c0c0c0; }
.lb-top3 { background: rgba(205,127,50,.04); }
.lb-top3 .lb-name { color: #cd7f32; }

/* Ink Rush multiplier badge */
.rush-multi-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35, #f7931a);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 8px;
    animation: multiBadgePop .35s ease-out;
}
@keyframes multiBadgePop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Leaderboard responsive ── */
@media (max-width: 480px) {
    .game-leaderboard-panel {
        width: 95vw;
        border-radius: 12px;
    }
    .lb-row { gap: 8px; padding: 6px 8px; }
    .lb-avatar { width: 28px; height: 28px; }
    .lb-name { font-size: 12px; }
    .lb-score { font-size: 11px; }
}

/* ============================================================
   INK CATCHER ✨ — Tap & Catch Mini-Game
   ============================================================ */

/* ── Catcher Modal Overlay ─────────────────────────────── */
.catcher-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 8, 14, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.catcher-modal-overlay.active {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    opacity: 1;
    visibility: visible;
}

/* ── Catcher Modal Container ───────────────────────────── */
.catcher-modal {
    position: relative;
    width: 95%;
    max-width: 520px;
    max-height: 95vh;
    background: linear-gradient(
        160deg,
        rgba(22, 27, 34, 0.97) 0%,
        rgba(13, 17, 23, 0.99) 100%
    );
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 20px;
    padding: 20px;
    overflow: hidden;
    transform: translateY(30px) scale(0.92);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(251, 191, 36, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.catcher-modal-overlay.active .catcher-modal {
    transform: translateY(0) scale(1);
}

/* ── Header ────────────────────────────────────────────── */
.catcher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.catcher-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.catcher-title-icon {
    -webkit-text-fill-color: initial;
    font-size: 1.1rem;
}

.catcher-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary, #8b949e);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.catcher-close:hover {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
}

/* ── Stats Bar ─────────────────────────────────────────── */
.catcher-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.catcher-stat {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    background: rgba(251, 191, 36, 0.04);
    border: 1px solid rgba(251, 191, 36, 0.08);
    border-radius: 10px;
}

.catcher-stat-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #6e7681);
    margin-bottom: 2px;
}

.catcher-stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
}

.catcher-stat-best .catcher-stat-value {
    color: var(--motion-gold, #fbbf24);
}

.catcher-stat-lives .catcher-stat-value {
    font-size: 1.1rem;
    letter-spacing: 2px;
}

/* ── Play Field ────────────────────────────────────────── */
.catcher-field {
    position: relative;
    width: 100%;
    height: 380px;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(251, 191, 36, 0.04) 0%, transparent 60%),
        linear-gradient(180deg, rgba(13, 17, 23, 0.6) 0%, rgba(22, 27, 34, 0.8) 100%);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 10px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.catcher-field-shake {
    animation: catcherShake 0.3s ease-in-out;
}

@keyframes catcherShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

/* ── Spawned Card ──────────────────────────────────────── */
.catcher-card {
    position: absolute;
    width: 80px;
    height: 110px;
    cursor: pointer;
    transform: scale(0) rotate(-8deg);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.catcher-card-visible {
    transform: scale(1) rotate(0deg);
}

.catcher-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--ink-color, #fbbf24);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 0 8px color-mix(in srgb, var(--ink-color, #fbbf24) 30%, transparent);
    position: relative;
    background: rgba(22, 27, 34, 0.9);
}

.catcher-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    pointer-events: none;
    display: block;
}

.catcher-card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px 4px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Timer Ring around card ────────────────────────────── */
.catcher-timer-ring {
    position: absolute;
    inset: -4px;
    pointer-events: none;
    z-index: 3;
}

.catcher-timer-ring svg {
    width: 100%;
    height: 100%;
}

.catcher-timer-ring circle {
    fill: none;
    stroke: var(--ink-color, #fbbf24);
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    opacity: 0.5;
    animation: catcherTimerDrain var(--show-ms, 2400ms) linear forwards;
}

@keyframes catcherTimerDrain {
    0% { stroke-dashoffset: 0; opacity: 0.6; }
    70% { stroke: var(--ink-color, #fbbf24); opacity: 0.4; }
    90% { stroke: #e63946; opacity: 0.8; }
    100% { stroke-dashoffset: 100; stroke: #e63946; opacity: 0; }
}

/* ── Enchanted Light Wave (appears 1s before card) ─────── */
.catcher-light-wave {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(251, 191, 36, 0.5) 0%,
        rgba(251, 191, 36, 0.25) 40%,
        rgba(251, 191, 36, 0) 70%
    );
    animation: catcherLightWave 0.5s ease-out forwards;
}

@keyframes catcherLightWave {
    0%   { width: 0; height: 0; opacity: 0; }
    20%  { opacity: 0.6; }
    50%  { width: 180px; height: 180px; opacity: 0.5; }
    80%  { opacity: 0.3; }
    100% { width: 240px; height: 240px; opacity: 0; }
}

/* ── Enchanted Card (bonus +3) — brighter glow ─────────── */
.catcher-enchanted .catcher-card-inner {
    border-color: #fde68a;
    box-shadow:
        0 4px 20px rgba(251, 191, 36, 0.5),
        0 0 30px rgba(251, 191, 36, 0.35),
        0 0 60px rgba(251, 191, 36, 0.15),
        inset 0 0 12px rgba(251, 191, 36, 0.2);
    animation: catcherEnchantedGlow 0.8s ease-in-out infinite alternate;
}

@keyframes catcherEnchantedGlow {
    0% {
        box-shadow:
            0 4px 20px rgba(251, 191, 36, 0.5),
            0 0 30px rgba(251, 191, 36, 0.35),
            0 0 60px rgba(251, 191, 36, 0.15);
        filter: brightness(1);
    }
    100% {
        box-shadow:
            0 4px 30px rgba(251, 191, 36, 0.7),
            0 0 50px rgba(251, 191, 36, 0.5),
            0 0 90px rgba(251, 191, 36, 0.25);
        filter: brightness(1.15);
    }
}

.catcher-enchanted-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, #fde68a, #fbbf24, #f59e0b);
    color: #0d1117;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    z-index: 4;
    animation: catcherBadgePulse 0.6s ease-in-out infinite alternate;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

@keyframes catcherBadgePulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.15); filter: brightness(1.3); }
}

/* ── Enchanted Light Explosion (on catch) ──────────────── */
.catcher-light-explosion {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 30;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(253, 230, 138, 0.9) 0%,
        rgba(251, 191, 36, 0.6) 30%,
        rgba(251, 191, 36, 0.2) 60%,
        transparent 80%
    );
    animation: catcherLightExplode 0.6s ease-out forwards;
}

@keyframes catcherLightExplode {
    0%   { width: 0; height: 0; opacity: 1; }
    30%  { width: 200px; height: 200px; opacity: 0.9; }
    60%  { width: 300px; height: 300px; opacity: 0.5; }
    100% { width: 360px; height: 360px; opacity: 0; }
}

.catcher-light-ray {
    position: absolute;
    width: 3px;
    height: 40px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 29;
    transform-origin: center top;
    transform: translate(-50%, 0) rotate(var(--ray-angle, 0deg));
    background: linear-gradient(
        to bottom,
        rgba(253, 230, 138, 0.9),
        rgba(251, 191, 36, 0) 100%
    );
    animation: catcherRayShoot 0.5s ease-out forwards;
}

@keyframes catcherRayShoot {
    0%   { height: 0; opacity: 1; }
    40%  { height: 80px; opacity: 0.8; }
    100% { height: 120px; opacity: 0; }
}

/* ── Card States ───────────────────────────────────────── */
.catcher-card-caught {
    transform: scale(1.2) rotate(5deg) !important;
    opacity: 0;
    transition: all 0.3s ease-out !important;
    pointer-events: none;
}

.catcher-card-missed {
    transform: scale(0.6) rotate(-10deg) translateY(20px) !important;
    opacity: 0;
    transition: all 0.4s ease-in !important;
    pointer-events: none;
    filter: grayscale(1) brightness(0.4);
}

/* ── Floating Score ────────────────────────────────────── */
.catcher-float-score {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-weight: 900;
    color: #69db7c;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 10;
    animation: catcherFloatUp 0.6s ease-out forwards;
}

.catcher-float-score.enchanted {
    color: #fbbf24;
    font-size: 1.6rem;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

@keyframes catcherFloatUp {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -120%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -180%) scale(0.8); }
}

/* ── Catch Sparkles ────────────────────────────────────── */
.catcher-sparkle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    animation: catcherSparkBurst 0.5s ease-out forwards;
}

@keyframes catcherSparkBurst {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

/* ── Combo Badge ───────────────────────────────────────── */
.catcher-combo {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
}

.catcher-combo.active {
    opacity: 1;
    animation: catcherComboPop 0.4s ease-out;
}

@keyframes catcherComboPop {
    0% { transform: translateX(-50%) scale(0.6); }
    60% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

/* ── How-to ────────────────────────────────────────────── */
.catcher-howto {
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted, #6e7681);
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    line-height: 1.5;
}

/* ── Game Over Overlay ─────────────────────────────────── */
.catcher-game-over {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 14, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 50;
}

.catcher-game-over.active {
    opacity: 1;
    visibility: visible;
}

.catcher-over-content {
    text-align: center;
    padding: 32px;
}

.catcher-over-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: catcherOverBounce 0.6s ease-out;
}

@keyframes catcherOverBounce {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.catcher-over-content h3 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 4px;
}

.catcher-over-content p {
    color: var(--text-secondary, #8b949e);
    font-size: 0.9rem;
    margin: 0 0 4px;
}

.catcher-over-score {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
    margin-bottom: 16px;
}

.catcher-btn-again {
    padding: 10px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0d1117;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}

.catcher-btn-again:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

/* ── Diamond Reward ────────────────────────────────────── */
.catcher-diamond-reward {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fbbf24;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.catcher-diamond-reward.show {
    opacity: 1;
    transform: translateY(0);
}

.catcher-multi-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35, #f7931a);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 4px;
    animation: multiBadgePop .35s ease-out;
}

/* ── Mobile Responsive ─────────────────────────────────── */
@media (max-width: 640px) {
    .catcher-modal {
        padding: 14px;
        border-radius: 14px;
        max-height: 98vh;
    }

    .catcher-title { font-size: 1.1rem; }

    .catcher-field {
        height: 320px;
    }

    .catcher-card {
        width: 65px;
        height: 90px;
    }

    .catcher-stats { gap: 4px; }
    .catcher-stat { padding: 6px 4px; }
    .catcher-stat-value { font-size: 0.85rem; }
}

/* ══════════════════════════════════════════════════════════
   SHARED: Game Start Overlay (all 3 mini-games)
   ══════════════════════════════════════════════════════════ */
.game-start-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 18, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: inherit;
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.game-start-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}
.game-start-content {
    text-align: center;
    animation: startPulseIn 0.6s ease-out;
}
.game-start-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    animation: startIconFloat 2s ease-in-out infinite;
}
.game-start-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f0f4ff;
    margin: 0 0 6px;
    letter-spacing: 0.02em;
}
.game-start-content p {
    font-size: 0.82rem;
    color: rgba(240, 244, 255, 0.55);
    margin: 0 0 20px;
}
.game-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    color: #0d1117;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.35),
                0 0 30px rgba(251, 191, 36, 0.15);
    transition: all 0.25s ease;
    animation: startBtnGlow 2s ease-in-out infinite;
}
.game-start-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 28px rgba(251, 191, 36, 0.5),
                0 0 40px rgba(251, 191, 36, 0.25);
}
.game-start-btn:active {
    transform: scale(0.97);
}

@keyframes startPulseIn {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes startIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes startBtnGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(251,191,36,0.35), 0 0 30px rgba(251,191,36,0.15); }
    50% { box-shadow: 0 4px 28px rgba(251,191,36,0.5), 0 0 40px rgba(251,191,36,0.25); }
}

/* ── Catcher Level Picker ──────────────────────────────── */
.catcher-level-picker {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}
.catcher-level-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    background: rgba(251, 191, 36, 0.08);
    border: 2px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}
.catcher-level-btn:hover {
    border-color: rgba(251, 191, 36, 0.4);
    color: #e2e8f0;
}
.catcher-level-btn.active {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
    border-color: #fbbf24;
    color: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

/* ══════════════════════════════════════════════════════════
   INK CATCHER: 50+ Combo Fire & Shake Effects
   ══════════════════════════════════════════════════════════ */
.catcher-modal.combo-inferno {
    animation: catcherFrameShake 0.15s ease-in-out;
}
@keyframes catcherFrameShake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-3px, 2px); }
    40% { transform: translate(3px, -2px); }
    60% { transform: translate(-2px, -1px); }
    80% { transform: translate(2px, 1px); }
}

/* Fire border glow when combo >= 50 */
.catcher-modal.combo-fire-active {
    box-shadow:
        0 0 20px rgba(255, 100, 0, 0.4),
        0 0 40px rgba(255, 60, 0, 0.2),
        inset 0 0 30px rgba(255, 100, 0, 0.05);
    border-color: rgba(255, 120, 20, 0.5);
}

/* Fire particles around frame */
.catcher-fire-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    animation: fireParticleRise 0.6s ease-out forwards;
}
@keyframes fireParticleRise {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.3);
    }
}
