/* ============================================================
   EG63 4D — Sky-blue theme (derived from assets/img/logo.png)
   Logo colour sampled at #00B4F8
   ============================================================ */
:root {
    --brand:         #00b4f8;   /* logo blue — accents, gradients, balls   */
    --brand-light:   #4ed0ff;   /* highlights                              */
    --brand-dark:    #0083c4;   /* surfaces that carry white text          */
    --brand-text:    #0070a8;   /* blue text on white (AA contrast)        */
    --brand-darker:  #05426b;   /* topbar, footer, deep surfaces           */
    --brand-deepest: #03263f;   /* footer bottom                           */
    --gold:          #f5b301;   /* lucky accent — pairs with the blue      */
    --gold-dark:     #d99a00;
    --ink:           #0f2233;
    --muted:         #5f7383;
    --paper:         #fff;
    --bg:            #f3f9fd;
    --line:          #d9eaf3;
    --radius:        14px;
    --shadow:        0 6px 24px rgba(5, 66, 107, .12);
}

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

body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

img { max-width: 100%; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--brand-darker);
    color: #cfe9f7;
    font-size: .8rem;
    padding: 6px 0;
}
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar strong { color: var(--gold); }

/* ---------- Header / nav ---------- */
.site-header {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 40%, var(--brand-darker) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 3px 14px rgba(5, 66, 107, .35);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: #fff;          /* white disc so the blue logo pops on the blue header */
    padding: 3px;
    object-fit: contain;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.5rem; font-weight: 900; letter-spacing: .5px; }
.brand-name em { font-style: italic; color: var(--gold); }
.brand-tag { font-size: .68rem; opacity: .85; letter-spacing: .4px; }

.main-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
    padding: 9px 14px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    transition: background .2s;
}
.main-nav a:hover { background: rgba(255, 255, 255, .15); }
.main-nav a.active { background: var(--gold); color: var(--brand-darker); }

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    display: block;
    width: 26px; height: 3px;
    background: #fff;
    margin: 5px 0;
    border-radius: 2px;
    transition: .25s;
}

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(245, 179, 1, .22), transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(78, 208, 255, .25), transparent 45%),
        linear-gradient(135deg, var(--brand-darker) 0%, var(--brand-dark) 55%, var(--brand) 100%);
    color: #fff;
    padding: 64px 0 84px;
    position: relative;
    overflow: hidden;
}
/* Faint logo watermark */
.hero::before {
    content: "";
    position: absolute;
    right: -120px;
    top: 50%;
    width: 520px; height: 520px;
    transform: translateY(-50%);
    background: url("../img/logo.png") center / contain no-repeat;
    opacity: .08;
    filter: brightness(0) invert(1);
    pointer-events: none;
}
.hero-inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; position: relative; }
.hero-copy { flex: 1 1 420px; }
.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 14px;
}
.hero h1 .gold { color: var(--gold); }
.hero p.lead { font-size: 1.05rem; opacity: .92; margin-bottom: 26px; max-width: 540px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.btn-gold { background: linear-gradient(180deg, var(--gold), var(--gold-dark)); color: var(--brand-darker); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .7); }
.btn-primary { background: linear-gradient(180deg, var(--brand), var(--brand-dark)); color: #fff; }

/* Jackpot ticker card in hero */
.hero-jackpot {
    flex: 0 1 400px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    border-radius: var(--radius);
    padding: 26px;
    text-align: center;
}
.hero-jackpot h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: 2px; color: var(--gold); }
.jackpot-amount {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    margin: 4px 0 14px;
}
.hero-jackpot .divider { border-top: 1px dashed rgba(255,255,255,.35); margin: 14px 0; }
.countdown-label { font-size: .78rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: .85; }
.countdown { display: flex; justify-content: center; gap: 10px; margin-top: 8px; }
.countdown .cd-box {
    background: rgba(0, 0, 0, .3);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 64px;
}
.countdown .cd-num { font-size: 1.5rem; font-weight: 800; display: block; line-height: 1.1; }
.countdown .cd-unit { font-size: .65rem; text-transform: uppercase; letter-spacing: 1px; opacity: .8; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--paper); }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.section-head h2 span { color: var(--brand-text); }
.section-head p { color: var(--muted); max-width: 620px; margin: 8px auto 0; }

/* ---------- Result cards ---------- */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 26px;
}
.results-grid-single {
    /* 520px gives the 3-across top-prizes row (4 balls x 3 boxes) enough
       room so it never overflows the card's padding/border. */
    grid-template-columns: minmax(330px, 520px);
    justify-content: center;
}

/* ---------- Confetti burst (Latest Draw Results) ---------- */
.results-section {
    position: relative;
    overflow: hidden;
}
.results-section .container {
    position: relative;
    z-index: 1;
}
.confetti-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.confetti-piece {
    position: absolute;
    left: var(--x, 50%);
    width: var(--w, 8px);
    height: var(--h, 14px);
    background: var(--c, var(--brand));
    border-radius: 2px;
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
    animation: confetti-blast var(--duration, 6s) ease-out var(--delay, 0s) infinite;
    will-change: transform, opacity;
}
.confetti-piece.dot { border-radius: 50%; }
.confetti-piece.from-top { top: -30px; }
.confetti-piece.from-bottom { bottom: -30px; }

@keyframes confetti-blast {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
    10%  { opacity: .9; }
    60%  { opacity: .8; }
    100% { transform: translate3d(var(--dx, 40px), var(--dy, 420px), 0) rotate(var(--rot, 540deg)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .confetti-piece { animation: none; opacity: 0; }
}
.result-card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--line);
}
.result-card-head {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-darker) 100%);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.result-card-head .draw-label { font-weight: 800; font-size: 1.02rem; }
.result-card-head .draw-meta { font-size: .74rem; opacity: .9; text-align: right; line-height: 1.4; }
.result-card-body { padding: 18px; }

.top-prizes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.prize-box {
    min-width: 0; /* let the grid track shrink instead of forcing overflow */
    text-align: center;
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 10px 6px 12px;
    background: #f7fcff;
}
.prize-box.first { border-color: var(--gold); background: linear-gradient(180deg, #fff8e0, #fff3c8); }
.prize-box .prize-rank {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-text);
}
.prize-balls { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.ball {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, var(--brand-light), var(--brand-dark) 72%);
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,.25), 0 2px 4px rgba(5,66,107,.3);
}
.prize-box.first .ball { background: radial-gradient(circle at 32% 28%, #ffd34d, var(--gold-dark) 72%); color: var(--brand-darker); }

.numbers-title {
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--brand-text);
    border-bottom: 2px solid var(--line);
    padding-bottom: 5px;
    margin: 14px 0 10px;
    display: flex;
    justify-content: space-between;
}
.numbers-title small { color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; }
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
}
.num-chip {
    text-align: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px 2px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.num-chip small { display: block; font-size: .6rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }

.mini-results { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.mini-box {
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: .85rem;
    background: #f8fcff;
}
.mini-box b { color: var(--brand-text); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; display: block; }
.mini-box span { font-weight: 700; letter-spacing: 2px; }

.bonus-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.jackpot-strip {
    flex: 1 1 200px;
    background: linear-gradient(135deg, var(--brand-darker), var(--brand-dark));
    border-radius: 10px;
    color: #fff;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .85rem;
}
.jackpot-strip b { color: var(--gold); }

/* ---------- Lucky Jackpot tile ---------- */
.lucky-jackpot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--gold);
    border-radius: 10px;
    background: linear-gradient(180deg, #fffdf5, #fff3c8);
    padding: 6px 14px;
}
.lucky-jackpot .lucky-label {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--brand-text);
}
.lucky-jackpot .lucky-tile {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(180deg, #f0303a, #b3101c);
    border: 2px solid #ffe6a8;
    color: #fff;
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .25);
}

.pending {
    text-align: center;
    padding: 40px 16px;
    color: var(--muted);
}
.pending .pending-time { font-size: 1.4rem; font-weight: 800; color: var(--brand-text); }

/* ---------- Feature cards ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--paper);
    border-radius: var(--radius);
    border-top: 4px solid var(--brand);
    box-shadow: var(--shadow);
    padding: 28px 22px;
    text-align: center;
}
.feature-card .icon { font-size: 2.2rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .9rem; }

/* ---------- Game cards ---------- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}
.game-card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}
.game-card-top {
    background: linear-gradient(135deg, var(--brand), var(--brand-darker));
    color: #fff;
    text-align: center;
    padding: 22px 14px;
}
.game-card-top .game-name { font-size: 2rem; font-weight: 900; font-style: italic; }
.game-card-top .game-sub { font-size: .8rem; opacity: .9; }
.game-card-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.game-card-body p { color: var(--muted); font-size: .88rem; flex: 1; }
.game-card-body .btn { align-self: flex-start; padding: 9px 20px; font-size: .84rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.prize-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: .92rem;
}
.prize-table th {
    background: var(--brand-dark);
    color: #fff;
    padding: 11px 14px;
    text-align: left;
    font-weight: 700;
}
.prize-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.prize-table tr:nth-child(even) td { background: #f4fafd; }
.prize-table td.money { font-weight: 800; color: var(--brand-text); white-space: nowrap; }

/* ---------- Forms ---------- */
.form-card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    padding: 30px;
    max-width: 640px;
    margin: 0 auto;
}
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
}
input.big-number {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 10px;
    text-align: center;
}

/* Honeypot field — invisible to humans, tempting to bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

.alert {
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
    font-weight: 600;
}
.alert-win  { background: #fff6d8; border: 2px solid var(--gold); color: #7a5a00; }
.alert-lose { background: #eaf6fc; border: 2px solid #a9dcf3; color: var(--brand-darker); }
.alert-ok   { background: #e9f7ee; border: 2px solid #a8dcb9; color: #1e6b3a; }
.alert h3 { margin-bottom: 4px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--brand-darker), var(--brand-dark) 60%, var(--brand));
    color: #fff;
    text-align: center;
    padding: 44px 0;
}
.page-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 900; }
.page-hero p { opacity: .9; max-width: 640px; margin: 6px auto 0; }

/* ---------- Content blocks (jackpot/about) ---------- */
.content-card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    padding: 30px;
    margin-bottom: 26px;
}
.content-card h2 { color: var(--brand-text); margin-bottom: 12px; font-size: 1.35rem; }
.content-card h3 { margin: 18px 0 8px; font-size: 1.05rem; }
.content-card p, .content-card li { color: #3a4c5a; font-size: .95rem; }
.content-card ul, .content-card ol { padding-left: 22px; margin: 8px 0; }
.content-card li { margin-bottom: 6px; }

.bonus-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 16px; }
.bonus-tier {
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}
.bonus-tier.hot { border-color: var(--gold); background: #fffbea; }
.bonus-tier .tier-name { font-weight: 800; color: var(--brand-text); text-transform: uppercase; font-size: .8rem; letter-spacing: 1px; }
.bonus-tier .tier-amount { font-size: 1.35rem; font-weight: 900; margin: 6px 0; }
.bonus-tier p { font-size: .8rem; color: var(--muted); }

/* ---------- Date picker bar ---------- */
.filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.filter-bar form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.filter-bar input[type="date"] {
    padding: 10px 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: .95rem;
    background: var(--paper);
}
.filter-bar .nav-day {
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 700;
    color: var(--brand-text);
}
.filter-bar .nav-day:hover { border-color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(180deg, var(--brand-darker), var(--brand-deepest));
    color: #c6dcea;
    margin-top: 56px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    gap: 32px;
    padding: 46px 20px 34px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 900; color: #fff; margin-bottom: 10px; }
.footer-brand em { color: var(--gold); }
.footer-logo {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
    object-fit: contain;
}
.footer-col h4 {
    color: #fff;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.footer-col a { display: block; padding: 4px 0; font-size: .88rem; color: #c6dcea; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { font-size: .85rem; }
.footer-note { font-size: .75rem; opacity: .75; margin-top: 10px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 14px 0; font-size: .78rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--brand-darker);
        flex-direction: column;
        padding: 10px 16px 16px;
        box-shadow: 0 12px 20px rgba(0, 0, 0, .3);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 14px; }
    .hero { padding: 44px 0 60px; }
    .hero::before { width: 360px; height: 360px; right: -140px; opacity: .06; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .top-prizes { grid-template-columns: 1fr; }
    .prize-balls .ball { width: 34px; height: 34px; }
    .topbar-right { display: none; }
}
