/* ============================================
   LOTTERY SLOT MACHINE - PREMIUM UI
   NO EMOJIS
   ============================================ */

.lottery-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 100px 0;
    min-height: 100vh;
    background: #F8FAFC;
}

/* ============================================
   DYNAMIC JACKPOT SECTION
   ============================================ */

.jackpot-section {
    background: linear-gradient(135deg, #1E1B4B, #312E81, #4F46E5);
    padding: 24px 20px 20px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    transition: all 0.5s ease;
}

/* Glow effects */
.jackpot-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.4;
}

.glow-1 {
    width: 300px;
    height: 300px;
    background: rgba(79, 70, 229, 0.3);
    top: -100px;
    right: -80px;
    animation: floatGlow 6s ease-in-out infinite;
}

.glow-2 {
    width: 200px;
    height: 200px;
    background: rgba(252, 211, 77, 0.15);
    bottom: -60px;
    left: -60px;
    animation: floatGlow 8s ease-in-out infinite reverse;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
}

.jackpot-content {
    position: relative;
    z-index: 1;
}

/* ===== JACKPOT LABEL ===== */
.jackpot-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.jackpot-label.live {
    color: #FCD34D;
    animation: pulseLabel 1s infinite;
}

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

/* ===== JACKPOT AMOUNT ===== */
.jackpot-amount-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin: 4px 0;
}

.jackpot-currency {
    font-size: 22px;
    font-weight: 700;
    color: #FCD34D;
    margin-right: 2px;
}

.jackpot-amount {
    font-size: 36px;
    font-weight: 900;
    color: #FCD34D;
    letter-spacing: 1px;
    transition: all 0.5s ease;
}

.jackpot-amount.pulse {
    animation: amountPulse 1s ease-in-out infinite;
}

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

/* ===== JACKPOT STATS ===== */
.jackpot-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.stat-item strong {
    color: #FFFFFF;
}

.stat-icon {
    width: 14px;
    height: 14px;
    stroke: rgba(255, 255, 255, 0.6);
}

.stat-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   STATUS CONTAINER (Countdown / Draw / Reveal)
   ============================================ */

.status-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    overflow: hidden;
}

/* --- Countdown Mode --- */
.countdown-mode {
    width: 100%;
}

.countdown-mode .cd-label {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 4px;
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    font-family: 'Courier New', monospace;
}

.countdown-display .cd-item {
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 10px;
    border-radius: 6px;
    min-width: 36px;
    text-align: center;
}

.countdown-display .cd-divider {
    color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    font-size: 18px;
}

.cd-label-small {
    font-size: 7px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: -2px;
}

/* --- Draw Animation Mode --- */
.draw-mode {
    width: 100%;
    text-align: center;
}

.draw-reels {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 8px;
}

.draw-reel {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.draw-symbol {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    transition: all 0.1s ease;
}

.draw-symbol.spinning {
    animation: symbolSpin 0.1s linear infinite;
}

@keyframes symbolSpin {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-4px); opacity: 0.7; }
    100% { transform: translateY(0); opacity: 1; }
}

.draw-status-text {
    font-size: 12px;
    font-weight: 700;
    color: #FCD34D;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulseText 1s ease-in-out infinite;
}

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

.draw-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.draw-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FCD34D, #F59E0B);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

/* --- Winners Reveal Mode --- */
.winners-reveal {
    width: 100%;
}

.winners-grid {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
}

.winner-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex: 1;
    max-width: 100px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.winner-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.winner-card.winner-1st {
    max-width: 120px;
    padding: 12px 10px;
    border-color: rgba(252, 211, 77, 0.3);
    background: rgba(252, 211, 77, 0.08);
    box-shadow: 0 0 40px rgba(252, 211, 77, 0.05);
}

.winner-card.winner-2nd {
    border-color: rgba(156, 163, 175, 0.2);
}

.winner-card.winner-3rd {
    border-color: rgba(217, 119, 6, 0.2);
}

.winner-crown {
    font-size: 20px;
    font-weight: 900;
    color: #FCD34D;
    margin-bottom: 2px;
    animation: crownBounce 1.5s ease-in-out infinite;
}

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

.winner-place {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.winner-card.winner-1st .winner-place { color: #FCD34D; }
.winner-card.winner-2nd .winner-place { color: #9CA3AF; }
.winner-card.winner-3rd .winner-place { color: #D97706; }

.winner-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 4px auto;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
}

.winner-avatar-large {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.winner-name {
    font-size: 11px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-amount {
    font-size: 12px;
    font-weight: 700;
    color: #10B981;
}

.winner-card.winner-1st .winner-amount { color: #FCD34D; }
.winner-card.winner-2nd .winner-amount { color: #9CA3AF; }
.winner-card.winner-3rd .winner-amount { color: #D97706; }

/* ============================================
   PROMINENT BUY SECTION
   ============================================ */

.buy-section {
    background: #FFFFFF;
    margin: 16px 16px 0 16px;
    padding: 18px 16px 16px 16px;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.buy-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.5px;
}

.ticket-prices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.ticket-btn {
    padding: 12px 8px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #F8FAFC;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.ticket-btn:hover {
    border-color: #4F46E5;
    background: #EEF2FF;
    transform: translateY(-2px);
}

.ticket-btn.active {
    border-color: #4F46E5;
    background: #4F46E5;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.ticket-btn.active .ticket-price {
    color: #FFFFFF;
}

.ticket-btn.active .ticket-label {
    color: rgba(255, 255, 255, 0.7);
}

.ticket-price {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #1F2937;
    transition: color 0.2s ease;
}

.ticket-label {
    display: block;
    font-size: 9px;
    color: #6B7280;
    font-weight: 500;
    margin-top: 2px;
    transition: color 0.2s ease;
}

.buy-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.buy-icon {
    width: 20px;
    height: 20px;
    stroke: #FFFFFF;
}

.buy-balance {
    text-align: center;
    font-size: 12px;
    color: #6B7280;
    margin-top: 8px;
}

.buy-balance strong {
    color: #1F2937;
    font-weight: 700;
}

/* ===== SLOT MACHINE ===== */
.slot-container {
    padding: 16px;
    background: #FFFFFF;
    margin: 12px 16px;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.slot-reels {
    display: flex;
    gap: 12px;
    justify-content: center;
    background: #F8FAFC;
    border-radius: 12px;
    padding: 16px 12px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
    position: relative;
}

.slot-reel {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
    background: #FFFFFF;
    border: 3px solid #E5E7EB;
    max-width: 120px;
    aspect-ratio: 1/1;
    position: relative;
    transition: border-color 0.3s ease;
}

.slot-reel:nth-child(1) { border-color: #FF6B6B; }
.slot-reel:nth-child(2) { border-color: #4D96FF; }
.slot-reel:nth-child(3) { border-color: #6BCB77; }

.slot-reel .icons {
    position: relative;
    transition: transform 0.1s linear;
}

.slot-reel .icons .symbol {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-bottom: 1px solid #F3F4F6;
    padding: 8px;
}

.slot-reel .icons .symbol .avatar {
    width: 100%;
    height: 100%;
    max-width: 56px;
    max-height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    flex-shrink: 0;
}

.avatar-1 { background: linear-gradient(135deg, #FF6B6B, #EE5A24); }
.avatar-2 { background: linear-gradient(135deg, #4D96FF, #3B82F6); }
.avatar-3 { background: linear-gradient(135deg, #6BCB77, #10B981); }
.avatar-4 { background: linear-gradient(135deg, #F59E0B, #D97706); }
.avatar-5 { background: linear-gradient(135deg, #9B59B6, #7C3AED); }
.avatar-6 { background: linear-gradient(135deg, #EC4899, #BE185D); }
.avatar-7 { background: linear-gradient(135deg, #06B6D4, #0891B2); }
.avatar-8 { background: linear-gradient(135deg, #F472B6, #DB2777); }

.slot-reel .icons .symbol.winner {
    background: #FEF3C7 !important;
    border-radius: 4px;
}

.slot-reel .icons .symbol.winner .avatar {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
    border: 3px solid #F59E0B;
}

/* ===== SPIN INDICATOR ===== */
.spin-indicator {
    text-align: center;
    font-size: 11px;
    color: #6B7280;
    padding: 10px 0 2px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.spin-indicator .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4F46E5;
    animation: pulseDot 1s infinite;
}

.spin-indicator .dot.idle {
    background: #9CA3AF;
    animation: none;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

.spin-indicator .status-text {
    font-size: 11px;
}

.spin-indicator .status-text.live {
    color: #4F46E5;
    font-weight: 600;
}

/* ===== WINNER POPUP ===== */
.winner-popup {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.winner-popup.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.winner-popup .popup-content {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 30px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0.8) rotate(-3deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.winner-popup .popup-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 auto 10px;
    border: 3px solid #FFFFFF;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
}

.winner-popup .popup-place {
    font-size: 12px;
    font-weight: 700;
    color: #F59E0B;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.winner-popup .popup-name {
    font-size: 24px;
    font-weight: 900;
    color: #1F2937;
    margin: 4px 0;
}

.winner-popup .popup-amount {
    font-size: 20px;
    font-weight: 700;
    color: #10B981;
}

.winner-popup .popup-btn {
    margin-top: 16px;
    padding: 12px 32px;
    background: #4F46E5;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.winner-popup .popup-btn:hover {
    background: #4338CA;
    transform: translateY(-2px);
}

/* ===== LEADERBOARD ===== */
.leaderboard-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 12px 16px;
    border: 1px solid #E5E7EB;
}

.leaderboard-section .section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leaderboard-section .section-title .badge-count {
    font-size: 11px;
    color: #6B7280;
    background: #F3F4F6;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 4px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    border-color: #E5E7EB;
}

.leaderboard-item .rank {
    font-size: 12px;
    font-weight: 700;
    color: #9CA3AF;
    min-width: 24px;
}

.leaderboard-item .rank.gold { color: #F59E0B; }
.leaderboard-item .rank.silver { color: #9CA3AF; }
.leaderboard-item .rank.bronze { color: #D97706; }

.leaderboard-item .lb-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #FFFFFF;
    flex-shrink: 0;
}

.leaderboard-item .lb-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-item .lb-info .lb-name {
    font-size: 13px;
    font-weight: 600;
    color: #1F2937;
}

.leaderboard-item .lb-info .lb-tickets {
    font-size: 10px;
    color: #6B7280;
}

.leaderboard-item .lb-amount {
    font-size: 13px;
    font-weight: 700;
    color: #10B981;
}

.leaderboard-item .lb-amount.gold { color: #F59E0B; }
.leaderboard-item .lb-amount.silver { color: #6B7280; }
.leaderboard-item .lb-amount.bronze { color: #D97706; }

/* ===== PREVIOUS WINNERS ===== */
.prev-winners {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 16px 16px 16px;
    border: 1px solid #E5E7EB;
}

.prev-winners .section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.prev-winner-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #F3F4F6;
}

.prev-winner-item:last-child {
    border-bottom: none;
}

.prev-winner-item .pw-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #FFFFFF;
    flex-shrink: 0;
}

.prev-winner-item .pw-info {
    flex: 1;
}

.prev-winner-item .pw-info .pw-name {
    font-size: 13px;
    font-weight: 600;
    color: #1F2937;
}

.prev-winner-item .pw-info .pw-date {
    font-size: 10px;
    color: #6B7280;
}

.prev-winner-item .pw-amount {
    font-size: 14px;
    font-weight: 700;
    color: #10B981;
}

/* ===== CONFETTI ===== */
.confetti-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}
/* ===== FROZEN BUY STATE ===== */
.buy-frozen {
    text-align: center;
    padding: 8px;
    margin-top: 6px;
    background: #FEF3C7;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #92400E;
    border: 1px solid #FDE68A;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.buy-frozen svg {
    width: 16px;
    height: 16px;
    stroke: #92400E;
}

.ticket-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.buy-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .jackpot-amount { font-size: 28px; }
    .slot-reel { max-width: 90px; }
    .slot-reel .icons .symbol .avatar { max-width: 40px; max-height: 40px; font-size: 11px; }
    .countdown-display { font-size: 18px; }
    .countdown-display .cd-item { min-width: 30px; padding: 2px 8px; }
    .ticket-price { font-size: 16px; }
    .buy-btn { font-size: 16px; padding: 14px; }
    .winners-grid { gap: 4px; }
    .winner-card { padding: 6px 8px; max-width: 80px; }
    .winner-card.winner-1st { max-width: 100px; padding: 10px 8px; }
    .winner-avatar { width: 28px; height: 28px; font-size: 12px; }
    .winner-avatar-large { width: 38px; height: 38px; font-size: 16px; }
}

@media (max-width: 360px) {
    .slot-reel { max-width: 72px; }
    .slot-reel .icons .symbol .avatar { max-width: 32px; max-height: 32px; font-size: 9px; }
    .jackpot-amount { font-size: 22px; }
    .ticket-prices { gap: 4px; }
    .ticket-btn { padding: 8px 4px; }
    .ticket-price { font-size: 14px; }
    .countdown-display { font-size: 14px; }
    .countdown-display .cd-item { min-width: 24px; padding: 2px 6px; }
}