/* ==========================================================================
   Thai Royal Lottery / Official GLO Portal - Custom Premium Theme Overhaul
   Makes the site look bespoke, luxurious, high-tech, and 100% original.
   ========================================================================== */

:root {
    --bg-dark: #08071a;
    --bg-card: #12102e;
    --bg-card-hover: #19163e;
    --gold-primary: #ffb606;
    --gold-secondary: #f39c12;
    --gold-gradient: linear-gradient(135deg, #ffd32a 0%, #f39c12 50%, #e67e22 100%);
    --neon-cyan: #00d2d3;
    --emerald-green: #2ecc71;
    --ruby-red: #ff4757;
    --text-white: #ffffff;
    --text-muted: #9592bd;
    --border-glow: rgba(255, 182, 6, 0.25);
    --border-card: 1px solid rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-muted);
    font-family: 'Nunito', 'Kanit', sans-serif;
    letter-spacing: 0.2px;
}

/* Luxury Header & Topbar */
.topbar-area {
    background: #060515 !important;
    border-bottom: 1px solid rgba(255, 182, 6, 0.15);
    padding: 8px 0;
}
.topbar-left ul li a, .topbar-right ul li a {
    color: #b5b3d6 !important;
    font-size: 13px;
    transition: all 0.2s ease;
}
.topbar-left ul li a:hover, .topbar-right ul li a:hover {
    color: var(--gold-primary) !important;
}

header.header-one {
    position: relative !important;
    z-index: 999999 !important;
}

.header-area,
#sticker {
    position: relative !important;
    z-index: 999999 !important;
    background: rgba(10, 9, 28, 0.98) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.header-area.stick {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999999 !important;
    background: rgba(8, 7, 26, 0.98) !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
}

/* Ensure page body / banners / breadcrumbs never overlap dropdowns */
.page-area,
.page-area .breadcrumb,
.page-area .section-headline,
.page-area .section-headline h2,
.intro-area {
    position: relative !important;
    z-index: 1 !important;
}

.main-menu ul.navbar-nav li a {
    color: #e2e1f5 !important;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 30px 14px;
    transition: all 0.3s ease;
}
.main-menu ul.navbar-nav li.active a,
.main-menu ul.navbar-nav li:hover > a {
    color: var(--gold-primary) !important;
}

/* Premium Dropdown Submenu - Solid, Never Overlapped, No Text Wrapping */
.main-menu ul.nav li ul.sub-menu,
.main-menu ul.navbar-nav li .sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: auto !important;
    min-width: 250px !important;
    background: #161436 !important;
    background-color: #161436 !important;
    border: 1px solid rgba(255, 182, 6, 0.35) !important;
    border-radius: 6px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85) !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    list-style: none !important;
    opacity: 0;
    visibility: hidden;
    z-index: 9999999 !important;
    transition: all 0.25s ease-in-out !important;
}

.main-menu ul.nav li:hover ul.sub-menu,
.main-menu ul.navbar-nav li:hover .sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    z-index: 9999999 !important;
    background: #161436 !important;
    background-color: #161436 !important;
}

.main-menu ul.nav li ul.sub-menu li,
.main-menu ul.navbar-nav li .sub-menu li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.main-menu ul.nav li ul.sub-menu li a,
.main-menu ul.navbar-nav li .sub-menu li a {
    display: block !important;
    width: 100% !important;
    white-space: nowrap !important;
    padding: 11px 22px !important;
    color: #e5e3f8 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    text-transform: capitalize !important;
    letter-spacing: 0.3px !important;
    line-height: 1.5 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
}

.main-menu ul.nav li ul.sub-menu li:last-child a,
.main-menu ul.navbar-nav li .sub-menu li:last-child a {
    border-bottom: none !important;
}

.main-menu ul.nav li ul.sub-menu li a:hover,
.main-menu ul.navbar-nav li .sub-menu li a:hover {
    color: #ffb606 !important;
    background: rgba(255, 182, 6, 0.12) !important;
    padding-left: 26px !important;
}

/* Live Badge Pulsing Animation */
.live-badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid var(--ruby-red);
    color: var(--ruby-red);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.live-pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--ruby-red);
    border-radius: 50%;
    animation: livePulse 1.4s infinite;
}
@keyframes livePulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 71, 87, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

/* 3D Golden Lottery Balls */
.ball-3d-gold {
    width: 52px;
    height: 52px;
    background: radial-gradient(circle at 35% 35%, #fff5c0 0%, #ffb606 45%, #b77900 85%, #684100 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1a1400;
    font-size: 24px;
    font-weight: 900;
    font-family: 'Arial Black', Impact, sans-serif;
    box-shadow: inset -2px -3px 6px rgba(0,0,0,0.4), inset 2px 2px 5px rgba(255,255,255,0.8), 0 8px 18px rgba(0,0,0,0.6);
    margin: 0 4px;
    transition: transform 0.2s ease;
}
.ball-3d-gold:hover {
    transform: translateY(-4px) scale(1.08);
}

.ball-3d-cyan {
    width: 48px;
    height: 48px;
    background: radial-gradient(circle at 35% 35%, #c7ffff 0%, #00d2d3 50%, #018f90 85%, #004a4b 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #032323;
    font-size: 22px;
    font-weight: 900;
    font-family: 'Arial Black', Impact, sans-serif;
    box-shadow: inset -2px -3px 6px rgba(0,0,0,0.4), inset 2px 2px 5px rgba(255,255,255,0.8), 0 8px 18px rgba(0,0,0,0.6);
    margin: 0 4px;
}

.ball-3d-green {
    width: 48px;
    height: 48px;
    background: radial-gradient(circle at 35% 35%, #d4edda 0%, #2ecc71 50%, #27ae60 85%, #145a32 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0d381e;
    font-size: 22px;
    font-weight: 900;
    font-family: 'Arial Black', Impact, sans-serif;
    box-shadow: inset -2px -3px 6px rgba(0,0,0,0.4), inset 2px 2px 5px rgba(255,255,255,0.8), 0 8px 18px rgba(0,0,0,0.6);
    margin: 0 4px;
    transition: transform 0.2s ease;
}
.ball-3d-green:hover { transform: translateY(-4px) scale(1.08); }

.ball-3d-purple {
    width: 48px;
    height: 48px;
    background: radial-gradient(circle at 35% 35%, #f3d9fa 0%, #be4bdb 50%, #8e44ad 85%, #4a154b 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2b0938;
    font-size: 22px;
    font-weight: 900;
    font-family: 'Arial Black', Impact, sans-serif;
    box-shadow: inset -2px -3px 6px rgba(0,0,0,0.4), inset 2px 2px 5px rgba(255,255,255,0.8), 0 8px 18px rgba(0,0,0,0.6);
    margin: 0 4px;
    transition: transform 0.2s ease;
}
.ball-3d-purple:hover { transform: translateY(-4px) scale(1.08); }

/* Landing Page Winners Showcase Table */
.landing-winners-box {
    background: #110f2c;
    border: 1px solid rgba(255, 182, 6, 0.25);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.5);
    margin-top: 20px;
}
.landing-winners-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #e2e8f0;
}
.landing-winners-table th {
    background: #09081a;
    color: #ffd32a;
    padding: 12px 14px;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 182, 6, 0.3);
}
.landing-winners-table td {
    padding: 14px;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}
.landing-winners-table tr:hover td {
    background: rgba(255, 182, 6, 0.05);
}
.winner-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 12px;
}
.winner-rank-1 { background: #ffd700; color: #1a1400; box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4); }
.winner-rank-2 { background: #e0e0e0; color: #222; }
.winner-rank-3 { background: #cd7f32; color: #fff; }
.winner-rank-other { background: #231f47; color: #aaa; }


/* Digital LED Display Numbers */
.digital-led-badge {
    font-family: 'digital-7', 'Courier New', monospace;
    font-size: 28px;
    background: #070716;
    border: 1px solid rgba(255, 182, 6, 0.4);
    color: #ffd32a;
    padding: 4px 14px;
    border-radius: 6px;
    text-shadow: 0 0 10px rgba(255, 211, 42, 0.6);
    letter-spacing: 3px;
    display: inline-block;
}

/* Modern Card Styling */
.home-result {
    background: #110f2c !important;
    border: 1px solid rgba(255, 182, 6, 0.2) !important;
    border-radius: 14px !important;
    padding: 30px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.home-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}
.home-result:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 182, 6, 0.4) !important;
}

/* Live Countdown Box */
.remain-time {
    background: rgba(7, 6, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}
.remain-time ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.remain-time ul li {
    font-family: 'digital-7', monospace;
    font-size: 26px;
    color: #00d2d3;
    background: #050414;
    border: 1px solid #1a1740;
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 44px;
    text-align: center;
    text-shadow: 0 0 8px rgba(0, 210, 211, 0.6);
}
.remain-time ul span {
    font-size: 13px;
    font-weight: 700;
    color: #ffb606;
}

/* Interactive Widget Containers */
.interactive-tool-box {
    background: #121032;
    border: 1px solid rgba(255, 182, 6, 0.25);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}
.interactive-tool-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d2d3, #ffb606, #2ecc71);
    border-radius: 12px 12px 0 0;
}

.btn-gold-action {
    background: var(--gold-gradient);
    color: #0c0b1e !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 182, 6, 0.35);
}
.btn-gold-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 6, 0.5);
    color: #000 !important;
}

.btn-cyan-action {
    background: linear-gradient(135deg, #00d2d3, #10ac84);
    color: #0c0b1e !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 210, 211, 0.35);
}
.btn-cyan-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 211, 0.5);
    color: #fff !important;
}

/* Feature & Service Boxes */
.services-single {
    background: #110f2c !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 30px 20px;
    transition: all 0.3s ease;
}
.services-single:hover {
    border-color: rgba(255, 182, 6, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

/* Payment & Brand Section */
.brand-area {
    background: #09081e !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Footer Overhaul */
.footer-1 {
    background: #060515 !important;
    border-top: 1px solid rgba(255, 182, 6, 0.15);
}
.footer-area-bottom {
    background: #04030e !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive Overrides */
@media (max-width: 767px) {
    .ball-3d-gold {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0 2px;
    }
    .digital-led-badge {
        font-size: 22px;
        padding: 2px 8px;
    }
}
