/* ADNetwork Games — Shared Styles */
.wfg-game {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem;
    background: #1a1a2e;
    border-radius: 16px;
    color: #fff;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.wfg-game-header { margin-bottom: 1.5rem; }
.wfg-game-header h2 { margin: 0 0 .5rem; font-size: 1.8rem; }
.wfg-balance { color: #aaa; font-size: .95rem; }
.wfg-balance-amount { color: #4ade80; font-weight: 700; }

/* Coin */
.wfg-coin-container {
    perspective: 600px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
}
.wfg-coin {
    width: 120px; height: 120px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .1s;
}
.wfg-coin.flipping {
    animation: coinFlip 1.5s ease-out forwards;
}
.wfg-coin.flipping-tails {
    animation: coinFlipTails 1.5s ease-out forwards;
}
.wfg-coin-side {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    backface-visibility: hidden;
}
.wfg-coin-heads { background: linear-gradient(145deg, #ffd700, #daa520); }
.wfg-coin-tails {
    background: linear-gradient(145deg, #c0c0c0, #808080);
    transform: rotateY(180deg);
}
@keyframes coinFlip {
    0% { transform: rotateY(0); }
    80% { transform: rotateY(1800deg); }
    100% { transform: rotateY(1800deg); }
}
@keyframes coinFlipTails {
    0% { transform: rotateY(0); }
    80% { transform: rotateY(1980deg); }
    100% { transform: rotateY(1980deg); }
}

/* Result */
.wfg-result {
    font-size: 1.3rem;
    font-weight: 700;
    padding: .8rem;
    border-radius: 8px;
    margin: 1rem 0;
}
.wfg-result.win { background: rgba(74, 222, 128, .2); color: #4ade80; }
.wfg-result.lose { background: rgba(248, 113, 113, .2); color: #f87171; }

/* Controls */
.wfg-controls { margin-top: 1.5rem; }
.wfg-bet-group { margin-bottom: 1rem; }
.wfg-bet-group label { display: block; margin-bottom: .4rem; color: #aaa; }
.wfg-bet-input {
    display: flex; gap: .4rem;
    align-items: center; justify-content: center;
}
.wfg-bet-input input {
    width: 120px; text-align: center;
    background: #16213e; border: 1px solid #333;
    color: #fff; border-radius: 8px; padding: .5rem .8rem;
    font-size: 1.2rem; font-weight: 700;
    -moz-appearance: textfield;
}
.wfg-bet-input input::-webkit-outer-spin-button,
.wfg-bet-input input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
.wfg-btn-small {
    background: #16213e; border: 1px solid #444;
    color: #aaa; border-radius: 6px; padding: .4rem .6rem;
    cursor: pointer; font-size: .85rem;
}
.wfg-btn-small:hover { background: #1a1a3e; color: #fff; }

.wfg-choice-group {
    display: flex; gap: .8rem;
    justify-content: center;
    margin: 1rem 0;
}
.wfg-btn {
    padding: .7rem 1.5rem;
    border-radius: 10px;
    border: 2px solid #333;
    background: #16213e;
    color: #ccc;
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s;
}
.wfg-btn:hover { border-color: #4ade80; color: #fff; }
.wfg-btn-choice.active { border-color: #4ade80; color: #4ade80; background: rgba(74, 222, 128, .1); }

.wfg-btn-play {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000; font-weight: 700;
    border: none; padding: 1rem 3rem;
    border-radius: 12px; font-size: 1.2rem;
    cursor: pointer; width: 100%;
    transition: transform .15s, box-shadow .15s;
}
.wfg-btn-play:hover { transform: scale(1.03); box-shadow: 0 0 20px rgba(74, 222, 128, .3); }
.wfg-btn-play:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* History dots */
.wfg-history { margin-top: 1.5rem; }
.wfg-history h3 { color: #aaa; font-size: .9rem; margin-bottom: .5rem; }
.wfg-history-dots {
    display: flex; gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}
.wfg-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    display: inline-block;
}
.wfg-dot.win { background: #4ade80; }
.wfg-dot.lose { background: #f87171; }
.wfg-dot.draw { background: #facc15; }

/* ── HiLo ──────────────────────────────────────────────── */
.wfg-game-subtitle { color: #888; font-size: .9rem; margin: 0; }

.wfg-hilo-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin: 1.5rem 0;
    min-height: 170px;
}

/* Card styling */
.wfg-card {
    width: 110px;
    height: 160px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    position: relative;
    transition: transform .4s ease, opacity .3s;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.wfg-card-back {
    background: linear-gradient(135deg, #2d2d5e, #1a1a3e);
    border: 2px solid #444;
    color: #555;
}
.wfg-card-face {
    background: linear-gradient(135deg, #fefefe, #e8e8e8);
    border: 2px solid #bbb;
    color: #1a1a2e;
}
.wfg-card-face.red { color: #dc2626; }
.wfg-card-face.black { color: #1a1a2e; }

.wfg-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}
.wfg-card-suit {
    font-size: 1rem;
    margin-top: .2rem;
}

.wfg-card-small {
    width: 80px;
    height: 120px;
    font-size: 1.5rem;
}
.wfg-card-faded { opacity: .5; }

.wfg-card.reveal {
    animation: cardReveal .5s ease forwards;
}
@keyframes cardReveal {
    0% { transform: rotateY(90deg) scale(.8); }
    50% { transform: rotateY(0deg) scale(1.05); }
    100% { transform: rotateY(0deg) scale(1); }
}

.wfg-card.shake {
    animation: cardShake .5s ease;
}
@keyframes cardShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Stats bar */
.wfg-hilo-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
    padding: .8rem;
    background: rgba(255,255,255,.05);
    border-radius: 10px;
}
.wfg-hilo-stat { text-align: center; }
.wfg-hilo-stat-label {
    display: block;
    font-size: .75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.wfg-hilo-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}
.wfg-hilo-stat-payout .wfg-hilo-stat-value { color: #4ade80; }

/* Guess buttons */
.wfg-hilo-guess-buttons {
    display: flex;
    gap: .8rem;
    justify-content: center;
    margin-bottom: 1rem;
}
.wfg-hilo-btn-higher {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #fff !important;
    border: none !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    flex: 1;
    transition: transform .15s, box-shadow .15s;
}
.wfg-hilo-btn-higher:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(59, 130, 246, .4);
}
.wfg-hilo-btn-lower {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    border: none !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    flex: 1;
    transition: transform .15s, box-shadow .15s;
}
.wfg-hilo-btn-lower:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(239, 68, 68, .4);
}

.wfg-hilo-btn-cashout {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #000 !important;
    border: none !important;
    padding: .8rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    width: 100%;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    margin-top: .5rem;
}
.wfg-hilo-btn-cashout:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(245, 158, 11, .4);
}

.wfg-hilo-btn-higher:disabled,
.wfg-hilo-btn-lower:disabled,
.wfg-hilo-btn-cashout:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive */
/* ── Mini-Lotto ──────────────────────────────────────── */

/* Jackpot display */
.wfg-lotto-jackpot {
    background: linear-gradient(135deg, rgba(245, 158, 11, .15), rgba(234, 179, 8, .1));
    border: 1px solid rgba(245, 158, 11, .3);
    border-radius: 12px;
    padding: 1.2rem;
    margin: 1rem 0;
    text-align: center;
}
.wfg-lotto-jackpot-label {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #f59e0b;
    margin-bottom: .3rem;
}
.wfg-lotto-jackpot-amount {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.wfg-lotto-jackpot-currency {
    color: #888;
    font-size: .8rem;
}

/* Countdown */
.wfg-lotto-countdown {
    margin: 1rem 0;
    text-align: center;
}
.wfg-lotto-countdown-label {
    display: block;
    color: #888;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .5rem;
}
.wfg-lotto-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
}
.wfg-lotto-timer-unit { text-align: center; }
.wfg-lotto-timer-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    background: #16213e;
    border-radius: 8px;
    padding: .3rem .6rem;
    min-width: 50px;
    font-variant-numeric: tabular-nums;
}
.wfg-lotto-timer-label {
    display: block;
    font-size: .65rem;
    color: #666;
    text-transform: uppercase;
}
.wfg-lotto-timer-sep {
    font-size: 1.5rem;
    font-weight: 700;
    color: #555;
    margin: 0 .1rem;
    align-self: flex-start;
    padding-top: .3rem;
}

/* Number grid */
.wfg-lotto-picker { margin: 1.5rem 0; }
.wfg-lotto-picker-info {
    color: #aaa;
    font-size: .9rem;
    margin-bottom: .8rem;
}
.wfg-lotto-picked-count {
    font-weight: 700;
    color: #4ade80;
}

.wfg-lotto-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .4rem;
    max-width: 360px;
    margin: 0 auto;
}
.wfg-lotto-number {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #333;
    border-radius: 50%;
    background: #16213e;
    color: #ccc;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wfg-lotto-number:hover {
    border-color: #4ade80;
    color: #fff;
    transform: scale(1.08);
}
.wfg-lotto-number.selected {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000;
    border-color: #4ade80;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(74, 222, 128, .3);
}
.wfg-lotto-number-shake {
    animation: cardShake .4s ease;
}

.wfg-lotto-actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-top: .8rem;
}

/* Buy section */
.wfg-lotto-buy { margin: 1rem 0; }
.wfg-lotto-remaining {
    color: #888;
    font-size: .8rem;
    margin-top: .4rem;
}

/* Lotto balls */
.wfg-lotto-ball {
    display: inline-flex;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #16213e;
    border: 2px solid #444;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    align-items: center;
    justify-content: center;
    margin: 2px;
}
.wfg-lotto-ball-winning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #000;
    border-color: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, .3);
}
.wfg-lotto-ball-match {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000;
    border-color: #4ade80;
}

/* Tickets */
.wfg-lotto-my-tickets { margin-top: 1.5rem; }
.wfg-lotto-my-tickets h3 { color: #aaa; font-size: .95rem; margin-bottom: .5rem; }
.wfg-lotto-empty { color: #555; font-style: italic; font-size: .85rem; }

.wfg-lotto-ticket {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .8rem;
    background: rgba(255,255,255,.03);
    border-radius: 8px;
    margin-bottom: .3rem;
}
.wfg-lotto-ticket-new {
    animation: cardReveal .4s ease;
}
.wfg-lotto-ticket-win {
    background: rgba(74, 222, 128, .1);
    border: 1px solid rgba(74, 222, 128, .2);
}
.wfg-lotto-ticket-id {
    color: #555;
    font-size: .75rem;
    min-width: 40px;
}
.wfg-lotto-ticket-numbers { display: flex; gap: 3px; flex-wrap: wrap; }
.wfg-lotto-ticket-result {
    color: #aaa;
    font-size: .85rem;
    margin-left: auto;
    white-space: nowrap;
}

/* Last draw */
.wfg-lotto-last-draw {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #222;
}
.wfg-lotto-last-draw h3 { color: #aaa; font-size: .95rem; margin-bottom: .5rem; }
.wfg-lotto-last-draw h3 small { color: #555; font-weight: 400; }
.wfg-lotto-winning-numbers {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: .8rem 0;
}
.wfg-lotto-pool-info { color: #666; font-size: .8rem; }
.wfg-lotto-my-results { margin-top: .5rem; }

/* Prize table */
.wfg-lotto-prizes {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #222;
}
.wfg-lotto-prizes h3 { color: #aaa; font-size: .95rem; margin-bottom: .5rem; }
.wfg-lotto-prize-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.wfg-lotto-prize-table td {
    padding: .4rem .6rem;
    border-bottom: 1px solid #1a1a3e;
    color: #bbb;
}
.wfg-lotto-prize-table tr:first-child td { color: #f59e0b; font-weight: 700; }
.wfg-lotto-prize-table td:first-child { font-weight: 700; color: #fff; }
.wfg-lotto-prize-table td:last-child { text-align: right; color: #888; }

/* ── Crash Game ─────────────────────────────────────── */

.wfg-crash-display {
    position: relative;
    margin: 1rem 0 1.5rem;
}

.wfg-crash-graph {
    background: #0d1117;
    border-radius: 12px;
    border: 1px solid #222;
    overflow: hidden;
    position: relative;
}
.wfg-crash-graph canvas {
    display: block;
    width: 100%;
    height: auto;
}

.wfg-crash-multiplier {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 2;
}
.wfg-crash-multi-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: #4ade80;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(74, 222, 128, .4);
    transition: color .3s;
}
.wfg-crash-multi-x {
    font-size: 2rem;
    font-weight: 700;
    color: #888;
}
.wfg-crash-multiplier.crashed .wfg-crash-multi-value {
    color: #f87171;
    text-shadow: 0 0 30px rgba(248, 113, 113, .4);
}
.wfg-crash-multiplier.cashed .wfg-crash-multi-value {
    color: #fbbf24;
    text-shadow: 0 0 30px rgba(251, 191, 36, .4);
}

/* Cashout button — big, pulsing, attention-grabbing */
.wfg-crash-btn-cashout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-weight: 800;
    font-size: 1.3rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    animation: crashPulse 1.5s ease-in-out infinite;
}
.wfg-crash-btn-cashout:hover {
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(245, 158, 11, .5);
}
.wfg-crash-btn-cashout:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    animation: none;
    box-shadow: none;
}
.wfg-crash-cashout-amount {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(0, 0, 0, .7);
}

@keyframes crashPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, .2); }
    50% { box-shadow: 0 0 25px rgba(245, 158, 11, .5); }
}

/* Auto cashout input group */
.wfg-crash-auto-group {
    margin-bottom: 1rem;
}
.wfg-crash-auto-group label {
    display: block;
    margin-bottom: .4rem;
    color: #aaa;
}

/* Provably fair section */
.wfg-crash-fair {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #222;
}
.wfg-crash-fair details {
    color: #666;
    font-size: .8rem;
}
.wfg-crash-fair summary {
    cursor: pointer;
    color: #888;
    font-size: .85rem;
}
.wfg-crash-fair-details {
    margin-top: .5rem;
    background: rgba(255,255,255,.03);
    border-radius: 8px;
    padding: .8rem;
    word-break: break-all;
}
.wfg-crash-fair-details code {
    font-size: .75rem;
    color: #aaa;
    background: rgba(255,255,255,.05);
    padding: .1rem .4rem;
    border-radius: 4px;
}

/* History chips */
.wfg-crash-history { margin-top: 1.5rem; }
.wfg-crash-history h3 { color: #aaa; font-size: .9rem; margin-bottom: .5rem; }
.wfg-crash-history-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.wfg-crash-chip {
    display: inline-block;
    padding: .25rem .6rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.wfg-crash-chip.win {
    background: rgba(74, 222, 128, .15);
    color: #4ade80;
}
.wfg-crash-chip.lose {
    background: rgba(248, 113, 113, .15);
    color: #f87171;
}
.wfg-crash-chip.big {
    background: rgba(251, 191, 36, .15);
    color: #fbbf24;
}

/* ── Rock-Paper-Scissors ─────────────────────────────── */

.wfg-rps-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    min-height: 150px;
}
.wfg-rps-hand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
}
.wfg-rps-emoji {
    font-size: 4rem;
    display: block;
    transition: transform .3s ease;
}
.wfg-rps-hand.bounce .wfg-rps-emoji {
    animation: rpsBounce .6s ease 3;
}
.wfg-rps-hand.reveal .wfg-rps-emoji {
    animation: rpsReveal .4s ease forwards;
}
.wfg-rps-hand.winner .wfg-rps-emoji {
    animation: rpsPop .4s ease forwards;
}
.wfg-rps-hand.loser .wfg-rps-emoji {
    opacity: .4;
    transform: scale(.85);
}
.wfg-rps-label {
    font-size: .8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.wfg-rps-vs {
    font-size: 1.8rem;
    font-weight: 900;
    color: #444;
    letter-spacing: 2px;
}

@keyframes rpsBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}
@keyframes rpsReveal {
    0% { transform: scale(0) rotate(-20deg); }
    70% { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes rpsPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1.1); }
}

/* Choice buttons */
.wfg-rps-choices {
    display: flex;
    gap: .8rem;
    justify-content: center;
    margin: 1rem 0;
}
.wfg-rps-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .8rem 1.2rem;
    border-radius: 12px;
    border: 2px solid #333;
    background: #16213e;
    color: #ccc;
    cursor: pointer;
    transition: all .2s;
    min-width: 80px;
}
.wfg-rps-choice:hover {
    border-color: #4ade80;
    color: #fff;
    transform: translateY(-2px);
}
.wfg-rps-choice.active {
    border-color: #4ade80;
    color: #4ade80;
    background: rgba(74, 222, 128, .1);
}
.wfg-rps-choice-emoji { font-size: 2rem; }
.wfg-rps-choice-label { font-size: .8rem; font-weight: 600; }

.wfg-result.draw {
    background: rgba(250, 204, 21, .15);
    color: #facc15;
}

/* Responsive */
@media (max-width: 520px) {
    .wfg-game { margin: 1rem; padding: 1.2rem; }
    .wfg-coin { width: 90px; height: 90px; }
    .wfg-coin-side { font-size: 2.2rem; }
    .wfg-card { width: 90px; height: 130px; font-size: 1.8rem; }
    .wfg-card-small { width: 65px; height: 95px; font-size: 1.2rem; }
    .wfg-hilo-stats { gap: .8rem; padding: .5rem; }
    .wfg-hilo-stat-value { font-size: 1.1rem; }
    .wfg-lotto-grid { grid-template-columns: repeat(5, 1fr); }
    .wfg-lotto-number { font-size: .85rem; }
    .wfg-lotto-jackpot-amount { font-size: 1.8rem; }
    .wfg-lotto-timer-value { font-size: 1.4rem; min-width: 40px; }
    .wfg-lotto-ball { width: 30px; height: 30px; font-size: .8rem; }
    .wfg-crash-multi-value { font-size: 2.5rem; }
    .wfg-crash-btn-cashout { font-size: 1.1rem; padding: 1rem 1.5rem; }
    .wfg-rps-emoji { font-size: 3rem; }
    .wfg-rps-choice { min-width: 65px; padding: .6rem .8rem; }
    .wfg-rps-choice-emoji { font-size: 1.5rem; }
    .wfg-rps-vs { font-size: 1.4rem; }
}

/* ── Memory Game ─────────────────────────────────────── */

.wfg-memory { max-width: 560px; }

.wfg-memory-info {
    margin-bottom: 1.5rem;
    color: #ccc;
    font-size: .95rem;
}
.wfg-memory-info strong { color: #4ade80; }
.wfg-memory-info-sub {
    color: #888;
    font-size: .8rem;
    margin-top: .3rem;
}

/* Difficulty selector */
.wfg-memory-difficulty {
    margin-bottom: 1.5rem;
}
.wfg-memory-difficulty label {
    display: block;
    color: #aaa;
    margin-bottom: .5rem;
}
.wfg-memory-diff-buttons {
    display: flex;
    gap: .6rem;
    justify-content: center;
}
.wfg-memory-diff {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .8rem 1rem;
    border: 2px solid #333;
    border-radius: 12px;
    background: #16213e;
    color: #ccc;
    cursor: pointer;
    transition: all .2s;
    flex: 1;
    min-width: 0;
}
.wfg-memory-diff:hover {
    border-color: #4ade80;
    color: #fff;
}
.wfg-memory-diff.active {
    border-color: #4ade80;
    color: #4ade80;
    background: rgba(74, 222, 128, .1);
}
.wfg-memory-diff-icon { font-size: 1.4rem; }
.wfg-memory-diff-label { font-weight: 700; font-size: .95rem; }
.wfg-memory-diff-desc { font-size: .7rem; color: #888; }
.wfg-memory-diff.active .wfg-memory-diff-desc { color: #6be89b; }

/* Stats bar */
.wfg-memory-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: .8rem;
    background: rgba(255,255,255,.05);
    border-radius: 10px;
}
.wfg-memory-stat { text-align: center; }
.wfg-memory-stat-label {
    display: block;
    font-size: .75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.wfg-memory-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

/* Timer bar */
.wfg-memory-timer-bar {
    height: 6px;
    background: #16213e;
    border-radius: 3px;
    margin-bottom: 1.2rem;
    overflow: hidden;
}
.wfg-memory-timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 3px;
    width: 100%;
    transition: width .25s linear;
}
.wfg-memory-timer-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}
.wfg-memory-timer-fill.danger {
    background: linear-gradient(90deg, #f87171, #dc2626);
}

/* Card grid */
.wfg-memory-grid {
    display: grid;
    gap: 8px;
    justify-content: center;
    margin: 0 auto;
}
.wfg-memory-grid[data-cols="4"] {
    grid-template-columns: repeat(4, 1fr);
    max-width: 340px;
}
.wfg-memory-grid[data-cols="6"] {
    grid-template-columns: repeat(6, 1fr);
    max-width: 450px;
}

/* Memory card */
.wfg-memory-card {
    aspect-ratio: 1;
    border-radius: 10px;
    cursor: pointer;
    perspective: 600px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.wfg-memory-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .4s ease;
    border-radius: 10px;
}
.wfg-memory-card.flipped .wfg-memory-card-inner {
    transform: rotateY(180deg);
}
.wfg-memory-card.matched .wfg-memory-card-inner {
    transform: rotateY(180deg);
}

.wfg-memory-card-front,
.wfg-memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Back of card (hidden state) */
.wfg-memory-card-back {
    background: linear-gradient(135deg, #2d2d5e, #1a1a3e);
    border: 2px solid #444;
    font-size: 1.5rem;
    color: #555;
}
.wfg-memory-card-back::after {
    content: '?';
    font-weight: 800;
}

/* Front of card (revealed) */
.wfg-memory-card-front {
    background: linear-gradient(135deg, #fefefe, #e8e8e8);
    border: 2px solid #bbb;
    transform: rotateY(180deg);
    font-size: 2rem;
}

/* Matched state */
.wfg-memory-card.matched {
    pointer-events: none;
}
.wfg-memory-card.matched .wfg-memory-card-front {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-color: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, .3);
}
.wfg-memory-card.matched .wfg-memory-card-inner {
    animation: memoryMatch .5s ease;
}

/* Locked (no click during reveal) */
.wfg-memory-card.locked {
    pointer-events: none;
}

@keyframes memoryMatch {
    0% { transform: rotateY(180deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.12); }
    100% { transform: rotateY(180deg) scale(1); }
}

/* Game over summary */
.wfg-memory-summary {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    font-size: .9rem;
    color: #bbb;
    line-height: 1.8;
}
.wfg-memory-summary strong { color: #fff; }
.wfg-memory-summary .wfg-memory-reward-value {
    color: #4ade80;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 520px) {
    .wfg-memory { max-width: 100%; padding: 1rem; }
    .wfg-memory-grid { gap: 5px; }
    .wfg-memory-card-front { font-size: 1.4rem; }
    .wfg-memory-card-back::after { font-size: 1.2rem; }
    .wfg-memory-diff-buttons { gap: .4rem; }
    .wfg-memory-diff { padding: .6rem .5rem; }
    .wfg-memory-diff-label { font-size: .85rem; }
    .wfg-memory-stats { gap: .8rem; padding: .5rem; }
    .wfg-memory-stat-value { font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════════════════════
   QUIZ GAME
   ═══════════════════════════════════════════════════════════ */

.wfg-quiz { max-width: 540px; }

/* Info rows */
.wfg-quiz-info {
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
}
.wfg-quiz-info-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .35rem 0;
    font-size: .95rem;
    color: #bbb;
}
.wfg-quiz-info-icon { font-size: 1.1rem; }

/* Stats panel */
.wfg-quiz-stats-panel {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.2rem 0;
    padding: .8rem;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
}
.wfg-quiz-stat-item { text-align: center; }
.wfg-quiz-stat-label {
    display: block;
    font-size: .75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .2rem;
}
.wfg-quiz-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

/* Timer bar */
.wfg-quiz-timer-bar {
    height: 6px;
    background: #1a2332;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.wfg-quiz-timer-fill {
    height: 100%;
    background: #4ade80;
    border-radius: 3px;
    transition: width 0.1s linear;
}
.wfg-quiz-timer-fill.warning { background: #facc15; }
.wfg-quiz-timer-fill.danger { background: #f87171; }

/* Question stats row */
.wfg-quiz-question-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
}
.wfg-quiz-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    background: rgba(255,255,255,.08);
    color: #aaa;
}
.wfg-quiz-diff-badge[data-diff="easy"] { background: rgba(74,222,128,.15); color: #4ade80; }
.wfg-quiz-diff-badge[data-diff="medium"] { background: rgba(250,204,21,.15); color: #facc15; }
.wfg-quiz-diff-badge[data-diff="hard"] { background: rgba(248,113,113,.15); color: #f87171; }
.wfg-quiz-timer-text {
    font-size: .9rem;
    font-weight: 700;
    color: #fff;
    min-width: 2.5rem;
    text-align: right;
}

/* Streak bar */
.wfg-quiz-streak-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .4rem .8rem;
    margin-bottom: 1rem;
    background: rgba(251,146,60,.12);
    border-radius: 8px;
    font-size: .9rem;
    color: #fb923c;
    font-weight: 600;
    animation: quizStreakPulse 2s ease-in-out infinite;
}
@keyframes quizStreakPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .7; }
}

/* Question text */
.wfg-quiz-question-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    padding: .8rem;
    min-height: 3rem;
}

/* Answer buttons */
.wfg-quiz-answers {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
}
.wfg-quiz-answer-btn {
    display: flex;
    align-items: center;
    gap: .8rem;
    width: 100%;
    padding: .8rem 1rem;
    border: 2px solid #333;
    border-radius: 10px;
    background: rgba(255,255,255,.03);
    color: #ddd;
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s ease;
    text-align: left;
}
.wfg-quiz-answer-btn:hover:not(.disabled) {
    border-color: #4ade80;
    background: rgba(74,222,128,.08);
    color: #fff;
    transform: translateX(4px);
}
.wfg-quiz-answer-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    font-weight: 700;
    font-size: .85rem;
    color: #aaa;
    flex-shrink: 0;
}
.wfg-quiz-answer-btn:hover:not(.disabled) .wfg-quiz-answer-letter {
    background: rgba(74,222,128,.2);
    color: #4ade80;
}

/* Answer states */
.wfg-quiz-answer-btn.selected {
    border-color: #60a5fa;
    background: rgba(96,165,250,.1);
}
.wfg-quiz-answer-btn.correct {
    border-color: #4ade80;
    background: rgba(74,222,128,.15);
    color: #4ade80;
    animation: quizCorrectPop .4s ease;
}
.wfg-quiz-answer-btn.correct .wfg-quiz-answer-letter {
    background: #4ade80;
    color: #000;
}
.wfg-quiz-answer-btn.wrong {
    border-color: #f87171;
    background: rgba(248,113,113,.15);
    color: #f87171;
    animation: quizWrongShake .5s ease;
}
.wfg-quiz-answer-btn.wrong .wfg-quiz-answer-letter {
    background: #f87171;
    color: #fff;
}
.wfg-quiz-answer-btn.disabled {
    opacity: .5;
    cursor: default;
    pointer-events: none;
}

@keyframes quizCorrectPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}
@keyframes quizWrongShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Potential payout */
.wfg-quiz-potential {
    font-size: .9rem;
    color: #888;
    margin-top: .5rem;
}
#wfg-quiz-potential-amount {
    color: #4ade80;
    font-weight: 700;
}

/* Result details */
.wfg-quiz-result-details {
    font-size: .95rem;
    color: #aaa;
    margin: .5rem 0 1.5rem;
}

/* Result actions */
.wfg-quiz-result-actions {
    display: flex;
    gap: .8rem;
    justify-content: center;
}
.wfg-btn-secondary {
    background: rgba(255,255,255,.06);
    border: 1px solid #444;
    color: #aaa;
    padding: .7rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all .2s;
}
.wfg-btn-secondary:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

/* Done summary */
.wfg-quiz-done-summary {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.wfg-quiz-done-emoji {
    font-size: 3rem;
    margin-bottom: .5rem;
}
.wfg-quiz-done-summary h3 {
    margin: .5rem 0;
    font-size: 1.4rem;
}
.wfg-quiz-done-summary p {
    color: #aaa;
    margin: .3rem 0;
}

/* Quiz responsive */
@media (max-width: 520px) {
    .wfg-quiz { max-width: 100%; padding: 1rem; }
    .wfg-quiz-question-text { font-size: 1.05rem; padding: .5rem; }
    .wfg-quiz-answer-btn { padding: .6rem .8rem; font-size: .95rem; }
    .wfg-quiz-stats-panel { gap: .8rem; }
    .wfg-quiz-result-actions { flex-direction: column; }
}
