/* Dark Theme with Purple Accents */
:root {
    --bg-primary: #0D0D0D;
    --bg-secondary: #1A1A1A;
    --bg-card: #141414;
    --purple-primary: #8B5CF6;
    --purple-secondary: #A78BFA;
    --purple-light: #C4B5FD;
    --purple-dark: #6D28D9;
    --purple-glow: rgba(139, 92, 246, 0.5);
    --green-accent: #10B981;
    --red-accent: #EF4444;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --border-color: #2D2D2D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    user-select: none;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: var(--purple-primary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--purple-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

/* App Container */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 120px;
}

.app.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* Screens */
.screen {
    flex: 1;
    padding: 0 16px;
}

.screen-content {
    padding: 20px 0;
}

.screen-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: var(--purple-primary);
}

/* Summary Card */
.summary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.summary-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--purple-secondary);
}

/* Crypto Selector */
.crypto-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.crypto-selection-hint {
    flex-basis: 100%;
    text-align: center;
    margin-top: 6px;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.crypto-btn {
    position: relative;
    flex: 1;
    min-width: 60px;
    max-width: 75px;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    overflow: hidden;
}

.crypto-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.crypto-name {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
}

.crypto-lock {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
}

.crypto-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--crypto-color) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
    animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.1); }
}

.crypto-btn:hover:not(.locked) {
    border-color: var(--crypto-color, var(--purple-primary));
    transform: translateY(-2px);
}

.crypto-btn:hover:not(.locked) .crypto-icon {
    transform: scale(1.2);
    color: var(--crypto-color);
    text-shadow: 0 0 15px var(--crypto-color);
}

.crypto-btn.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.1));
    border-color: var(--crypto-color, var(--purple-primary));
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.25), 0 0 12px var(--crypto-color, var(--purple-glow)), inset 0 0 20px rgba(139, 92, 246, 0.1);
}

.crypto-btn.active .crypto-icon {
    color: var(--crypto-color);
    text-shadow: 0 0 20px var(--crypto-color);
    animation: icon-float 2s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.crypto-btn.selecting {
    animation: select-pop 0.3s ease-out;
}

@keyframes select-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.crypto-btn.locked {
    opacity: 0.5;
    cursor: pointer;
}

.crypto-btn.locked .crypto-icon {
    filter: grayscale(100%);
}

.crypto-btn.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Counter Section */
.counter-section {
    text-align: center;
    margin-bottom: 20px;
}

.counter-label {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--purple-secondary);
    margin-bottom: 8px;
}

.counter-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Speed Indicator */
.speed-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 15px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(109, 40, 217, 0.15));
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.speed-indicator.boosted {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(234, 88, 12, 0.2));
    border-color: rgba(245, 158, 11, 0.5);
    animation: speed-pulse 1.5s ease-in-out infinite;
}

@keyframes speed-pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); }
}

.speed-icon {
    font-size: 14px;
}

.speed-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-purple);
}

.speed-indicator.boosted .speed-value {
    color: #f59e0b;
}

/* Results Area */
.results-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: 200px;
    overflow-y: auto;
    padding: 12px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--purple-primary) var(--bg-card);
}

.results-area::-webkit-scrollbar {
    width: 4px;
}

.results-area::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.results-area::-webkit-scrollbar-thumb {
    background: var(--purple-primary);
    border-radius: 2px;
}

.results-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.result-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    border: 1px solid transparent;
}

.result-item:hover {
    background: var(--border-color);
    transform: translateX(5px);
    border-color: var(--purple-primary);
}

.result-crypto-icon {
    font-size: 20px;
    font-weight: bold;
    min-width: 28px;
    text-align: center;
}

.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-address {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 11px;
}

.result-balance {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
}

.result-balance.found {
    color: var(--green-accent);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.65), 0 0 22px rgba(16, 185, 129, 0.25);
    animation: found-text-glow 1.6s ease-in-out infinite;
}

.result-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
    pointer-events: none;
}

/* New result animation */
.result-new {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
}

.result-appear {
    animation: result-slide-in 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes result-slide-in {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-new .result-glow {
    animation: glow-sweep 0.6s ease-out forwards;
}

@keyframes glow-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Has balance - Glowing animation based on balance tier */
.result-item.has-balance {
    position: relative;
    border: 1px solid var(--green-accent);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    animation: glow-pulse-low 2s ease-in-out infinite;
    isolation: isolate;
    --win-glow: rgba(16, 185, 129, 0.55);
    --win-shimmer: rgba(16, 185, 129, 0.20);
}

/* Победный эффект: яркий shimmer + аура (не перекрывает текст) */
.result-item.has-balance::before,
.result-item.has-balance::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    pointer-events: none;
    z-index: 0;
}

.result-item.has-balance::before {
    background: linear-gradient(
        120deg,
        transparent 0%,
        var(--win-shimmer) 18%,
        rgba(255, 255, 255, 0.06) 28%,
        transparent 45%
    );
    opacity: var(--win-shimmer-opacity, 0.9);
    transform: translateX(-130%);
    animation: win-shimmer var(--win-shimmer-duration, 2.8s) ease-in-out infinite;
}

.result-item.has-balance::after {
    background:
        radial-gradient(circle at 18% 22%, var(--win-glow), transparent 58%),
        radial-gradient(circle at 82% 78%, rgba(255, 215, 0, 0.20), transparent 62%),
        radial-gradient(circle at 50% 120%, var(--win-glow), transparent 70%);
    opacity: var(--win-aura-opacity, 0.45);
    filter: saturate(1.2);
    animation: win-aura var(--win-aura-duration, 1.9s) ease-in-out infinite;
}

.result-item.has-balance .result-crypto-icon,
.result-item.has-balance .result-info {
    position: relative;
    z-index: 1;
}

.result-item.has-balance .result-glow {
    z-index: 2;
}

.result-item.has-balance .result-jackpot-badge {
    z-index: 3;
}

/* Низкий баланс - зеленое слабое мерцание */
.result-item.balance-tier-1 {
    animation: glow-pulse-low 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    --win-glow: rgba(16, 185, 129, 0.55);
    --win-shimmer: rgba(16, 185, 129, 0.20);
    --win-shimmer-duration: 2.9s;
    --win-aura-duration: 2.1s;
    --win-shimmer-opacity: 0.75;
    --win-aura-opacity: 0.35;
}

/* Средний баланс - желто-оранжевое мерцание */
.result-item.balance-tier-2 {
    border-color: #F59E0B;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    animation: glow-pulse-medium 1.5s ease-in-out infinite;
    --win-glow: rgba(245, 158, 11, 0.60);
    --win-shimmer: rgba(245, 158, 11, 0.22);
    --win-shimmer-duration: 2.3s;
    --win-aura-duration: 1.7s;
    --win-shimmer-opacity: 0.85;
    --win-aura-opacity: 0.45;
}

/* Высокий баланс - оранжево-красное мерцание */
.result-item.balance-tier-3 {
    border-color: #EF4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.1));
    animation: glow-pulse-high 1s ease-in-out infinite;
    --win-glow: rgba(239, 68, 68, 0.60);
    --win-shimmer: rgba(245, 158, 11, 0.22);
    --win-shimmer-duration: 1.8s;
    --win-aura-duration: 1.35s;
    --win-shimmer-opacity: 0.92;
    --win-aura-opacity: 0.55;
}

/* Очень высокий баланс - яркое красно-золотое мерцание */
.result-item.balance-tier-4 {
    border-color: #DC2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(245, 158, 11, 0.15), rgba(220, 38, 38, 0.25));
    animation: glow-pulse-jackpot 0.7s ease-in-out infinite;
    --win-glow: rgba(255, 215, 0, 0.65);
    --win-shimmer: rgba(255, 215, 0, 0.28);
    --win-shimmer-duration: 1.25s;
    --win-aura-duration: 1.05s;
    --win-shimmer-opacity: 1;
    --win-aura-opacity: 0.7;
}

/* Extra “new win” emphasis (does not affect normal scans) */
.result-item.win-celebrate {
    animation: win-pop 0.55s ease-out;
}

@keyframes win-pop {
    0% { transform: scale(0.98); }
    40% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes glow-pulse-low {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5), 0 0 30px rgba(16, 185, 129, 0.2);
    }
}

@keyframes glow-pulse-medium {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    }
    50% { 
        box-shadow: 0 0 25px rgba(245, 158, 11, 0.7), 0 0 40px rgba(245, 158, 11, 0.3);
    }
}

@keyframes glow-pulse-high {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    }
    50% { 
        box-shadow: 0 0 35px rgba(239, 68, 68, 0.8), 0 0 50px rgba(245, 158, 11, 0.4);
    }
}

@keyframes glow-pulse-jackpot {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.6), 0 0 10px rgba(255, 215, 0, 0.3);
        filter: brightness(1);
    }
    25% {
        box-shadow: 0 0 40px rgba(220, 38, 38, 0.9), 0 0 60px rgba(255, 215, 0, 0.5), 0 0 80px rgba(220, 38, 38, 0.3);
        filter: brightness(1.1);
    }
    50% { 
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.8), 0 0 70px rgba(220, 38, 38, 0.6);
        filter: brightness(1.15);
    }
    75% {
        box-shadow: 0 0 40px rgba(220, 38, 38, 0.9), 0 0 60px rgba(255, 215, 0, 0.5);
        filter: brightness(1.1);
    }
}

.result-item.jackpot {
    animation: jackpot-entrance 0.6s ease-out;
}

@keyframes jackpot-entrance {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.result-jackpot-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    animation: badge-glow 1s ease-in-out infinite;
}

.balance-tier-1 .result-jackpot-badge {
    color: var(--green-accent);
    background: rgba(16, 185, 129, 0.2);
}

.balance-tier-2 .result-jackpot-badge {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.2);
}

.balance-tier-3 .result-jackpot-badge {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.2);
}

.balance-tier-4 .result-jackpot-badge {
    color: #FFD700;
    background: rgba(220, 38, 38, 0.3);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: badge-glow-intense 0.5s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes badge-glow-intense {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Победные анимации (используются и в истории, и в результатах) */
@keyframes win-shimmer {
    0% { transform: translateX(-130%); opacity: 0; }
    12% { opacity: 0.9; }
    58% { transform: translateX(130%); opacity: 0.75; }
    100% { transform: translateX(130%); opacity: 0; }
}

@keyframes win-aura {
    0%, 100% { opacity: 0.35; filter: brightness(1) saturate(1.1); }
    50% { opacity: 0.75; filter: brightness(1.18) saturate(1.25); }
}

@keyframes found-text-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(16, 185, 129, 0.65), 0 0 22px rgba(16, 185, 129, 0.25);
    }
    50% {
        text-shadow: 0 0 14px rgba(16, 185, 129, 0.9), 0 0 32px rgba(16, 185, 129, 0.45);
    }
}

/* Electric Bitcoin Effect */
.electric-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    height: 60px;
    margin-bottom: 15px;
    overflow: visible;
}

.electric-btc {
    font-size: 32px;
    color: #F7931A;
    text-shadow: 0 0 10px #F7931A;
    opacity: 0.3;
    transition: all 0.1s;
}

.electric-line {
    position: absolute;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple-primary), transparent);
    opacity: 0.3;
}

.electric-line.left { left: 10%; }
.electric-line.right { right: 10%; }

.spark {
    position: absolute;
    font-size: 16px;
    opacity: 0;
    color: #FFD700;
    text-shadow: 0 0 10px #FFD700;
}

.spark-1 { top: 10%; left: 20%; }
.spark-2 { top: 20%; right: 15%; }
.spark-3 { bottom: 10%; left: 30%; }
.spark-4 { bottom: 20%; right: 25%; }

/* Scanning Electric Effects */
.electric-container.active .electric-btc {
    opacity: 1;
    animation: btc-flash 0.15s ease-in-out infinite;
}

.electric-container.active .electric-btc:nth-child(1) { animation-delay: 0s; }
.electric-container.active .electric-btc:nth-child(2) { animation-delay: 0.05s; }
.electric-container.active .electric-btc:nth-child(3) { animation-delay: 0.1s; }

@keyframes btc-flash {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 10px #F7931A, 0 0 20px #F7931A, 0 0 30px #F7931A;
        transform: scale(1);
    }
    50% { 
        opacity: 0.3; 
        text-shadow: 0 0 5px #F7931A;
        transform: scale(1.1);
    }
}

.electric-container.active .electric-line {
    opacity: 1;
    animation: line-pulse 0.2s ease-in-out infinite;
}

@keyframes line-pulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 10px var(--purple-primary), 0 0 20px var(--purple-primary);
    }
    50% { 
        opacity: 0.3;
        box-shadow: none;
    }
}

.electric-container.active .spark {
    animation: spark-appear 0.3s ease-in-out infinite;
}

.electric-container.active .spark-1 { animation-delay: 0s; }
.electric-container.active .spark-2 { animation-delay: 0.1s; }
.electric-container.active .spark-3 { animation-delay: 0.15s; }
.electric-container.active .spark-4 { animation-delay: 0.2s; }

@keyframes spark-appear {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Scan Button */
.scan-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 35px; /* Space for slide hint */
}

/* Sticky found badge (new wins counter) */
.found-badge {
    position: absolute;
    top: -10px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(16, 185, 129, 0.14));
    color: #d1fae5;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.18);
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.found-badge:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.22);
}

.found-badge:active {
    transform: scale(0.98);
}

.found-badge-icon {
    font-size: 14px;
    line-height: 1;
}

.found-badge-count {
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}

.found-badge.pulse {
    animation: found-badge-pop 0.35s ease-out;
}

@keyframes found-badge-pop {
    0% { transform: scale(0.9); filter: brightness(1.0); }
    60% { transform: scale(1.08); filter: brightness(1.15); }
    100% { transform: scale(1.0); filter: brightness(1.0); }
}

.scan-button {
    position: relative;
    width: 220px;
    height: 65px;
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-dark));
    border: none;
    border-radius: 35px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: visible;
    transition: all 0.3s;
    box-shadow: 0 4px 20px var(--purple-glow);
}

.scan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--purple-glow);
}

.scan-button:active {
    transform: scale(0.98);
}

.scan-button.scanning {
    animation: mega-pulse 0.3s ease-in-out infinite;
    box-shadow: 0 0 30px var(--purple-glow), 0 0 60px var(--purple-glow), 0 0 90px var(--purple-primary);
}

.scan-button.scanning .scan-button-text {
    animation: text-mega-flash 0.15s ease-in-out infinite;
}

@keyframes mega-pulse {
    0%, 100% { 
        box-shadow: 0 0 30px var(--purple-glow), 0 0 60px var(--purple-glow);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 50px var(--purple-glow), 0 0 100px var(--purple-glow), 0 0 150px var(--purple-primary);
        transform: scale(1.02);
    }
}

@keyframes text-mega-flash {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px white; }
    50% { opacity: 0.5; text-shadow: none; }
}

.scan-button-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--purple-light);
    border-radius: 35px;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.scan-button-ring.ring-2 {
    animation-delay: 0.5s;
}

.scan-button.scanning .scan-button-ring {
    animation: ring-mega-expand 0.8s ease-out infinite;
}

@keyframes ring-mega-expand {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
        border-color: var(--purple-light);
    }
    100% {
        width: 180%;
        height: 300%;
        opacity: 0;
        border-color: var(--purple-primary);
    }
}

.scan-button-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    border-radius: 35px;
}

.scan-button.scanning .scan-button-pulse {
    animation: pulse-mega-sweep 0.4s ease-in-out infinite;
}

@keyframes pulse-mega-sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Button Sparks */
.button-sparks {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.button-sparks span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 6px #FFD700, 0 0 12px #FFD700;
}

.scan-button.scanning .button-sparks span {
    animation: spark-fly 0.6s ease-out infinite;
}

.button-sparks span:nth-child(1) { top: 0; left: 25%; animation-delay: 0s; }
.button-sparks span:nth-child(2) { top: 0; right: 25%; animation-delay: 0.1s; }
.button-sparks span:nth-child(3) { bottom: 0; left: 30%; animation-delay: 0.15s; }
.button-sparks span:nth-child(4) { bottom: 0; right: 30%; animation-delay: 0.2s; }
.button-sparks span:nth-child(5) { top: 50%; left: 0; animation-delay: 0.25s; }
.button-sparks span:nth-child(6) { top: 50%; right: 0; animation-delay: 0.3s; }
.button-sparks span:nth-child(7) { top: 20%; left: 10%; animation-delay: 0.35s; }
.button-sparks span:nth-child(8) { bottom: 20%; right: 10%; animation-delay: 0.4s; }

@keyframes spark-fly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, 20px), var(--ty, -30px)) scale(0);
    }
}

/* ============================================= */
/* НОВЫЕ АНИМАЦИИ КНОПКИ - вспышка и угасание   */
/* ============================================= */

/* Simple single tap animation (minimal) */
.scan-button.single-scan {
    animation: single-tap-glow 0.2s ease-out forwards;
}

@keyframes single-tap-glow {
    0% {
        box-shadow: 0 0 15px var(--purple-glow);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px var(--purple-glow), 0 0 50px var(--purple-light);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 25px var(--purple-glow);
        transform: scale(1);
    }
}

/* Single tap fade out */
.scan-button.single-fade {
    animation: single-fade-out 0.4s ease-out forwards;
}

@keyframes single-fade-out {
    0% {
        box-shadow: 0 0 25px var(--purple-glow);
    }
    100% {
        box-shadow: 0 0 10px var(--purple-glow);
    }
}

/* Hold mode flash animation (bigger effect) */
.scan-button.flash {
    animation: button-flash 0.3s ease-out forwards !important;
}

.electric-container.flash .bitcoin-symbol,
.electric-container.flash .lightning-bolt {
    animation: instant-flash 0.3s ease-out !important;
}

@keyframes button-flash {
    0% {
        box-shadow: 0 0 20px var(--purple-glow);
        transform: scale(1);
    }
    30% {
        box-shadow: 0 0 80px var(--purple-glow), 0 0 120px var(--purple-light), 0 0 160px white;
        transform: scale(1.05);
        filter: brightness(1.5);
    }
    100% {
        box-shadow: 0 0 30px var(--purple-glow);
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes instant-flash {
    0% { opacity: 0.5; filter: brightness(1); }
    30% { opacity: 1; filter: brightness(2) drop-shadow(0 0 20px currentColor); }
    100% { opacity: 0.5; filter: brightness(1); }
}

/* Медленное угасание (после одиночного нажатия или отпускания зажатия) */
.scan-button.fade-slow {
    animation: fade-slow-out 0.8s ease-out forwards !important;
}

.electric-container.fade-slow {
    animation: electric-fade-slow 0.8s ease-out forwards !important;
}

.electric-container.fade-slow .bitcoin-symbol,
.electric-container.fade-slow .lightning-bolt,
.electric-container.fade-slow .electric-line {
    animation: element-fade-slow 0.8s ease-out forwards !important;
}

@keyframes fade-slow-out {
    0% {
        box-shadow: 0 0 40px var(--purple-glow), 0 0 60px var(--purple-glow);
        filter: brightness(1.2);
    }
    100% {
        box-shadow: 0 0 10px var(--purple-glow);
        filter: brightness(1);
    }
}

@keyframes electric-fade-slow {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes element-fade-slow {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; }
    100% { opacity: 0; transform: scale(0.95); }
}

/* Быстрое угасание (при разблокировке слайдом) */
.scan-button.fade-fast {
    animation: fade-fast-out 0.2s ease-out forwards !important;
}

.electric-container.fade-fast {
    animation: electric-fade-fast 0.2s ease-out forwards !important;
}

.electric-container.fade-fast .bitcoin-symbol,
.electric-container.fade-fast .lightning-bolt,
.electric-container.fade-fast .electric-line {
    animation: element-fade-fast 0.2s ease-out forwards !important;
}

@keyframes fade-fast-out {
    0% {
        box-shadow: 0 0 40px var(--purple-glow);
        filter: brightness(1.2);
    }
    100% {
        box-shadow: 0 0 5px var(--purple-glow);
        filter: brightness(0.9);
    }
}

@keyframes electric-fade-fast {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes element-fade-fast {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Заблокированная кнопка (slide lock активен) */
.scan-button.locked {
    animation: locked-pulse 1.5s ease-in-out infinite !important;
    box-shadow: 0 0 30px var(--green-accent), 0 0 60px var(--green-accent), 0 0 90px rgba(16, 185, 129, 0.3) !important;
    border-color: var(--green-accent) !important;
}

.scan-button.locked::before {
    content: '🔓';
    position: absolute;
    top: -25px;
    right: -10px;
    font-size: 20px;
    animation: lock-bounce 1s ease-in-out infinite;
}

.scan-button.locked .scan-button-text {
    color: var(--green-accent) !important;
}

@keyframes locked-pulse {
    0%, 100% {
        box-shadow: 0 0 30px var(--green-accent), 0 0 60px rgba(16, 185, 129, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 50px var(--green-accent), 0 0 100px rgba(16, 185, 129, 0.7), 0 0 150px rgba(16, 185, 129, 0.3);
        transform: scale(1.02);
    }
}

@keyframes lock-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(10deg); }
}

/* Подсказка о слайде */
.slide-hint {
    margin-top: 15px;
    font-size: 12px;
    color: var(--purple-secondary);
    white-space: nowrap;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.slide-hint.hidden {
    display: none !important;
}

.slide-hint .arrow {
    font-size: 16px;
    animation: slide-arrow 1.5s ease-in-out infinite;
}

@keyframes slide-arrow {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(8px); opacity: 1; }
}

.button-sparks span:nth-child(1) { --tx: -10px; --ty: -40px; }
.button-sparks span:nth-child(2) { --tx: 10px; --ty: -40px; }
.button-sparks span:nth-child(3) { --tx: -15px; --ty: 40px; }
.button-sparks span:nth-child(4) { --tx: 15px; --ty: 40px; }
.button-sparks span:nth-child(5) { --tx: -50px; --ty: 0; }
.button-sparks span:nth-child(6) { --tx: 50px; --ty: 0; }
.button-sparks span:nth-child(7) { --tx: -40px; --ty: -20px; }
.button-sparks span:nth-child(8) { --tx: 40px; --ty: 20px; }

/* User Balance */
.user-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 20px;
}

.user-balance-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance-icon {
    font-size: 20px;
}

.balance-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--purple-secondary);
}

.sound-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.sound-toggle:active {
    transform: scale(0.96);
}

.sound-toggle.on {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.18);
}

.sound-toggle.off {
    opacity: 0.6;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 5px;
    right: 5px;
    display: flex;
    justify-content: space-between;
    padding: 6px 2px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    z-index: 100;
}

/* =========================
   Support Chat
   ========================= */
.support-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: calc(100vh - 210px);
    max-height: none;
    min-height: 360px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 14px;
    padding: 12px;
}

.support-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    left: -9999px;
}

.support-attach-icon {
    display: block;
}

.support-attach-btn.has-file {
    border-color: rgba(34, 197, 94, 0.35);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.16);
}

.support-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-message {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.35;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.support-message.user {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(109, 40, 217, 0.12));
    border-color: rgba(139, 92, 246, 0.25);
}

.support-message.operator {
    margin-right: auto;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(16, 185, 129, 0.10));
    border-color: rgba(59, 130, 246, 0.20);
}

.support-message .meta {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.9;
}

.support-message .media {
    margin-top: 8px;
}

.support-message .media img {
    display: block;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
}

.support-message .file-link {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--text-primary);
    text-decoration: none;
}

.support-message .file-ic {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    flex-shrink: 0;
}

.support-message .file-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    min-width: 0;
}

.support-message .file-name {
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-message .file-size {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.9;
}

.support-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.support-text-input {
    flex: 1;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.22);
    color: var(--text-primary);
    padding: 0 12px;
    outline: none;
}

.support-text-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.support-attach-btn,
.support-send-btn {
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.22);
    color: var(--text-primary);
    cursor: pointer;
}

.support-send-btn {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.65), rgba(109, 40, 217, 0.55));
    border-color: rgba(139, 92, 246, 0.35);
    font-weight: 700;
    letter-spacing: 1px;
}

.support-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.8;
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 8px;
    transition: all 0.3s;
    flex: 1;
    min-width: 0;
    max-width: 60px;
}

.bottom-nav-btn.active {
    color: var(--purple-primary);
    background: rgba(139, 92, 246, 0.1);
}

.bottom-nav-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.bottom-nav-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1;
}

/* Small screens - hide text labels */
@media (max-width: 400px) {
    .bottom-nav-btn span {
        display: none;
    }
    .bottom-nav-btn {
        padding: 6px 4px;
    }
    .bottom-nav-btn svg {
        width: 20px;
        height: 20px;
    }
    .bottom-nav {
        padding: 8px 4px;
    }
}


/* History Filters */
.history-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.filter-select {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.filter-select:focus {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.filter-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* History Stats */
.history-stats {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
}

.history-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-stats .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.history-stats .stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-stats .stat-value.found {
    color: #10b981;
}

/* Load More Button */
.load-more-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
}

.load-more-btn.hidden {
    display: none;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
}

.history-item:hover {
    border-color: var(--purple-primary);
    transform: translateX(5px);
}

.history-crypto-icon {
    font-size: 24px;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

.history-content {
    flex: 1;
    min-width: 0;
}

.history-item.has-balance {
    border: 1px solid var(--green-accent);
    isolation: isolate;
    --win-glow: rgba(16, 185, 129, 0.55);
    --win-shimmer: rgba(16, 185, 129, 0.20);
}

/* History balance tiers - мерцание по уровню баланса */
.history-item.balance-tier-1 {
    animation: glow-pulse-low 2s ease-in-out infinite;
    border-color: var(--green-accent);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-card));
    --win-glow: rgba(16, 185, 129, 0.55);
    --win-shimmer: rgba(16, 185, 129, 0.20);
    --win-shimmer-duration: 2.9s;
    --win-aura-duration: 2.1s;
    --win-shimmer-opacity: 0.75;
    --win-aura-opacity: 0.35;
}

.history-item.balance-tier-2 {
    animation: glow-pulse-medium 1.5s ease-in-out infinite;
    border-color: #F59E0B;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--bg-card));
    --win-glow: rgba(245, 158, 11, 0.60);
    --win-shimmer: rgba(245, 158, 11, 0.22);
    --win-shimmer-duration: 2.3s;
    --win-aura-duration: 1.7s;
    --win-shimmer-opacity: 0.85;
    --win-aura-opacity: 0.45;
}

.history-item.balance-tier-3 {
    animation: glow-pulse-high 1s ease-in-out infinite;
    border-color: #EF4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.05), var(--bg-card));
    --win-glow: rgba(239, 68, 68, 0.60);
    --win-shimmer: rgba(245, 158, 11, 0.22);
    --win-shimmer-duration: 1.8s;
    --win-aura-duration: 1.35s;
    --win-shimmer-opacity: 0.92;
    --win-aura-opacity: 0.55;
}

.history-item.balance-tier-4 {
    animation: glow-pulse-jackpot 0.7s ease-in-out infinite;
    border-color: #DC2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(255, 215, 0, 0.1), var(--bg-card));
    --win-glow: rgba(255, 215, 0, 0.65);
    --win-shimmer: rgba(255, 215, 0, 0.28);
    --win-shimmer-duration: 1.25s;
    --win-aura-duration: 1.05s;
    --win-shimmer-opacity: 1;
    --win-aura-opacity: 0.7;
}

/* Победный эффект в истории: shimmer + аура под контентом */
.history-item.has-balance::before,
.history-item.has-balance::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
}

.history-item.has-balance::before {
    background: linear-gradient(
        120deg,
        transparent 0%,
        var(--win-shimmer) 18%,
        rgba(255, 255, 255, 0.06) 28%,
        transparent 45%
    );
    opacity: var(--win-shimmer-opacity, 0.9);
    transform: translateX(-130%);
    animation: win-shimmer var(--win-shimmer-duration, 2.8s) ease-in-out infinite;
}

.history-item.has-balance::after {
    background:
        radial-gradient(circle at 18% 22%, var(--win-glow), transparent 58%),
        radial-gradient(circle at 82% 78%, rgba(255, 215, 0, 0.20), transparent 62%),
        radial-gradient(circle at 50% 120%, var(--win-glow), transparent 70%);
    opacity: var(--win-aura-opacity, 0.45);
    filter: saturate(1.2);
    animation: win-aura var(--win-aura-duration, 1.9s) ease-in-out infinite;
}

.history-item.has-balance > * {
    position: relative;
    z-index: 1;
}

.history-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    animation: badge-glow 1s ease-in-out infinite;
}

.history-item.balance-tier-1 .history-badge {
    color: var(--green-accent);
    background: rgba(16, 185, 129, 0.2);
}

.history-item.balance-tier-2 .history-badge {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.2);
}

.history-item.balance-tier-3 .history-badge {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.2);
}

.history-item.balance-tier-4 .history-badge {
    color: #FFD700;
    background: rgba(220, 38, 38, 0.3);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: badge-glow-intense 0.5s ease-in-out infinite;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.history-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 90px;
}

.history-crypto {
    font-size: 13px;
    font-weight: 700;
    color: var(--purple-primary);
}

.history-date {
    font-size: 10px;
    color: var(--text-muted);
    max-width: 160px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-address {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    word-break: break-all;
}

.history-balance {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.history-balance.found {
    color: var(--green-accent);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.65), 0 0 22px rgba(16, 185, 129, 0.25);
    animation: found-text-glow 1.6s ease-in-out infinite;
}

/* Upgrades List */
.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upgrade-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
}

.upgrade-item:hover {
    border-color: var(--purple-primary);
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.upgrade-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upgrade-price-block {
    text-align: right;
}

.upgrade-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--purple-secondary);
}

.upgrade-price.discounted {
    color: #10b981;
}

.upgrade-price-original {
    font-size: 12px;
    color: #888;
    text-decoration: line-through;
}

.upgrade-price-usd {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.upgrade-discount {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 12px;
    color: #10b981;
}

.upgrade-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.upgrade-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-dark));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.upgrade-btn:hover:not(:disabled) {
    box-shadow: 0 4px 20px var(--purple-glow);
}

.upgrade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-btn.purchased {
    background: var(--green-accent);
}

.upgrade-btn.no-funds {
    background: var(--bg-secondary);
    border: 1px solid var(--red-accent);
    color: var(--red-accent);
}

.upgrade-item.locked {
    opacity: 0.7;
}

.upgrade-price.too-expensive {
    color: var(--red-accent);
}

/* Profile Info */
.profile-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-label {
    color: var(--text-muted);
    font-size: 14px;
}

.profile-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.profile-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.refresh-btn {
    background: var(--bg-card);
    border: 1px solid var(--purple-primary);
    color: var(--purple-light);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: var(--purple-primary);
    color: white;
}

.refresh-btn:active {
    transform: scale(0.95);
}

/* Custom Notifications */
.custom-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    min-width: 280px;
    max-width: 90%;
    z-index: 10001;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Jackpot notification: bottom placement + brighter styling (doesn't cover crypto selector) */
.custom-notification.notification-jackpot {
    top: auto;
    bottom: calc(170px + env(safe-area-inset-bottom));
    min-width: 320px;
    transform: translateX(-50%) translateY(120px);
    border-color: rgba(255, 215, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(139, 92, 246, 0.10), var(--bg-secondary));
    box-shadow: 0 18px 60px rgba(0,0,0,0.55), 0 0 40px rgba(255,215,0,0.12);
}

.custom-notification.notification-jackpot::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.10) 18%, transparent 38%);
    transform: translateX(-130%);
    opacity: 0.9;
    pointer-events: none;
    animation: win-shimmer 1.6s ease-in-out infinite;
}

.custom-notification.notification-jackpot.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.custom-notification.notification-jackpot.hide {
    transform: translateX(-50%) translateY(30px);
    opacity: 0;
}

.custom-notification.notification-jackpot .notification-icon {
    filter: drop-shadow(0 0 10px rgba(255,215,0,0.5));
}

.custom-notification.notification-jackpot .notification-text {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.custom-notification.notification-jackpot .notification-progress {
    background: linear-gradient(90deg, rgba(255,215,0,0.9), rgba(139,92,246,0.9));
}

.custom-notification.notification-jackpot .notification-action {
    background: rgba(255, 215, 0, 0.10);
    border-color: rgba(255, 215, 0, 0.22);
}

.custom-notification.notification-jackpot.win-tier-4 .notification-action {
    background: rgba(255, 215, 0, 0.16);
    border-color: rgba(255, 215, 0, 0.32);
    box-shadow: 0 0 18px rgba(255,215,0,0.12);
}

.custom-notification.notification-jackpot.win-tier-4 {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 22px 70px rgba(0,0,0,0.6), 0 0 70px rgba(255,215,0,0.22);
}

.custom-notification.notification-jackpot.win-tier-3 {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 20px 65px rgba(0,0,0,0.58), 0 0 55px rgba(239,68,68,0.18);
}

.custom-notification.notification-jackpot.win-tier-2 {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 18px 55px rgba(0,0,0,0.55), 0 0 45px rgba(245,158,11,0.14);
}

/* Confetti layer */
.win-fx-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10000;
}

.win-fx-layer.active {
    display: block;
}

.confetti-piece {
    position: absolute;
    top: -14px;
    border-radius: 2px;
    transform: translateY(-20px) rotate(0deg);
    animation: confetti-fall var(--confetti-dur, 3.2s) linear var(--confetti-delay, 0s) forwards;
    box-shadow: 0 0 10px rgba(255,255,255,0.06);
}

@keyframes confetti-fall {
    0% { transform: translateY(-20px) rotate(0deg); }
    100% { transform: translateY(110vh) rotate(var(--confetti-rot, 540deg)); }
}

/* Scan button + electric celebration pulse (only during win) */
.scan-button.win-celebrate,
.electric-container.win-celebrate {
    filter: saturate(1.15) brightness(1.05);
}

.scan-button.win-celebrate {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.18), 0 4px 20px var(--purple-glow);
}

.scan-button.win-celebrate::before {
    content: '';
    position: absolute;
    inset: -34px;
    border-radius: 60px;
    background: radial-gradient(circle at 50% 50%, rgba(255,215,0,0.28), rgba(139,92,246,0.18), transparent 68%);
    opacity: 0.75;
    filter: blur(10px);
    pointer-events: none;
    animation: win-aura 1.2s ease-in-out infinite;
}

.scan-button.win-tier-4.win-celebrate::before {
    background: radial-gradient(circle at 50% 50%, rgba(255,215,0,0.42), rgba(220,38,38,0.18), transparent 70%);
    opacity: 0.9;
}

.scan-button.win-tier-3.win-celebrate::before {
    background: radial-gradient(circle at 50% 50%, rgba(239,68,68,0.34), rgba(245,158,11,0.18), transparent 70%);
    opacity: 0.85;
}

/* Extra emphasis for the newest tier-4 win item */
.result-item.win-tier-4.win-celebrate {
    box-shadow:
        0 0 70px rgba(255,215,0,0.22),
        0 0 120px rgba(220,38,38,0.18);
}

.result-item.win-tier-4.win-celebrate::after {
    opacity: 0.85;
}

.custom-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.custom-notification.hide {
    transform: translateX(-50%) translateY(-30px);
    opacity: 0;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    padding-right: 40px;
}

.notification-icon {
    font-size: 24px;
    animation: icon-pop 0.5s ease-out;
}

@keyframes icon-pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.notification-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.notification-action {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.notification-action:active {
    transform: scale(0.98);
}

.notification-action:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
}

.notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s;
}

.notification-close:hover {
    color: var(--text-primary);
    transform: scale(1.2);
}

.notification-progress {
    height: 3px;
    background: var(--purple-primary);
    animation: progress-shrink 4s linear forwards;
}

@keyframes progress-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* Notification types */
.notification-success {
    border-color: var(--green-accent);
}
.notification-success .notification-progress {
    background: var(--green-accent);
}

.notification-error {
    border-color: var(--red-accent);
}
.notification-error .notification-progress {
    background: var(--red-accent);
}

.notification-error .notification-icon {
    animation: shake-icon 0.5s ease-out;
}

@keyframes shake-icon {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.notification-warning {
    border-color: #F59E0B;
}
.notification-warning .notification-progress {
    background: #F59E0B;
}

.notification-locked {
    border-color: #F59E0B;
    background: linear-gradient(135deg, var(--bg-secondary), rgba(245, 158, 11, 0.1));
}
.notification-locked .notification-progress {
    background: linear-gradient(90deg, #F59E0B, var(--purple-primary));
}

.notification-locked .notification-icon {
    animation: lock-shake 0.6s ease-out;
}

@keyframes lock-shake {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-15deg); }
    40% { transform: rotate(15deg); }
    60% { transform: rotate(-10deg); }
    80% { transform: rotate(10deg); }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--purple-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.detail-row {
    margin-bottom: 16px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    padding: 12px;
    border-radius: 8px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

.detail-value.highlight {
    border-left: 3px solid var(--purple-primary);
}

.detail-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.detail-copyall-btn {
    border: none;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 10px 22px rgba(139, 92, 246, 0.25);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.detail-copyall-btn:active {
    transform: translateY(1px) scale(0.99);
    filter: brightness(0.95);
}

.detail-value.copyable {
    cursor: pointer;
    position: relative;
    padding-right: 42px;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.detail-value.copyable::after {
    content: '📋';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.65;
    font-size: 16px;
}

.detail-value.copyable:hover {
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 6px 18px rgba(0,0,0,0.35);
}

.detail-value.copied,
.detail-copyall-btn.copied {
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35), 0 10px 26px rgba(16, 185, 129, 0.10);
    animation: copy-pop 0.45s ease-out;
}

.detail-value.copyable.copied::after {
    content: '✅';
    opacity: 1;
}

@keyframes copy-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Browser auth overlay */
.browser-auth {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.browser-auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: linear-gradient(180deg, rgba(26, 26, 31, 0.98), rgba(12, 12, 16, 0.98));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    padding: 18px 16px;
}

.browser-auth-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--purple-primary);
    text-align: center;
}

.browser-auth-subtitle {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.35;
}

.browser-auth-steps {
    margin: 14px 0 16px 18px;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.55;
}

.browser-auth-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 10px 24px rgba(139, 92, 246, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.browser-auth-btn:active {
    transform: translateY(1px) scale(0.99);
    filter: brightness(0.95);
}

.browser-auth-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #a78bfa;
    text-align: center;
    word-break: break-word;
}

/* Scrollbar for all scrollable elements */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-primary);
    border-radius: 2px;
}

/* Purchase Effect Overlay */
.purchase-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: overlay-appear 0.3s ease-out;
}

@keyframes overlay-appear {
    from { opacity: 0; }
    to { opacity: 1; }
}

.purchase-overlay.fade-out {
    animation: overlay-fade 0.5s ease-out forwards;
}

@keyframes overlay-fade {
    to { opacity: 0; }
}

.purchase-effect {
    position: relative;
    text-align: center;
    animation: effect-scale 0.5s ease-out;
}

@keyframes effect-scale {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.purchase-icon {
    font-size: 80px;
    animation: icon-bounce 0.6s ease-out infinite;
    margin-bottom: 20px;
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.purchase-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #FFD700;
    text-shadow: 0 0 20px #FFD700, 0 0 40px #FFD700;
    margin-bottom: 10px;
    animation: title-glow 0.5s ease-in-out infinite alternate;
}

@keyframes title-glow {
    from { text-shadow: 0 0 20px #FFD700, 0 0 40px #FFD700; }
    to { text-shadow: 0 0 30px #FFD700, 0 0 60px #FFD700, 0 0 80px #FFA500; }
}

.purchase-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--purple-light);
    text-shadow: 0 0 10px var(--purple-primary);
}

.purchase-stars {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.star {
    position: absolute;
    color: #FFD700;
    font-size: 20px;
    animation: star-fly 1.5s ease-out infinite;
    text-shadow: 0 0 10px #FFD700;
}

.star:nth-child(1) { top: 50%; left: 50%; --angle: 0deg; --distance: 150px; animation-delay: 0s; }
.star:nth-child(2) { top: 50%; left: 50%; --angle: 18deg; --distance: 140px; animation-delay: 0.1s; }
.star:nth-child(3) { top: 50%; left: 50%; --angle: 36deg; --distance: 160px; animation-delay: 0.2s; }
.star:nth-child(4) { top: 50%; left: 50%; --angle: 54deg; --distance: 130px; animation-delay: 0.15s; }
.star:nth-child(5) { top: 50%; left: 50%; --angle: 72deg; --distance: 150px; animation-delay: 0.25s; }
.star:nth-child(6) { top: 50%; left: 50%; --angle: 90deg; --distance: 145px; animation-delay: 0.05s; }
.star:nth-child(7) { top: 50%; left: 50%; --angle: 108deg; --distance: 155px; animation-delay: 0.3s; }
.star:nth-child(8) { top: 50%; left: 50%; --angle: 126deg; --distance: 135px; animation-delay: 0.12s; }
.star:nth-child(9) { top: 50%; left: 50%; --angle: 144deg; --distance: 165px; animation-delay: 0.22s; }
.star:nth-child(10) { top: 50%; left: 50%; --angle: 162deg; --distance: 140px; animation-delay: 0.08s; }
.star:nth-child(11) { top: 50%; left: 50%; --angle: 180deg; --distance: 150px; animation-delay: 0.18s; }
.star:nth-child(12) { top: 50%; left: 50%; --angle: 198deg; --distance: 145px; animation-delay: 0.28s; }
.star:nth-child(13) { top: 50%; left: 50%; --angle: 216deg; --distance: 155px; animation-delay: 0.03s; }
.star:nth-child(14) { top: 50%; left: 50%; --angle: 234deg; --distance: 135px; animation-delay: 0.13s; }
.star:nth-child(15) { top: 50%; left: 50%; --angle: 252deg; --distance: 160px; animation-delay: 0.23s; }
.star:nth-child(16) { top: 50%; left: 50%; --angle: 270deg; --distance: 140px; animation-delay: 0.07s; }
.star:nth-child(17) { top: 50%; left: 50%; --angle: 288deg; --distance: 150px; animation-delay: 0.17s; }
.star:nth-child(18) { top: 50%; left: 50%; --angle: 306deg; --distance: 145px; animation-delay: 0.27s; }
.star:nth-child(19) { top: 50%; left: 50%; --angle: 324deg; --distance: 155px; animation-delay: 0.11s; }
.star:nth-child(20) { top: 50%; left: 50%; --angle: 342deg; --distance: 140px; animation-delay: 0.21s; }

@keyframes star-fly {
    0% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance) * -1)) scale(1);
        opacity: 0;
    }
}

.purchase-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px white, 0 0 20px var(--purple-primary);
    animation: sparkle-burst 1.2s ease-out infinite;
}

.sparkle:nth-child(odd) { background: #FFD700; box-shadow: 0 0 10px #FFD700; }
.sparkle:nth-child(even) { background: var(--purple-light); box-shadow: 0 0 10px var(--purple-primary); }

.sparkle:nth-child(1) { --tx: -100px; --ty: -80px; animation-delay: 0s; }
.sparkle:nth-child(2) { --tx: 100px; --ty: -90px; animation-delay: 0.1s; }
.sparkle:nth-child(3) { --tx: -120px; --ty: 50px; animation-delay: 0.2s; }
.sparkle:nth-child(4) { --tx: 110px; --ty: 60px; animation-delay: 0.15s; }
.sparkle:nth-child(5) { --tx: -50px; --ty: -120px; animation-delay: 0.25s; }
.sparkle:nth-child(6) { --tx: 60px; --ty: -110px; animation-delay: 0.05s; }
.sparkle:nth-child(7) { --tx: -140px; --ty: -20px; animation-delay: 0.3s; }
.sparkle:nth-child(8) { --tx: 130px; --ty: -10px; animation-delay: 0.12s; }
.sparkle:nth-child(9) { --tx: -80px; --ty: 100px; animation-delay: 0.22s; }
.sparkle:nth-child(10) { --tx: 90px; --ty: 90px; animation-delay: 0.08s; }
.sparkle:nth-child(11) { --tx: -30px; --ty: 130px; animation-delay: 0.18s; }
.sparkle:nth-child(12) { --tx: 40px; --ty: 120px; animation-delay: 0.28s; }
.sparkle:nth-child(13) { --tx: -150px; --ty: 80px; animation-delay: 0.03s; }
.sparkle:nth-child(14) { --tx: 140px; --ty: 70px; animation-delay: 0.13s; }
.sparkle:nth-child(15) { --tx: -90px; --ty: -100px; animation-delay: 0.23s; }
.sparkle:nth-child(16) { --tx: 80px; --ty: -95px; animation-delay: 0.07s; }
.sparkle:nth-child(17) { --tx: -110px; --ty: -60px; animation-delay: 0.17s; }
.sparkle:nth-child(18) { --tx: 120px; --ty: -50px; animation-delay: 0.27s; }
.sparkle:nth-child(19) { --tx: -60px; --ty: 110px; animation-delay: 0.11s; }
.sparkle:nth-child(20) { --tx: 70px; --ty: 100px; animation-delay: 0.21s; }
.sparkle:nth-child(21) { --tx: -130px; --ty: 30px; animation-delay: 0.06s; }
.sparkle:nth-child(22) { --tx: 125px; --ty: 25px; animation-delay: 0.16s; }
.sparkle:nth-child(23) { --tx: -70px; --ty: -130px; animation-delay: 0.26s; }
.sparkle:nth-child(24) { --tx: 65px; --ty: -125px; animation-delay: 0.09s; }
.sparkle:nth-child(25) { --tx: -100px; --ty: 90px; animation-delay: 0.19s; }
.sparkle:nth-child(26) { --tx: 95px; --ty: 85px; animation-delay: 0.29s; }
.sparkle:nth-child(27) { --tx: -40px; --ty: -140px; animation-delay: 0.04s; }
.sparkle:nth-child(28) { --tx: 45px; --ty: -135px; animation-delay: 0.14s; }
.sparkle:nth-child(29) { --tx: -135px; --ty: -40px; animation-delay: 0.24s; }
.sparkle:nth-child(30) { --tx: 130px; --ty: -35px; animation-delay: 0.02s; }

@keyframes sparkle-burst {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1);
        opacity: 0;
    }
}

.purchase-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border: 3px solid #FFD700;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ring-expand-purchase 1.5s ease-out infinite;
}

.ring:nth-child(2) { animation-delay: 0.3s; }
.ring:nth-child(3) { animation-delay: 0.6s; }

@keyframes ring-expand-purchase {
    0% {
        width: 100px;
        height: 100px;
        opacity: 1;
        border-color: #FFD700;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
        border-color: var(--purple-primary);
    }
}

.purchase-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translate(-50%, -50%);
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 215, 0, 0.3) 10deg,
        transparent 20deg,
        transparent 30deg,
        rgba(139, 92, 246, 0.3) 40deg,
        transparent 50deg
    );
    animation: rays-rotate 3s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes rays-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* =============================================
   REFERRAL SCREEN STYLES
============================================= */

.referral-content {
    padding: 15px 0;
}

.referral-link-card {
    background: linear-gradient(135deg, #2d1b4e, #1a0a2e);
    border-radius: 20px;
    padding: 25px 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    text-align: center;
}

.referral-link-title {
    font-size: 14px;
    color: #a78bfa;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.referral-link-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.referral-link-text {
    flex: 1;
    font-size: 13px;
    color: #e0e0e0;
    word-break: break-all;
    text-align: left;
}

.copy-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: scale(1.05);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #10b981, #059669);
}

.referral-code-display {
    font-size: 24px;
    font-weight: bold;
    color: #f5f5f5;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.referral-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.referral-action-btn {
    flex: 1;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 12px;
    border-radius: 12px;
    color: #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.referral-action-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.referral-stat-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.1));
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.referral-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #f5f5f5;
    margin-bottom: 5px;
}

.referral-stat-value.earnings {
    color: #10b981;
}

.referral-stat-label {
    font-size: 11px;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.referral-levels-section {
    margin-bottom: 20px;
}

.referral-section-title {
    font-size: 14px;
    color: #a78bfa;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.referral-level-card {
    background: rgba(30, 20, 50, 0.8);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-badge {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
}

.level-info {
    flex: 1;
}

.level-title {
    font-size: 14px;
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 3px;
}

.level-details {
    font-size: 12px;
    color: #a78bfa;
}

.level-count {
    text-align: right;
}

.level-count-value {
    font-size: 20px;
    font-weight: bold;
    color: #10b981;
}

.level-count-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
}

.recent-referrals-section {
    margin-bottom: 20px;
}

.referral-item {
    background: rgba(30, 20, 50, 0.6);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid #8b5cf6;
}

.referral-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
}

.referral-user-info {
    flex: 1;
}

.referral-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #f5f5f5;
}

.referral-join-date {
    font-size: 11px;
    color: #888;
}

.no-referrals {
    text-align: center;
    padding: 30px;
    color: #888;
}

.no-referrals-icon {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.invite-prompt {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.invite-prompt-text {
    color: #10b981;
    font-size: 14px;
    margin-bottom: 15px;
}

.invite-prompt-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.invite-prompt-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

/* =============================================
   DEPOSIT SCREEN STYLES
============================================= */

.deposit-content {
    padding: 15px 0;
}

.deposit-balance-card {
    background: linear-gradient(135deg, #2d1b4e, #1a0a2e);
    border-radius: 20px;
    padding: 25px 20px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.deposit-balance-label {
    font-size: 12px;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.deposit-balance-value {
    font-size: 36px;
    font-weight: bold;
    color: #f5f5f5;
}

.deposit-balance-usd {
    font-size: 18px;
    color: #10b981;
    margin-top: 5px;
}

.deposit-rate {
    font-size: 12px;
    color: #a78bfa;
    margin-top: 8px;
    padding: 5px 15px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 15px;
    display: inline-block;
}

.deposit-methods-section {
    margin-bottom: 20px;
}

.deposit-section-title {
    font-size: 14px;
    color: #a78bfa;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.payment-method-card {
    background: rgba(30, 20, 50, 0.8);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.payment-method-card.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
}

.payment-method-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.payment-method-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.payment-method-icon.card { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.payment-method-icon.btc { background: linear-gradient(135deg, #f7931a, #c27815); }
.payment-method-icon.eth { background: linear-gradient(135deg, #627eea, #3c3c3d); }
.payment-method-icon.usdt { background: linear-gradient(135deg, #26a17b, #1a7a5c); }

.payment-method-title {
    font-size: 16px;
    font-weight: 600;
    color: #f5f5f5;
}

.payment-method-limits {
    font-size: 11px;
    color: #888;
}

.payment-method-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
    display: none;
}

.payment-method-card.selected .payment-method-details {
    display: block;
}

.payment-details-text {
    font-family: monospace;
    font-size: 13px;
    color: #e0e0e0;
    word-break: break-all;
    white-space: pre-wrap;
}

.payment-method-instructions {
    font-size: 12px;
    color: #a78bfa;
    margin-top: 10px;
    padding: 10px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    display: none;
}

.payment-method-card.selected .payment-method-instructions {
    display: block;
}

.copy-details-btn {
    background: rgba(139, 92, 246, 0.3);
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.copy-details-btn:hover {
    background: rgba(139, 92, 246, 0.5);
}

.deposit-form {
    background: rgba(30, 20, 50, 0.8);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.deposit-form-title {
    font-size: 16px;
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 15px;
}

.deposit-input-group {
    margin-bottom: 15px;
}

.deposit-input-label {
    font-size: 12px;
    color: #a78bfa;
    margin-bottom: 5px;
    display: block;
}

.deposit-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    color: #f5f5f5;
    font-size: 14px;
    transition: all 0.3s ease;
}

.deposit-input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.deposit-input::placeholder {
    color: #666;
}

.deposit-hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.deposit-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none;
    padding: 15px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.deposit-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.deposit-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.deposit-secondary-btn {
    width: 100%;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(139, 92, 246, 0.25);
    padding: 12px;
    border-radius: 12px;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.deposit-secondary-btn:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

.deposit-history-section {
    margin-top: 25px;
}

.deposit-history-item {
    background: rgba(30, 20, 50, 0.6);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deposit-history-info {
    flex: 1;
}

.deposit-history-amount {
    font-size: 16px;
    font-weight: 600;
    color: #f5f5f5;
}

.deposit-history-date {
    font-size: 11px;
    color: #888;
}

.deposit-history-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.deposit-history-status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.deposit-history-status.approved {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.deposit-history-status.rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Responsive */
@media (max-width: 360px) {
    .crypto-btn {
        min-width: 55px;
        max-width: 65px;
        padding: 10px 6px;
    }
    
    .crypto-icon {
        font-size: 20px;
    }
    
    .crypto-name {
        font-size: 10px;
    }
    
    .counter-value {
        font-size: 36px;
    }
    
    .scan-button {
        width: 180px;
        height: 50px;
        font-size: 14px;
    }
}
