/* ============================================
   FIGHT ME: HAMSTER DICE — Design System
   Dark violet / neon accent theme
   ============================================ */

/* ── Design Tokens ── */
:root {
    /* Background */
    --bg-primary: #0c193d;
    --bg-secondary: #4b1466;
    --bg-card: #1a1f3a;
    --bg-panel: #0f0c28;
    --gradient-bg: linear-gradient(180deg, #0c193d 0%, #1a0d3a 50%, #4b1466 100%);

    /* Accents */
    --accent: #c4f542;
    --accent-hover: #d4ff5a;
    --accent-glow: rgba(196, 245, 66, 0.4);
    --neon-purple: #8b5cf6;
    --neon-cyan: #00e5ff;
    --gold: #ffd700;

    /* Faction colors */
    --faction-1: #ff6b35; /* Urban Brutes */
    --faction-2: #00bcd4; /* Shadows */
    --faction-3: #8b5cf6; /* Neon Cyborgs */
    --faction-4: #10b981; /* Night Beasts */
    --faction-5: #c4a35a; /* Hamstormers */
    --faction-6: #ff5757; /* Crimson Cartel */

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    --text-muted: rgba(168, 178, 209, 0.5);

    /* Currency */
    --donut-color: #ff9ff3;
    --gem-color: #54e3f7;
    --star-color: #ffd700;

    /* Spacing */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 32px;

    /* Radius */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 50%;
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Fredoka', sans-serif;
    background: #050814; /* Dark off-canvas background for wide screens */
    color: var(--text-primary);
    display: flex;
    justify-content: center;
}

#game-container {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: var(--gradient-bg);
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    container-type: inline-size;
    container-name: game;
}

/* ══════════════════════════════════════════════
   HUD — Top bar with currencies
   ══════════════════════════════════════════════ */

.hud {
    padding: var(--sp-sm) var(--sp-md);
    padding-top: max(var(--sp-sm), env(safe-area-inset-top));
    background: linear-gradient(180deg, rgba(12, 25, 61, 0.9), transparent);
    z-index: 10;
    display: flex;
    justify-content: center;
    position: relative;
}

.header-controls {
    position: absolute;
    right: var(--sp-md);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: var(--sp-sm);
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: var(--r-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn.muted {
    background: rgba(255, 87, 87, 0.2);
    border-color: #ff5757;
}

.icon-btn:active {
    transform: scale(0.9);
}

.currency-display {
    display: flex;
    gap: var(--sp-lg);
}

.currency {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: var(--sp-xs) var(--sp-md) var(--sp-xs) var(--sp-sm);
    border-radius: var(--r-xl);
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    min-width: 95px;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.15);
}

.currency-icon {
    font-size: 1.2rem;
}

.currency.donuts span:last-child { color: var(--donut-color); }
.currency.gems span:last-child { color: var(--gem-color); }

.num-pulse {
    animation: numPulse 0.3s ease;
}

@keyframes numPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); color: var(--accent); }
}

/* ══════════════════════════════════════════════
   Progress Roadmap
   ══════════════════════════════════════════════ */

.roadmap-container {
    padding: var(--sp-xs) var(--sp-md);
    cursor: pointer;
    position: relative;
    z-index: 20;
}

.roadmap {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    background: #1a1f3a;
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--r-lg);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 2px 15px rgba(139, 92, 246, 0.1);
}

.stars-collected {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
    font-size: 1rem;
    font-weight: 700;
    color: var(--star-color);
    min-width: 55px;
}

.star-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
}

.progress-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.progress-bar {
    flex: 1;
    height: 18px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 9px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--accent));
    border-radius: 7px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

.progress-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.next-reward {
    cursor: pointer;
}

.next-reward .reward-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.5));
    animation: giftPulse 2s infinite;
}

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

/* ══════════════════════════════════════════════
   Game Board
   ══════════════════════════════════════════════ */

.game-board-container {
    flex: 1;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
}

@container game (min-width: 420px) { /* Preserved just in case we need other overrides */ }

.board-bg-image {
    position: absolute;
    inset: -50px;
    background: url('../assets/images/board_bg.png') center/cover no-repeat;
    opacity: 1;
    z-index: 0;
    border-radius: var(--r-lg);
}

.game-board {
    position: relative;
    width: 560px;
    height: 560px;
    z-index: 5;
    margin: 20px;
}

/* ── Cell Styles ── */

.board-cell {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #1a1f3a;
    border: 2px solid rgba(139, 92, 246, 0.4);
    box-shadow:
        0 3px 0 rgba(75, 20, 102, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.board-cell.home {
    background: #2a2510;
    border-color: var(--gold);
    box-shadow:
        0 3px 0 rgba(200, 150, 0, 0.5),
        0 0 18px rgba(255, 215, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.4);
}

.board-cell.empty {
    background: #12163a;
    border-color: rgba(139, 92, 246, 0.15);
    box-shadow: none;
}

.board-cell.faction {
    background: var(--faction-color, #8b5cf6);
    border-color: color-mix(in srgb, var(--faction-color, #8b5cf6) 70%, white);
    box-shadow:
        0 3px 0 color-mix(in srgb, var(--faction-color, #8b5cf6) 60%, black),
        0 0 12px color-mix(in srgb, var(--faction-color, #8b5cf6) 50%, transparent),
        0 4px 12px rgba(0, 0, 0, 0.4);
}

.board-cell.locked {
    opacity: 1;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.25);
    filter: brightness(0.6);
}

.board-cell.locked::after {
    content: '🔒';
    position: absolute;
    font-size: 0.9rem;
    top: -4px;
    right: -4px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
    z-index: 3;
}

.board-cell.unlocked {
    animation: cellGlow 2s infinite;
    border-style: solid;
}

@keyframes cellGlow {
    0%, 100% {
        box-shadow:
            0 3px 0 rgba(75, 20, 102, 0.6),
            0 4px 12px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow:
            0 3px 0 rgba(75, 20, 102, 0.6),
            0 4px 12px rgba(0, 0, 0, 0.4),
            0 0 20px var(--faction-color, var(--neon-purple));
    }
}

.board-cell.current {
    transform: scale(1.18);
    z-index: 10 !important;
    box-shadow:
        0 3px 0 rgba(75, 20, 102, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 25px var(--accent-glow);
    border-color: var(--accent);
}

.cell-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.cell-faction-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) brightness(10);
}

.cell-value {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    margin-top: -2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1;
}

.cell-value-big {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

/* ── Hamster Mascot ── */

.hamster-mascot {
    position: absolute;
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    transform-origin: center bottom;
}

.hamster-mascot img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
    mix-blend-mode: lighten;
    background: transparent;
    border-radius: 50%;
}

.hamster-mascot.hopping {
    animation: hop 0.2s ease-in-out;
}

@keyframes hop {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -22px; }
}

/* ── 3D Dice ── */

.dice-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    pointer-events: none;
}

.dice-3d-container {
    width: 100px;
    height: 100px;
    perspective: 600px;
}

.dice-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-15deg) rotateY(15deg);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dice-cube.rolling {
    animation: diceRoll 0.9s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes diceRoll {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    20% { transform: rotateX(180deg) rotateY(90deg) rotateZ(45deg); }
    40% { transform: rotateX(360deg) rotateY(180deg) rotateZ(90deg); }
    60% { transform: rotateX(540deg) rotateY(270deg) rotateZ(135deg); }
    80% { transform: rotateX(720deg) rotateY(360deg) rotateZ(180deg); }
    100% { transform: rotateX(0) rotateY(0) rotateZ(0); }
}

.dice-face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), var(--bg-card));
    border: 3px solid var(--neon-purple);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow:
        inset 0 0 20px rgba(139, 92, 246, 0.15),
        0 0 8px rgba(139, 92, 246, 0.3);
    backface-visibility: visible;
}

.dice-face.front  { transform: translateZ(50px); }
.dice-face.back   { transform: rotateY(180deg) translateZ(50px); }
.dice-face.right  { transform: rotateY(90deg) translateZ(50px); }
.dice-face.left   { transform: rotateY(-90deg) translateZ(50px); }
.dice-face.top    { transform: rotateX(90deg) translateZ(50px); }
.dice-face.bottom { transform: rotateX(-90deg) translateZ(50px); }

/* ══════════════════════════════════════════════
   Full Screen Award Animation
   ══════════════════════════════════════════════ */

.award-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.award-overlay.show {
    opacity: 1;
    visibility: visible;
}

.award-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
}

.award-overlay.show .award-content {
    animation: awardPop 0.7s ease forwards;
}

@keyframes awardPop {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.award-icon {
    font-size: 5rem;
    filter: drop-shadow(0 4px 20px rgba(139, 92, 246, 0.6));
    animation: awardFloat 0.6s ease infinite alternate;
}

@keyframes awardFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.award-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow), 0 3px 10px rgba(0, 0, 0, 0.5);
}

/* ══════════════════════════════════════════════
   Action Bar — Bottom fixed
   ══════════════════════════════════════════════ */

.action-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-md);
    padding-bottom: max(var(--sp-md), env(safe-area-inset-bottom));
    background: var(--bg-panel);
    border-top: 2px solid rgba(139, 92, 246, 0.4);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(139, 92, 246, 0.15);
}

#game-container::after {
    content: '';
    display: block;
    height: 100px;
}

.action-btn {
    background: var(--bg-card);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: var(--r-md);
    padding: var(--sp-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 60px;
    position: relative;
    font-family: inherit;
}

.action-btn:active {
    transform: scale(0.93);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.action-btn .btn-icon { font-size: 1.3rem; }

.action-btn .btn-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.progress-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, var(--neon-purple), #a855f7);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-panel);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.roll-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: linear-gradient(180deg, var(--accent), #a8d935);
    border: 3px solid var(--accent-hover);
    border-radius: var(--r-lg);
    padding: var(--sp-sm) var(--sp-md);
    color: #0c193d;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 0 #7a9f2a, 0 0 20px var(--accent-glow);
    transition: all 0.15s;
}

.roll-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #7a9f2a, 0 0 12px var(--accent-glow);
}

.roll-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.roll-text {
    font-size: 1.2rem;
    font-weight: 700;
}

.roll-cost {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.8;
}

/* ══════════════════════════════════════════════
   Popups — Dark glass overlays
   ══════════════════════════════════════════════ */

.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: var(--sp-md);
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup {
    background: linear-gradient(180deg, rgba(26, 31, 58, 0.98), rgba(12, 25, 61, 0.98));
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: var(--r-xl);
    padding: var(--sp-xl);
    text-align: center;
    max-width: 360px;
    width: 100%;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow:
        0 0 40px rgba(139, 92, 246, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

.popup-overlay.show .popup {
    transform: scale(1) translateY(0);
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-md);
    padding-bottom: var(--sp-md);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.popup-header.gold {
    border-bottom-color: rgba(255, 215, 0, 0.3);
}

.popup-header-icon { font-size: 1.5rem; }

.popup-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-icon {
    font-size: 3.5rem;
    margin-bottom: var(--sp-md);
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.4));
}

.popup-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--sp-sm);
    color: var(--accent);
}

.popup-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--sp-lg);
    line-height: 1.4;
}

.popup-btn {
    background: linear-gradient(180deg, var(--accent), #a8d935);
    color: #0c193d;
    border: none;
    border-radius: var(--r-md);
    padding: var(--sp-sm) var(--sp-xl);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 0 #7a9f2a, 0 0 15px var(--accent-glow);
    transition: all 0.15s;
    text-transform: uppercase;
}

.popup-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #7a9f2a;
}

.popup-close-x {
    position: absolute;
    top: var(--sp-md);
    right: var(--sp-md);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--r-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
}

.popup-close-x:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

/* ── Dice selection grid ── */

.dice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.dice-option {
    background: rgba(26, 31, 58, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--r-md);
    padding: var(--sp-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.dice-option.selected {
    border-color: var(--accent);
    background: rgba(196, 245, 66, 0.08);
    box-shadow: 0 0 15px var(--accent-glow);
}

.dice-option:active {
    transform: scale(0.95);
}

.dice-shape {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.dice-info {
    text-align: center;
}

.dice-cost {
    font-size: 0.8rem;
    color: var(--donut-color);
}

.dice-range {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── Sets grid ── */

.sets-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--sp-md);
}

.sets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
}

.set-item {
    background: rgba(26, 31, 58, 0.5);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--r-md);
    padding: var(--sp-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-xs);
    transition: all 0.3s;
}

.set-item.complete {
    border-color: var(--accent);
    background: rgba(196, 245, 66, 0.08);
    box-shadow: 0 0 12px var(--accent-glow);
}

.set-header {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
}

.set-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.set-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.set-dots {
    display: flex;
    gap: var(--sp-xs);
}

.set-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.set-dot.filled {
    background: var(--faction-color, var(--accent));
    border-color: var(--faction-color, var(--accent));
    box-shadow: 0 0 6px var(--faction-color, var(--accent-glow));
}

.set-bonus {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--star-color);
}

/* ── Rewards list ── */

.current-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--star-color);
    margin-bottom: var(--sp-md);
}

.rewards-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: var(--sp-md);
}

.reward-tier {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm);
    border-radius: var(--r-sm);
    margin-bottom: var(--sp-xs);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.reward-tier.current {
    border-color: var(--accent);
    background: rgba(196, 245, 66, 0.06);
}

.reward-tier.unlocked {
    opacity: 0.5;
}

.reward-tier.claimable {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(76, 175, 80, 0); }
    50% { box-shadow: 0 0 8px rgba(76, 175, 80, 0.3); }
}

.reward-tier-stars {
    min-width: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--star-color);
}

.reward-tier-icon { font-size: 1.3rem; }

.reward-tier-desc {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: left;
}

.reward-tier-action { font-size: 1rem; min-width: 70px; text-align: center; }

.claim-btn {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}

.claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.5);
}

.claim-btn:active {
    transform: scale(0.95);
}

/* ── Reward Badge ── */

.next-reward {
    position: relative;
}

.reward-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b3b;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    animation: badge-bounce 0.5s ease;
}

@keyframes badge-bounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ── Rules ── */

.rules-content { text-align: left; }

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.rules-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.rules-list li strong {
    color: var(--text-primary);
}
