:root {
    --gold:    #F5C518;
    --gold-lt: #FFE066;
    --red:     #E63946;
    --red-dk:  #9B1B24;
    --navy:    #0D1B2A;
    --navy-lt: #1B2D45;
    --slate:   #243447;
    --silver:  #B8C5D6;
    --white:   #F0F4F8;
    --pb-blue: #003087;
    --pb-red:  #CC0000;
    --mm-gold: #F5A623;
    --mm-blue: #00539C;
}
* { box-sizing: border-box; }
body {
    font-family: 'Barlow', sans-serif;
    background: var(--navy);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}
/* ---- HERO ---- */
.hero {
    background: linear-gradient(135deg, #0D1B2A 0%, #1B2D45 40%, #0D1B2A 100%);
    border-bottom: 3px solid var(--gold);
    padding: 2rem 0 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(245,197,24,.07) 0%, transparent 60%);
    pointer-events: none;
}
.hero-balls {
    display: flex; gap: .5rem; flex-wrap: wrap;
    position: absolute; right: -10px; top: 10px; opacity: .06;
}
.hero-ball {
    width: 80px; height: 80px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff 0%, var(--gold) 60%);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; color: var(--navy);
}
.app-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    letter-spacing: 3px;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(245,197,24,.3);
    line-height: 1;
}
.app-subtitle { color: var(--silver); font-weight: 300; letter-spacing: 1px; }
/* ---- JACKPOT CARDS ---- */
.jackpot-cards { gap: 1rem; }
.jackpot-card {
    flex: 1; min-width: 220px;
    background: var(--navy-lt);
    border-radius: 12px;
    border: 2px solid transparent;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    overflow: hidden;
}
.jackpot-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(245,197,24,.05) 0%, transparent 60%);
}
.jackpot-card:hover { transform: translateY(-3px); border-color: rgba(245,197,24,.4); }
.jackpot-card.selected-pb { border-color: var(--pb-red); background: linear-gradient(135deg,#1a0a0a,var(--navy-lt)); }
.jackpot-card.selected-mm { border-color: var(--mm-gold); background: linear-gradient(135deg,#1a1200,var(--navy-lt)); }
.jackpot-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem; letter-spacing: 2px;
}
.jackpot-badge-pb { color: var(--pb-red); }
.jackpot-badge-mm { color: var(--mm-gold); }
.jackpot-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--gold);
    line-height: 1;
}
.jackpot-cash { color: var(--silver); font-size: .85rem; }
.jackpot-next { color: var(--silver); font-size: .75rem; margin-top: .25rem; }
.jackpot-radio { position: absolute; top: 12px; right: 12px; }
/* ---- FORM SECTION ---- */
.calc-section {
    background: var(--slate);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(184,197,214,.12);
}
.section-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem; letter-spacing: 2px;
    color: var(--gold); margin-bottom: 1rem;
    display: flex; align-items: center; gap: .5rem;
}
.section-heading i { font-size: 1.1rem; }
.form-label { color: var(--silver); font-size: .85rem; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; }
.form-control, .form-select {
    background: var(--navy-lt) !important;
    border: 1px solid rgba(184,197,214,.2) !important;
    color: var(--white) !important;
    border-radius: 8px;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(245,197,24,.15) !important;
    outline: none;
}
.form-control option, .form-select option { background: var(--navy-lt); color: var(--white); }
.input-group-text {
    background: rgba(245,197,24,.15) !important;
    border-color: rgba(184,197,214,.2) !important;
    color: var(--gold) !important;
    font-weight: 600;
}
/* ---- ADVISOR TOGGLE ---- */
.advisor-toggle { display: flex; border-radius: 8px; overflow: hidden; border: 1px solid rgba(184,197,214,.2); }
.advisor-btn {
    flex: 1; padding: .5rem; text-align: center; cursor: pointer;
    background: var(--navy-lt); color: var(--silver);
    transition: all .2s; font-size: .85rem; font-weight: 500;
    white-space: nowrap;
}
.advisor-btn.active { background: var(--gold); color: var(--navy); }
/* ---- SUBMIT BUTTON ---- */
.btn-calculate {
    background: linear-gradient(135deg, var(--gold) 0%, #d4a017 100%);
    color: var(--navy);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem; letter-spacing: 3px;
    border: none; border-radius: 10px;
    padding: .75rem 2.5rem;
    transition: all .2s;
    box-shadow: 0 4px 20px rgba(245,197,24,.25);
}
.btn-calculate:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245,197,24,.4); background: linear-gradient(135deg, var(--gold-lt) 0%, var(--gold) 100%); color: var(--navy); }
/* ---- RESULTS ---- */
.results-card {
    background: linear-gradient(160deg, var(--slate) 0%, var(--navy-lt) 100%);
    border-radius: 16px;
    border: 1px solid rgba(245,197,24,.25);
    overflow: hidden;
}
.results-header {
    background: linear-gradient(90deg, rgba(245,197,24,.15) 0%, transparent 100%);
    border-bottom: 1px solid rgba(245,197,24,.2);
    padding: 1.25rem 1.75rem;
}
.results-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem; letter-spacing: 2px; color: var(--gold);
}
.result-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .7rem 1.75rem;
    border-bottom: 1px solid rgba(184,197,214,.06);
    transition: background .15s;
}
.result-row:hover { background: rgba(255,255,255,.03); }
.result-label { color: var(--silver); font-size: .9rem; }
.result-value { font-weight: 600; font-size: .95rem; }
.result-value.deduct { color: #FF8A80; }
.result-value.positive { color: #69F0AE; }
.result-value.gold { color: var(--gold); }
.result-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245,197,24,.3), transparent);
    margin: .25rem 1.75rem;
}
.takehome-box {
    background: linear-gradient(135deg, rgba(245,197,24,.12) 0%, rgba(245,197,24,.04) 100%);
    border-top: 2px solid var(--gold);
    padding: 1.5rem 1.75rem;
}
.takehome-label { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; letter-spacing: 2px; color: var(--silver); }
.takehome-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 20px rgba(245,197,24,.3);
}
/* ---- TAX BREAKDOWN BAR ---- */
.tax-bar-container { padding: 1.25rem 1.75rem; border-bottom: 1px solid rgba(184,197,214,.06); }
.tax-bar {
    height: 18px; border-radius: 9px; overflow: hidden;
    display: flex; background: rgba(255,255,255,.05);
}
.tax-bar-segment { height: 100%; transition: width .5s ease; }
.tax-bar-segment.federal { background: linear-gradient(90deg, #E63946, #c92d39); }
.tax-bar-segment.state   { background: linear-gradient(90deg, #4361EE, #3a52d4); }
.tax-bar-segment.local   { background: linear-gradient(90deg, #7B2D8B, #6a2579); }
.tax-bar-segment.advisor { background: linear-gradient(90deg, #F77F00, #d96e00); }
.tax-bar-segment.takehome { background: linear-gradient(90deg, #2DC653, #27b349); }
.tax-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .6rem; }
.tax-legend-item { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--silver); }
.tax-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
/* ---- DISCLAIMER ---- */
.disclaimer {
    background: rgba(245,197,24,.05);
    border: 1px solid rgba(245,197,24,.15);
    border-radius: 8px; padding: .75rem 1rem;
    font-size: .75rem; color: var(--silver); line-height: 1.5;
}
/* ---- NUMBERS TABLE ---- */
.numbers-section {
    background: var(--slate);
    border-radius: 16px; padding: 1.5rem;
    border: 1px solid rgba(184,197,214,.1);
}
.lottery-ball {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    font-weight: 700; font-size: .9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.ball-pb    { background: radial-gradient(circle at 35% 35%, #ffffff 0%, #c0c0c0 100%); color: #1a1a1a; }
.ball-pb-sp { background: radial-gradient(circle at 35% 35%, #fff 0%, #CC0000 100%); color: #000; border: 2px solid #ff6b6b; }
.ball-mm    { background: radial-gradient(circle at 35% 35%, #fff8e1 0%, #F5A623 100%); color: #5a3800; }
.ball-mm-mb { background: radial-gradient(circle at 35% 35%, #cce8ff 0%, #003087 100%); color: #000; }
/* ---- SCROLL ANIMATION ---- */
@keyframes fadeUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
.fade-up { animation: fadeUp .5s ease forwards; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
/* ---- BADGES ---- */
.badge-exempt { background: rgba(45,198,83,.15); color: #2DC653; border: 1px solid rgba(45,198,83,.3); font-size: .7rem; padding: .2rem .5rem; border-radius: 4px; }
/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .jackpot-cards { flex-direction: column; }
    .result-row { flex-direction: column; align-items: flex-start; gap: .2rem; }
}
/* ---- NAVBAR ---- */
.top-bar {
    background: rgba(0,0,0,.3);
    border-bottom: 1px solid rgba(184,197,214,.1);
    padding: .5rem 0;
}
.top-bar-text { font-size: .75rem; color: var(--silver); letter-spacing: .5px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2DC653; display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* Custom file info */
.db-info-card {
    background: var(--navy-lt);
    border: 1px solid rgba(184,197,214,.12);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.db-badge {
    background: rgba(67,97,238,.15); color: #7c9dff;
    border: 1px solid rgba(67,97,238,.25);
    border-radius: 5px; padding: .15rem .5rem; font-size: .7rem;
}
pre.sql-snippet {
    background: #060d17; border-radius: 8px; padding: 1rem;
    font-size: .72rem; color: #7c9dff; overflow-x: auto;
    border: 1px solid rgba(67,97,238,.2);
}
pre.sql-snippet .kw { color: #F5C518; }
pre.sql-snippet .cm { color: #4a6080; }