/* ============================================================
   SKLotto.com — Unified Styles Bundle v3.0 (Mobile-First)
   ============================================================ */

/* --- CSS Variables / Theme --- */
:root {
    --primary: #FD2109;
    --primary-dark: #c0392b;
    --gold: #FFD700;
    --bg-dark: #111;
    --bg-darker: #000;
    --bg-card: #1a1a2e;
    --text-primary: #fff;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: #666;
    --shadow: 0 2px 10px rgba(0,0,0,0.2);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.6);
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --font-body: 'Roboto', sans-serif;
    --font-display: 'Orbitron', sans-serif;
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --bg-dark: #f8f9fa;
    --bg-darker: #fff;
    --bg-card: #fff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg-darker);
    color: var(--text-primary);
    padding-top: 62px;
    transition: background-color 0.3s, color 0.3s;
}

a { text-decoration: none; }
img { max-width: 100%; height: auto; vertical-align: middle; }

/* --- Header / Nav (slimmer) --- */
header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1050;
    background: var(--primary) !important;
    box-shadow: var(--shadow);
}

.navbar { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.navbar-brand img { height: 36px; width: 36px; }
.navbar-toggler { border: none; padding: 0.25rem; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon { width: 1.3em; height: 1.3em; }

.nav-link {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem !important;
    letter-spacing: 0.5px;
}
.nav-link.active {
    font-weight: 700;
    color: #fff !important;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
.navbar-nav { gap: 0.25rem !important; }

/* --- Theme Toggle (smaller) --- */
.theme-toggle {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    padding: 0; line-height: 1;
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}
/* Theme toggle smooth theme transition */
#theme-toggle-btn {
    transition: var(--transition);
}
#theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* --- A2HS Button --- */
#a2hs-btn {
    position: fixed; bottom: 16px; right: 16px;
    z-index: 9999; display: none;
}

/* --- Prize Boxes (more compact) --- */
.prize-box {
    transition: var(--transition);
    min-height: 120px;
    border-radius: var(--radius-lg) !important;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.8rem;
}
.prize-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg) !important;
}

.prize-number {
    font-size: clamp(1.5rem, 5vw, 2.6rem);
    font-weight: 900;
    letter-spacing: clamp(2px, 1vw, 6px);
    font-family: var(--font-display);
    line-height: 1;
    margin-top: auto;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    white-space: nowrap;
}

.prize-box .small {
    font-size: 0.75rem !important;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    margin-bottom: 4px;
}

/* --- Ribbon (sleeker) --- */
.ribbon {
    position: absolute;
    left: -4px; top: -4px;
    z-index: 10;
    overflow: hidden;
    width: 70px; height: 70px;
}
.ribbon span {
    font-size: 10px;
    font-weight: bold;
    color: #FFF;
    text-transform: uppercase;
    text-align: center;
    line-height: 20px;
    transform: rotate(-45deg);
    width: 100px;
    display: block;
    background: #c0392b;
    box-shadow: 0 3px 10px -5px rgba(0,0,0,0.8);
    position: absolute;
    top: 18px; left: -21px;
}
.ribbon span::before,
.ribbon span::after {
    content: '';
    position: absolute; top: 100%; z-index: -1;
    border: 3px solid #8f1d14;
}
.ribbon span::before { left: 0; border-left-color: transparent; border-bottom-color: transparent; }
.ribbon span::after { right: 0; border-right-color: transparent; border-bottom-color: transparent; }

/* --- Special / Consolation Boxes (smaller) --- */
.special-grid .col > div,
.consolation-grid .col > div {
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-display);
    letter-spacing: 2px;
    transition: var(--transition);
}

/* --- Card --- */
.card { border-radius: var(--radius-lg) !important; }

/* --- Live Pulse --- */
.live-pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Shine Animation --- */
@keyframes shine {
    0% { transform: translateX(-100%); }
    20% { transform: translateX(200%); }
    100% { transform: translateX(200%); }
}

/* --- Number Reveal --- */
@keyframes revealNumber {
    0% { transform: scale(0.3) rotateY(90deg); opacity: 0; }
    50% { transform: scale(1.2) rotateY(0deg); opacity: 0.8; }
    70% { transform: scale(0.95); }
    100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

/* --- Lucky Number --- */
.text-gold { color: var(--gold); }

/* --- Cookie Consent (slimmer) --- */
.cookie-consent {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.95);
    color: #fff;
    padding: 0.75rem 1rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    border-top: 3px solid var(--gold);
}
.cookie-consent.show { display: flex; }
.cookie-consent p {
    margin: 0;
    font-size: 0.8rem;
    flex: 1;
    min-width: 180px;
}
.cookie-consent .btn-accept,
.cookie-consent .btn-decline {
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.cookie-consent .btn-accept {
    background: var(--gold);
    color: #000;
}
.cookie-consent .btn-accept:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,215,0,0.4);
}
.cookie-consent .btn-decline {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
}
.cookie-consent .btn-decline:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.cookie-consent .btn-more {
    color: rgba(255,255,255,0.7);
    text-decoration: underline;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ============================================================
   MOBILE-FIRST RESPONSIVE — optimized breakpoints
   ============================================================ */

/* Small phones */
@media (max-width: 575px) {
    body { padding-top: 56px; }
    .navbar-brand img { height: 30px; width: 30px; }
    .nav-link { font-size: 0.75rem; padding: 0.3rem 0.5rem !important; }
    .theme-toggle { width: 30px; height: 30px; font-size: 0.85rem; }

    .display-5 { font-size: 1.6rem !important; letter-spacing: 2px !important; }
    .lead { font-size: 0.85rem !important; }

    .prize-number { font-size: 1.5rem !important; letter-spacing: 2px !important; }
    .prize-box { min-height: 90px; padding: 0.6rem; border-radius: 0.75rem !important; }
    .prize-box .small { font-size: 0.65rem !important; }

    .ribbon { width: 56px; height: 56px; }
    .ribbon span { font-size: 8px; line-height: 16px; width: 80px; top: 14px; left: -18px; }

    .special-grid .col > div,
    .consolation-grid .col > div { font-size: 0.85rem; padding: 0.4rem 0.15rem; letter-spacing: 1px; }

    .card-body { padding: 1rem !important; }
    .card-header { padding: 0.75rem 1rem !important; }
    .card-header h2.h4 { font-size: 1rem !important; }

    /* Hero section compact */
    section.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
    section.py-5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }

    hr.my-5 { margin: 1.5rem 0 !important; }
    h4.mb-4 { font-size: 1rem !important; margin-bottom: 0.75rem !important; }
    .g-3 { --bs-gutter-y: 0.5rem !important; --bs-gutter-x: 0.5rem !important; }
    .mb-5 { margin-bottom: 1.5rem !important; }

    /* Sidebar compact */
    .sidebar-card .card-body { padding: 0.75rem !important; }
    .sidebar-card .list-group-item { padding: 0.5rem 0.75rem !important; font-size: 0.85rem; }

    /* Won page */
    .btn-lg { font-size: 0.9rem !important; padding: 0.5rem 1.5rem !important; }

    /* Footer */
    #footer_part { padding: 1.5rem 0 !important; }
    #footer_part h3.h4 { font-size: 1rem !important; }
    #copyright_part { padding: 0.75rem 0 !important; font-size: 0.8rem; }

    /* Live badge */
    .live-pulse { font-size: 0.85rem !important; padding: 0.4rem 1.2rem !important; }
    .badge.fs-6 { font-size: 0.75rem !important; }
}

/* Tablets */
@media (min-width: 576px) and (max-width: 767px) {
    body { padding-top: 58px; }
    .display-5 { font-size: 2rem !important; }
    .prize-number { font-size: 1.8rem !important; letter-spacing: 3px !important; }
    .prize-box { min-height: 100px; padding: 0.7rem; }
    section.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .card-body { padding: 1.25rem !important; }
}

/* All mobile (<768px) shared: special grid */
@media (max-width: 767px) {
    .special-grid .row-cols-3 .col > div { font-size: 0.9rem; }
    .consolation-grid .row-cols-2 .col > div { font-size: 0.9rem; }
    .g-3 { --bs-gutter-y: 0.5rem; --bs-gutter-x: 0.5rem; }
}

/* Desktop refinements */
@media (min-width: 992px) {
    .prize-number { font-size: 2.6rem; letter-spacing: 6px; }
    .prize-box { min-height: 140px; padding: 1.2rem; }
    .prize-box:hover {
        transform: translateY(-8px) scale(1.04);
    }
}

/* --- Print --- */
@media print {
    header, footer, #a2hs-btn, .cookie-consent { display: none !important; }
    body { padding-top: 0 !important; }
}
