/* ============================================
   SPINRUSH - LOTTERY STYLES (PROFESSIONAL V2)
   ============================================ */

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

/* ---- Hero Banner ---- */
.lottery-hero {
    background: linear-gradient(135deg, #4F46E5, #4338CA);
    padding: 20px 20px 16px 20px;
    position: relative;
    overflow: hidden;
}

.lottery-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.lottery-hero .hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.lottery-hero .hero-badge {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.lottery-hero .hero-title {
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    margin-top: 2px;
}

.lottery-hero .hero-jackpot {
    font-size: 26px;
    font-weight: 900;
    color: #FCD34D;
    margin-top: 2px;
}

.lottery-hero .hero-stats {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.lottery-hero .hero-stat {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lottery-hero .hero-stat .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.lottery-hero .hero-stat .stat-label {
    font-size: 7px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Countdown ---- */
.countdown-wrapper {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.countdown-wrapper .countdown-label {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    margin-bottom: 4px;
}

.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.countdown-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 6px;
    min-width: 40px;
}

.countdown-item .number {
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    font-family: 'Inter', monospace;
}

.countdown-item .label {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 16px;
}

/* ---- Prize Badges ---- */
.prize-badges {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.prize-badge {
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 9px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.prize-badge.gold {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #FCD34D;
}

.prize-badge.silver {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #94A3B8;
}

.prize-badge.bronze {
    background: rgba(180, 83, 9, 0.15);
    border: 1px solid rgba(180, 83, 9, 0.25);
    color: #D97706;
}

.prize-badge .badge-amount {
    opacity: 0.7;
    font-weight: 500;
}

/* ---- Buy Trigger Button ---- */
.buy-trigger-section {
    padding: 16px 16px 0 16px;
}

.buy-trigger-btn {
    width: 100%;
    padding: 16px;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    color: #1F2937;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buy-trigger-btn:hover {
    border-color: #4F46E5;
    background: #F8FAFC;
}

.buy-trigger-btn .btn-arrow {
    font-size: 18px;
    color: #9CA3AF;
}

/* ---- Bottom Sheet ---- */
.bottom-sheet-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 20px 20px 0 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 20px 20px 30px 20px;
    max-height: 85vh;
    overflow-y: auto;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet .sheet-handle {
    width: 40px;
    height: 4px;
    background: #E5E7EB;
    border-radius: 4px;
    margin: 0 auto 16px auto;
}

.bottom-sheet .sheet-title {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 4px;
}

.bottom-sheet .sheet-subtitle {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 16px;
}

.bottom-sheet .sheet-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Sheet Ticket Grid ---- */
.sheet-ticket-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.sheet-ticket-btn {
    padding: 12px 6px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    color: #1F2937;
    transition: all 0.2s ease;
    text-align: center;
}

.sheet-ticket-btn:hover {
    border-color: #4F46E5;
}

.sheet-ticket-btn.active {
    border-color: #4F46E5;
    background: #EEF2FF;
    color: #4F46E5;
}

.sheet-ticket-btn .price {
    font-size: 18px;
    font-weight: 800;
}

.sheet-ticket-btn .label {
    font-size: 8px;
    font-weight: 400;
    color: #9CA3AF;
}

.sheet-ticket-btn.active .label {
    color: #4F46E5;
}

/* ---- Sheet Quantity ---- */
.sheet-quantity-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.sheet-quantity-row .field-group label {
    font-size: 10px;
    font-weight: 600;
    color: #6B7280;
    display: block;
    margin-bottom: 3px;
}

.sheet-quantity-row .field-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
    background: #FFFFFF;
}

.sheet-quantity-row .field-group input:focus {
    border-color: #4F46E5;
    outline: none;
}

.sheet-total-box {
    background: #EEF2FF;
    border-radius: 8px;
    padding: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #4F46E5;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}

/* ---- Sheet Buy Button ---- */
.sheet-buy-btn {
    width: 100%;
    padding: 14px;
    background: #4F46E5;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sheet-buy-btn:hover:not(:disabled) {
    background: #4338CA;
}

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

.sheet-balance-hint {
    text-align: center;
    font-size: 11px;
    color: #6B7280;
    margin-top: 10px;
}

/* ---- My Tickets (Neutral, Horizontal Scroll) ---- */
.my-tickets-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 12px 16px 0 16px;
    border: 1px solid #E5E7EB;
}

.my-tickets-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.my-tickets-section .section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1F2937;
}

.my-tickets-section .ticket-count {
    font-size: 11px;
    color: #6B7280;
    background: #F3F4F6;
    padding: 2px 10px;
    border-radius: 20px;
}

/* Horizontal scrollable ticket container - FIXED HEIGHT */
.ticket-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 4px 0 6px 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.ticket-scroll-container::-webkit-scrollbar {
    height: 3px;
}

.ticket-scroll-container::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 10px;
}

.ticket-scroll-container::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 10px;
}

.ticket-scroll-item {
    display: inline-block;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 6px 12px;
    margin-right: 6px;
    min-width: 70px;
    text-align: center;
    vertical-align: top;
}

.ticket-scroll-item .ticket-number {
    font-size: 10px;
    font-weight: 600;
    color: #1F2937;
    letter-spacing: 0.3px;
}

.ticket-scroll-item .ticket-price {
    font-size: 9px;
    color: #6B7280;
    display: block;
}

.ticket-scroll-item .ticket-id {
    font-size: 7px;
    color: #9CA3AF;
    display: block;
}

/* ---- Leaderboard (Clean) ---- */
.leaderboard-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 12px 16px 0 16px;
    border: 1px solid #E5E7EB;
}

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

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 4px;
    border: 1px solid transparent;
    height: 40px;
}

.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 .avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
}

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

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

.leaderboard-item .user-info .ticket-count {
    font-size: 9px;
    color: #6B7280;
}

.leaderboard-item .ticket-badge {
    background: #EEF2FF;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: #4F46E5;
    white-space: nowrap;
}

/* ---- Previous Winners ---- */
.winners-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 12px 16px 16px 16px;
    border: 1px solid #E5E7EB;
}

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

.winner-card {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid #E5E7EB;
}

.winner-card .winner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.winner-card .winner-date {
    font-size: 11px;
    color: #6B7280;
}

.winner-card .winner-pool {
    font-size: 12px;
    font-weight: 600;
    color: #1F2937;
}

.winner-card .winner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 6px;
}

.winner-card .winner-place {
    text-align: center;
    padding: 4px;
    border-radius: 6px;
    font-size: 11px;
}

.winner-card .winner-place.gold { background: #FEF3C7; }
.winner-card .winner-place.silver { background: #F1F5F9; }
.winner-card .winner-place.bronze { background: #FFFBEB; }

.winner-card .winner-place .place-label {
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
}

.winner-card .winner-place .place-name {
    font-size: 12px;
    font-weight: 700;
}

.winner-card .winner-place .place-amount {
    font-size: 10px;
    font-weight: 600;
}

.winner-card .winner-place.gold .place-name { color: #92400E; }
.winner-card .winner-place.gold .place-amount { color: #78350F; }
.winner-card .winner-place.silver .place-name { color: #475569; }
.winner-card .winner-place.silver .place-amount { color: #334155; }
.winner-card .winner-place.bronze .place-name { color: #78350F; }
.winner-card .winner-place.bronze .place-amount { color: #78350F; }

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    background: #FFFFFF;
    border-radius: 12px;
    border: 2px dashed #E5E7EB;
    margin: 16px;
}

.empty-state .empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #1F2937;
}

.empty-state .empty-subtitle {
    font-size: 13px;
    color: #6B7280;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .lottery-hero .hero-title {
        font-size: 17px;
    }
    
    .lottery-hero .hero-jackpot {
        font-size: 21px;
    }
    
    .countdown-item {
        min-width: 34px;
        padding: 2px 6px;
    }
    
    .countdown-item .number {
        font-size: 16px;
    }
    
    .sheet-ticket-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bottom-sheet {
        padding: 16px 16px 24px 16px;
    }
    
    .ticket-scroll-item {
        min-width: 60px;
        padding: 4px 10px;
    }
}