/* Tetress - Styles */
:root {
    --bg: #312e2b;
    --light: #e8dcc8;
    --dark: #8b9a7b;
    --highlight: #f7f769;
    --capture-red: #e74c3c;
    --gold: #c9a227;
    --white-piece: #fff;
    --black-piece: #312e2b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

#gameCanvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transition: filter 0.2s ease-out;
}

#gameCanvas.paused {
    filter: blur(4px) brightness(0.7);
}

#gameCanvas.shake {
    animation: shake 0.2s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-3px, 2px); }
    40% { transform: translate(3px, -2px); }
    60% { transform: translate(-2px, 3px); }
    80% { transform: translate(2px, -1px); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.6s ease-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    font-size: clamp(28px, 7vw, 40px);
    font-family: 'Noto Sans Symbols 2', serif;
    animation: float 3s ease-in-out infinite;
}

.logo-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(36px, 9vw, 52px);
    height: clamp(36px, 9vw, 52px);
    text-shadow: 0 0 20px rgba(201, 162, 39, 0.6);
}

.logo-grid span:nth-child(1) { color: #f5e6d3; }
.logo-grid span:nth-child(2) { color: var(--gold); }
.logo-grid span:nth-child(3) { color: var(--gold); }
.logo-grid span:nth-child(4) { color: #f5e6d3; }

.logo-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(36px, 9vw, 56px);
    font-weight: 900;
    letter-spacing: 0.25em;
    color: #f5e6d3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    margin-top: 8px;
}

.logo-subtitle {
    font-size: clamp(11px, 2.8vw, 14px);
    font-style: italic;
    letter-spacing: 0.4em;
    color: var(--gold);
    margin-top: 6px;
    text-transform: uppercase;
}

.loading-pieces {
    display: flex;
    gap: 3px;
    margin: 12px 0 8px 0;
    font-size: clamp(11px, 2.5vw, 14px);
    font-family: 'Noto Sans Symbols 2', serif;
}

.load-piece {
    color: #3c3a38;
    transition: color 0.3s ease-out, text-shadow 0.3s ease-out, opacity 0.4s ease-out;
}

.load-piece.lit {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(201, 162, 39, 0.6);
}

.loading-pieces.loaded .load-piece {
    opacity: 0;
}

.tap-prompt {
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 3vw, 16px);
    letter-spacing: 0.25em;
    color: var(--gold);
    opacity: 0;
    margin-top: 0;
    text-transform: uppercase;
    transition: opacity 0.5s ease-out;
}

.tap-prompt.visible {
    opacity: 1;
    animation: fadeInPulse 0.4s ease-out forwards, pulse 2s ease-in-out 0.4s infinite;
}

/* Game Over Overlay */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(32, 30, 27, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
    backdrop-filter: blur(4px);
}

.game-over-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.game-over-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(28px, 7vw, 42px);
    font-weight: 700;
    color: #f5e6d3;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.game-over-new-record {
    display: none;
    font-family: 'Cinzel', serif;
    font-size: clamp(14px, 3.5vw, 20px);
    font-weight: 700;
    color: #f7c631;
    letter-spacing: 0.2em;
    margin-bottom: 4px;
    animation: recordPulse 0.6s ease-out;
}

.game-over-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px 0;
    animation: badgeReveal 0.8s ease-out;
}

/* Badge Icon - PNG image */
.game-over-badge img {
    width: clamp(100px, 25vw, 140px);
    height: clamp(100px, 25vw, 140px);
    object-fit: contain;
    margin-bottom: 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-over-badge img:hover {
    transform: scale(1.08);
}

.badge-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 3vw, 16px);
    font-weight: 600;
    color: #c9a227;
    letter-spacing: 0.1em;
    margin-top: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes badgeReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.game-over-score {
    font-family: 'Cinzel', serif;
    font-size: clamp(36px, 9vw, 54px);
    font-weight: 900;
    color: var(--gold);
}

.score-breakdown {
    margin: 16px 0 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(220px, 50vw);
}

.score-breakdown-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(15px, 4vw, 18px);
    color: rgba(255,255,255,0.8);
}

.score-breakdown-line.bonus {
    background: rgba(201, 162, 39, 0.15);
    color: #f7c631;
}

.score-breakdown-line.total {
    background: rgba(255,255,255,0.1);
    font-weight: 600;
    font-size: clamp(17px, 4.5vw, 20px);
    border: 1px solid rgba(201, 162, 39, 0.3);
}

.game-over-tap {
    font-family: 'Cinzel', serif;
    font-size: clamp(11px, 2.8vw, 14px);
    letter-spacing: 0.25em;
    color: rgba(255,255,255,0.6);
    margin-top: 20px;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

.game-over-buttons {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    justify-content: center;
}

.game-over-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 700;
    letter-spacing: 0.15em;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--gold);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-out;
    text-transform: uppercase;
}

.game-over-btn:hover {
    background: var(--gold);
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.game-over-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(201, 162, 39, 0.3);
}

.btn-icon {
    font-size: clamp(16px, 4vw, 18px);
    line-height: 1;
}

.share-btn {
    border-color: rgba(201, 162, 39, 0.8);
}

.share-btn:hover {
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
}

/* Pause Overlay */
.pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
}

.pause-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.pause-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(28px, 7vw, 42px);
    font-weight: 700;
    color: #f5e6d3;
    letter-spacing: 0.25em;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Retro TV - Vintage Wood Style */
.retro-tv {
    position: relative;
    margin-bottom: 24px;
}

.tv-body {
    display: flex;
    width: clamp(200px, 55vw, 260px);
    height: clamp(120px, 32vw, 150px);
    background: linear-gradient(135deg, #5c4033 0%, #4a3728 50%, #3d2d22 100%);
    border-radius: 12px;
    padding: 10px;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border: 3px solid #3d2d22;
}

.tv-screen-area {
    flex: 1;
    background: #1a1a1a;
    border-radius: 6px;
    padding: 6px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.tv-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0a1510;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.9);
}

.tv-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    filter: saturate(0.8) contrast(1.1);
}

.tv-screen img.loaded {
    opacity: 1;
}

.tv-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12) 0%,
        transparent 40%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: 4px;
}

.tv-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.2) 0px,
        rgba(0, 0, 0, 0.2) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
}

.tv-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' fill='%23888'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    pointer-events: none;
    animation: staticNoise 0.06s steps(6) infinite;
    z-index: 2;
}

.tv-static.hidden {
    opacity: 0;
    transition: opacity 0.3s;
}

.tv-static.switching {
    animation: staticNoise 0.04s steps(8) infinite, staticBurst 0.6s ease-out;
    filter: brightness(1.2);
}

@keyframes staticNoise {
    0% { background-position: 0 0; }
    25% { background-position: 50px 30px; }
    50% { background-position: -30px 60px; }
    75% { background-position: 20px -40px; }
    100% { background-position: 70px -20px; }
}

@keyframes staticBurst {
    0% { opacity: 1; filter: brightness(1.8); }
    10% { opacity: 1; filter: brightness(1.4); }
    30% { opacity: 0.95; filter: brightness(1.2); }
    60% { opacity: 0.9; filter: brightness(1.1); }
    100% { opacity: 0.7; filter: brightness(1); }
}

.tv-channel {
    position: absolute;
    top: 6px;
    right: 8px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: bold;
    color: #0f0;
    text-shadow: 0 0 4px #0f0;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

.tv-channel.visible {
    opacity: 1;
}

.tv-panel {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
}

.tv-dial {
    width: 36px;
    height: 36px;
    background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
    border: 3px solid #3a3a3a;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow:
        0 3px 6px rgba(0,0,0,0.5),
        inset 0 1px 1px rgba(255,255,255,0.1),
        inset 0 -1px 2px rgba(0,0,0,0.3);
    transition: transform 0.2s ease-out;
}

.tv-dial:hover {
    box-shadow:
        0 3px 6px rgba(0,0,0,0.5),
        inset 0 1px 1px rgba(255,255,255,0.15),
        inset 0 -1px 2px rgba(0,0,0,0.3);
}

.dial-marker {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: center 13px;
    width: 4px;
    height: 10px;
    background: linear-gradient(to bottom, #d4af37, #c9a227);
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(201, 162, 39, 0.6);
    transition: transform 0.2s ease-out;
}

.tv-speaker {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.speaker-line {
    width: 28px;
    height: 2px;
    background: linear-gradient(to right, #2a2a2a, #3a3a3a, #2a2a2a);
    border-radius: 1px;
}

.tv-legs {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    margin-top: -2px;
}

.tv-leg {
    width: 8px;
    height: 12px;
    background: linear-gradient(to bottom, #3d2d22, #2d1d12);
    border-radius: 0 0 2px 2px;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 280px;
    padding: 0 24px;
}

.pause-btn {
    width: 100%;
    padding: 16px 24px;
    font-family: 'Cinzel', serif;
    font-size: clamp(14px, 3.5vw, 18px);
    font-weight: 700;
    letter-spacing: 0.15em;
    border: 2px solid var(--gold);
    background: rgba(49, 46, 43, 0.9);
    color: var(--gold);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-out;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.pause-btn:hover {
    background: var(--gold);
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.pause-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(201, 162, 39, 0.3);
}

.pause-btn.continue-btn {
    background: var(--gold);
    color: var(--bg);
}

.pause-btn.continue-btn:hover {
    background: #d9b237;
    box-shadow: 0 6px 16px rgba(201, 162, 39, 0.5);
}

/* Controls */
.controls {
    position: fixed;
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 18px;
    z-index: 50;
    align-items: center;
}

.ctrl-btn {
    width: 64px;
    height: 64px;
    background: #3c3a38;
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ctrl-btn svg {
    width: 22px;
    height: 22px;
}

.ctrl-btn:active {
    background: #4a4845;
}

.ctrl-btn.drop {
    background: #81b64c;
}

.ctrl-btn.drop:active {
    background: #6fa03c;
}

/* Footer */
.footer {
    position: fixed;
    bottom: calc(max(12px, calc(env(safe-area-inset-bottom) + 8px)) + 68px);
    left: 0;
    right: 0;
    text-align: center;
    padding: 6px 16px;
    font-size: 11px;
    color: rgba(245, 230, 211, 0.35);
    font-family: 'Cormorant Garamond', Georgia, serif;
    pointer-events: none;
    z-index: 4;
    transition: all 0.3s ease;
}

.footer.streak-active {
    color: #f7c631;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(247, 198, 49, 0.5);
}

.footer .streak {
    animation: streak-pulse 0.5s ease-out;
}

@keyframes streak-pulse {
    0% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .footer {
        bottom: calc(max(12px, env(safe-area-inset-bottom)) + 68px);
    }
}

.footer a {
    color: rgba(201, 162, 39, 0.6);
    text-decoration: none;
    pointer-events: auto;
    transition: color 0.15s;
}

.footer a:hover {
    color: rgba(201, 162, 39, 0.9);
}

.footer .easter-egg {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s;
    pointer-events: auto;
}

.footer .easter-egg:hover {
    transform: scale(1.25);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pieceReveal {
    0% { opacity: 0; transform: translateY(16px) scale(0.85); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes fadeInPulse {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes recordPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== Leaderboard ===== */

#leaderboardOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

#leaderboardOverlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.lb-container,
.lb-name-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 340px;
    padding: 0 20px;
    position: relative;
}

.lb-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03) 0px,
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 1;
}

.lb-header,
.lb-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(14px, 3.5vw, 18px);
    color: #33ff33;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.5);
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    text-align: center;
}

.lb-score {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(20px, 5vw, 28px);
    color: #f7c631;
    text-shadow: 0 0 12px rgba(247, 198, 49, 0.5);
    margin-bottom: 16px;
}

.lb-prompt {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(8px, 2vw, 10px);
    color: #33ff33;
    text-shadow: 0 0 6px rgba(51, 255, 51, 0.4);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

/* Scroll Wheels */
.lb-wheels {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.lb-wheel {
    width: 52px;
    height: 144px;
    overflow: hidden;
    position: relative;
    border: 2px solid #33ff33;
    border-radius: 6px;
    background: rgba(0, 20, 0, 0.6);
    box-shadow: 0 0 8px rgba(51, 255, 51, 0.2), inset 0 0 12px rgba(0, 0, 0, 0.5);
    cursor: grab;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lb-wheel-cell {
    position: absolute;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(16px, 4vw, 20px);
    color: rgba(51, 255, 51, 0.3);
    transition: color 0.1s;
    user-select: none;
}

.lb-wheel-cell.lb-wheel-active {
    color: #33ff33;
    text-shadow: 0 0 12px rgba(51, 255, 51, 0.8);
}

.lb-ok-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(12px, 3vw, 16px);
    padding: 14px 40px;
    background: transparent;
    color: #33ff33;
    border: 2px solid #33ff33;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.15em;
    text-shadow: 0 0 8px rgba(51, 255, 51, 0.5);
    box-shadow: 0 0 8px rgba(51, 255, 51, 0.2);
    transition: all 0.15s ease-out;
}

.lb-ok-btn:hover,
.lb-ok-btn:active {
    background: #33ff33;
    color: #0a0a0a;
    text-shadow: none;
    box-shadow: 0 0 16px rgba(51, 255, 51, 0.5);
}

/* Leaderboard Table */
.lb-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.lb-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 20, 0, 0.3);
    border-radius: 4px;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(10px, 2.5vw, 14px);
    color: #33ff33;
    animation: lb-slide-in 0.3s ease-out both;
}

.lb-row-highlight {
    background: rgba(247, 198, 49, 0.15);
    color: #f7c631;
    text-shadow: 0 0 8px rgba(247, 198, 49, 0.5);
    border: 1px solid rgba(247, 198, 49, 0.3);
    animation: lb-slide-in 0.3s ease-out both, lb-pulse-gold 1.5s ease-in-out infinite;
}

@keyframes lb-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lb-pulse-gold {
    0%, 100% { background: rgba(247, 198, 49, 0.15); }
    50% { background: rgba(247, 198, 49, 0.25); }
}

.lb-rank {
    width: 32px;
    flex-shrink: 0;
}

.lb-name {
    flex: 1;
    text-align: center;
    letter-spacing: 0.2em;
}

.lb-points {
    text-align: right;
    min-width: 80px;
}

.lb-footer {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(8px, 2vw, 10px);
    color: rgba(51, 255, 51, 0.5);
    animation: pulse 2s ease-in-out infinite;
    letter-spacing: 0.1em;
    margin-top: 8px;
}
