/* NKN Lottery Styles */

/* ============================================
   DASHBOARD BUTTONS - lottery-stat class
   ============================================ */
.lottery-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lottery-stat:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    transform: translateY(-1px);
}

.lottery-stat i {
    color: inherit;
}

#lottery-button {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.15);
}

#lottery-button:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.25);
}

/* ============================================
   MODAL OVERLAY - Transparent, see-through
   ============================================ */
#lottery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    box-sizing: border-box;
}

#lottery-modal.hidden {
    display: none;
}

/* ============================================
   MODAL CONTENT - Glass effect, see-through
   ============================================ */
.lottery-modal-content,
.lucky-modal-content {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 540px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.lottery-modal-wide {
    max-width: 580px;
}

/* ============================================
   MODAL HEADER
   ============================================ */
.lottery-modal-header,
.lucky-modal-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lottery-modal-title,
.lucky-modal-title {
    color: #f1f5f9;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.lottery-modal-close,
.lucky-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.lottery-modal-close:hover,
.lucky-modal-close:hover {
    color: #f1f5f9;
}

/* ============================================
   MODAL BODY
   ============================================ */
.lottery-modal-body,
.lucky-modal-body {
    padding: 1.25rem 1.5rem;
}

/* ============================================
   JACKPOT DISPLAY
   ============================================ */
.lottery-jackpot-section {
    text-align: center;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.lottery-jackpot-label {
    font-size: 0.8rem;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.lottery-jackpot-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #fef3c7;
}

.lottery-jackpot-tickets {
    font-size: 0.85rem;
    color: #a3a3a3;
    margin-top: 0.5rem;
}

/* ============================================
   COUNTDOWN
   ============================================ */
.lottery-countdown-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-align: center;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.lottery-countdown-label {
    font-size: 0.85rem;
    color: #94a3b8;
}

.lottery-countdown-time {
    font-size: 1rem;
    font-weight: 600;
    color: #fbbf24;
}

/* ============================================
   NUMBER PICKER
   ============================================ */
.lottery-picker-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.lottery-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.lottery-picker-actions {
    display: flex;
    gap: 0.5rem;
}

.lottery-btn-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lottery-btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

/* Selected Numbers */
.lottery-selected-numbers {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lottery-selected-num {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.lottery-selected-num.filled {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    color: #1e293b;
}

/* Number Grid */
.lottery-number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
    padding: 2px;
}

.lottery-number {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.lottery-number:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
}

.lottery-number.selected {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: transparent;
    color: #1e293b;
    font-weight: 600;
}

/* ============================================
   PURCHASE BUTTON
   ============================================ */
.lottery-purchase-section {
    text-align: center;
    margin-bottom: 1.25rem;
}

.lottery-purchase-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    color: #1e293b;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.lottery-purchase-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.lottery-purchase-btn:disabled {
    background: #475569;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ============================================
   PRIZE TIERS
   ============================================ */
.lottery-tiers-section {
    margin-bottom: 1.25rem;
}

.lottery-tiers-title {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.6rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lottery-tiers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.lottery-tier {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
}

.lottery-tier-name {
    font-size: 0.65rem;
    color: #94a3b8;
}

.lottery-tier-percent {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fbbf24;
}

/* ============================================
   NAV TABS
   ============================================ */
.lottery-nav-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.lottery-nav-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.lottery-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}

.lottery-pending-badge {
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
    border-radius: 8px;
}

/* ============================================
   INFO BOX
   ============================================ */
.lottery-info-box {
    background: rgba(251, 191, 36, 0.05);
    border-left: 3px solid rgba(251, 191, 36, 0.5);
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
}

.lottery-info-title {
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 0.25rem;
}

/* ============================================
   PAYMENT FLOW
   ============================================ */
.lottery-payment-section {
    text-align: center;
    padding: 0.5rem 0;
}

.lottery-payment-icon {
    font-size: 2.5rem;
    color: #fbbf24;
    margin-bottom: 0.75rem;
}

.lottery-payment-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 1.25rem;
}

.lottery-payment-numbers {
    margin-bottom: 1.25rem;
}

.lottery-payment-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.lottery-payment-nums {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.lottery-num-badge {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.85rem;
}

.lottery-payment-amount {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.lottery-payment-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
    margin: 0.4rem 0;
}

.lottery-payment-address {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.lottery-payment-addr {
    font-family: monospace;
    font-size: 0.7rem;
    color: #cbd5e1;
    word-break: break-all;
    margin: 0.5rem 0;
}

.lottery-copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lottery-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lottery-payment-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 0.875rem;
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #fcd34d;
}

.lottery-payment-warning i {
    font-size: 1.1rem;
    color: #f59e0b;
}

.lottery-payment-info {
    font-size: 0.8rem;
    color: #94a3b8;
}

.lottery-payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.9rem;
}

.lottery-payment-status i {
    color: #fbbf24;
}

.lottery-payment-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin-top: 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.lottery-btn-primary,
.lottery-btn-secondary {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.lottery-btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    color: #1e293b;
}

.lottery-btn-primary:hover {
    transform: translateY(-1px);
}

.lottery-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.lottery-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   LISTS
   ============================================ */
.lottery-pending-list,
.lottery-tickets-list,
.lottery-history-list {
    max-height: 320px;
    overflow-y: auto;
}

.lottery-pending-item,
.lottery-ticket-item,
.lottery-history-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 0.5rem;
}

.lottery-pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lottery-ticket-item.winner {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.05);
}

.lottery-pending-numbers,
.lottery-ticket-numbers {
    display: flex;
    gap: 0.25rem;
}

.lottery-num-badge-small {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    color: #1e293b;
    font-size: 0.65rem;
    font-weight: 600;
}

.lottery-num-badge-small.matched {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.lottery-pending-info {
    text-align: right;
}

.lottery-pending-amount {
    font-weight: 600;
    color: #fbbf24;
    font-size: 0.85rem;
}

.lottery-pending-expires {
    font-size: 0.7rem;
    color: #f59e0b;
}

.lottery-ticket-draw {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.lottery-ticket-result {
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.lottery-win {
    color: #fbbf24;
    font-weight: 600;
}

.lottery-no-win {
    color: #94a3b8;
}

.lottery-pending-draw {
    color: #60a5fa;
}

/* History */
.lottery-history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.lottery-history-draw {
    font-weight: 600;
    color: #f1f5f9;
}

.lottery-history-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

.lottery-history-numbers {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.lottery-history-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.lottery-num-badge-win {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    color: #1e293b;
    font-size: 0.7rem;
    font-weight: 600;
}

.lottery-history-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ============================================
   STATES
   ============================================ */
.lottery-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem;
    font-style: italic;
}

.lottery-back-btn {
    text-align: center;
    margin-top: 1rem;
}

.lucky-loading {
    text-align: center;
    padding: 2.5rem;
}

.lucky-loading-spinner {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #fbbf24;
}

.lucky-loading-text {
    color: #cbd5e1;
}

.lucky-error {
    text-align: center;
    padding: 2rem;
}

.lucky-error-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #ef4444;
}

.lucky-error-text {
    color: #fca5a5;
}

/* ============================================
   SCROLLBAR
   ============================================ */
.lottery-modal-content::-webkit-scrollbar,
.lucky-modal-content::-webkit-scrollbar {
    width: 6px;
}

.lottery-modal-content::-webkit-scrollbar-track,
.lucky-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.lottery-modal-content::-webkit-scrollbar-thumb,
.lucky-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 600px) {
    .lottery-number-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .lottery-tiers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lottery-nav-tabs {
        flex-wrap: wrap;
    }

    .lottery-nav-btn {
        min-width: 45%;
    }

    .lottery-payment-actions {
        flex-direction: column;
    }

    .lottery-jackpot-amount {
        font-size: 1.6rem;
    }

    .lottery-selected-num {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* ============================================
   ENHANCED PAST DRAWS DISPLAY
   ============================================ */

/* Winning numbers prominent display */
.lottery-winning-numbers {
    text-align: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.lottery-winning-label {
    font-size: 0.7rem;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.6rem;
}

.lottery-winning-balls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lottery-ball-win {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #fcd34d, #f59e0b);
    border-radius: 50%;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

/* User's tickets section */
.lottery-your-tickets {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.lottery-your-tickets.empty {
    text-align: center;
    padding: 0.75rem;
}

.lottery-your-tickets .no-tickets {
    color: #64748b;
    font-size: 0.8rem;
    font-style: italic;
}

.lottery-your-tickets-header {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lottery-your-tickets-header i {
    color: #fbbf24;
}

/* Individual user ticket */
.lottery-user-ticket {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    margin-bottom: 0.4rem;
    border: 1px solid transparent;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lottery-user-ticket:last-child {
    margin-bottom: 0;
}

.lottery-user-ticket.is-winner {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    animation: winner-glow 2s ease-in-out infinite alternate;
}

@keyframes winner-glow {
    from {
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.2);
    }
    to {
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
    }
}

/* Ticket numbers */
.lottery-user-ticket .lottery-ticket-numbers {
    display: flex;
    gap: 0.3rem;
}

.lottery-ticket-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lottery-ticket-num.matched {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: match-pulse 1.5s ease-in-out infinite;
}

@keyframes match-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Prize display */
.lottery-ticket-prize {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lottery-ticket-prize.no-win {
    color: #64748b;
}

.lottery-ticket-prize.winner {
    color: #fbbf24;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.15);
    padding: 0.35rem 0.6rem;
    border-radius: 20px;
}

.lottery-ticket-prize.winner i {
    color: #fcd34d;
}

.lottery-ticket-prize .prize-tier {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

.lottery-ticket-prize .prize-amount {
    color: #4ade80;
    font-weight: 700;
}

/* Draw with winner highlight */
.lottery-history-item.has-winner {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.05);
}

.lottery-history-item.has-winner .lottery-history-draw {
    color: #fbbf24;
}

/* Updated history stats with icons */
.lottery-history-stats i {
    color: #64748b;
    margin-right: 0.2rem;
}

/* Mobile adjustments for past draws */
@media (max-width: 600px) {
    .lottery-ball-win {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .lottery-ticket-num {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }

    .lottery-user-ticket {
        flex-direction: column;
        align-items: flex-start;
    }

    .lottery-ticket-prize.winner {
        margin-top: 0.3rem;
    }
}
