:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --success: #10b981;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header */
header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.wallet-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.wallet-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    padding: 2.5rem 0 4rem;
}

/* Prize Display */
.prize-display {
    margin-bottom: 2.5rem;
}

.jackpot-card {
    background: var(--gradient);
    border-radius: 1.25rem;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.jackpot-card .label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.jackpot-card .amount {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.jackpot-card .sub-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.pool-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.pool-item:hover {
    background: var(--surface-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pool-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pool-value {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.125rem;
}

/* Game Tabs */
.game-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.tab-btn.active {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

/* Game Sections */
.game-section {
    display: none;
}

.game-section.active {
    display: block;
}

/* Draw Schedule */
.draw-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.schedule-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.75rem;
    text-align: center;
    transition: all 0.2s ease;
}

.schedule-card:hover {
    background: var(--surface-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.schedule-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.countdown {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin: 1rem 0;
    font-variant-numeric: tabular-nums;
}

.tickets-sold {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Ticket Builder */
.ticket-builder {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.ticket-builder h2 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.instruction {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.number-selection {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.main-numbers, .powerball-section {
    background: rgba(15, 23, 42, 0.5);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.label {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.powerball-grid {
    grid-template-columns: repeat(5, 1fr);
}

.number-btn {
    aspect-ratio: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.number-btn:hover {
    background: var(--surface-light);
    border-color: var(--primary);
    transform: scale(1.05);
}

.number-btn.selected {
    background: var(--gradient);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.selected-display {
    color: var(--text-muted);
    font-size: 0.875rem;
    min-height: 1.5rem;
    font-weight: 500;
}

/* Draw Selection */
.draw-selection {
    margin: 2rem 0;
}

.draw-selection label {
    display: block;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
}

.draw-selection select {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.draw-selection select:hover {
    border-color: var(--primary);
}

.draw-selection select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Pick3 */
.pick3-info {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.pick3-info h2 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.payout-info {
    color: var(--accent);
    font-weight: 600;
    margin-top: 1rem;
    font-size: 1rem;
}

.pick3-selection {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.digit-selector {
    text-align: center;
}

.digit-label {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.digit-selector select {
    width: 80px;
    height: 80px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.digit-selector select:hover {
    border-color: var(--primary);
    background: var(--surface-light);
}

.digit-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buy Button */
.buy-btn {
    width: 100%;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

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

/* History */
.history-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
}

.history-section h2 {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.history-type {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
}

.history-numbers {
    color: var(--text);
    font-weight: 600;
    font-size: 0.9375rem;
}

.history-winners {
    color: var(--success);
    font-weight: 700;
    text-align: right;
    font-size: 0.9375rem;
}

.no-history {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
}

/* Footer */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.disclaimer {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 1.25rem;
    }
    
    .number-selection {
        grid-template-columns: 1fr;
    }
    
    .number-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .jackpot-card .amount {
        font-size: 2.5rem;
    }
    
    .pick3-selection {
        gap: 1rem;
    }
    
    .digit-selector select {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.schedule-card, .pool-item, .history-item {
    animation: fadeIn 0.3s ease-out;
}
