/* =================================================================
   BASE, RESET & VARIABLES
   ================================================================= */
:root {
    --bg-body: #f0f2f5; 
    --bg-app: rgba(255, 255, 255, 0.95); 
    
    --text-main: #2d3748;
    --text-muted: #718096;
    
    /* Primary Colors */
    --color-blue: #1877f2;
    --color-pink: #d8459e;
    --color-yellow: #f5b120;
    --color-green: #28a745;
    --color-orange: #fd7e14;
    --color-purple: #6f42c1;
    --color-cyan: #17a2b8;
    --color-magenta: #e83e8c;

    /* Soft Background Colors */
    --soft-blue: #eef5ff;
    --soft-pink: #fdf0f5;
    --soft-yellow: #fff9ea;
    --soft-green: #eef9f0;
    --soft-orange: #fff2e8;
    --soft-purple: #f3eef9;
    --soft-cyan: #e8f8f9;
    --soft-magenta: #fceaf2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

a { text-decoration: none; }

/* =================================================================
   PARTICLES BACKGROUND
   ================================================================= */
canvas#particles-bg {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1; 
    background-color: #f4f7fb;
    pointer-events: none;
}

/* =================================================================
   SIDEBAR & OVERLAY 
   ================================================================= */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 1001;
    opacity: 0; visibility: hidden; backdrop-filter: blur(3px);
    transition: 0.3s ease;
}
.overlay.active { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed; top: 0; left: 0; width: 280px; height: 100%;
    background: #ffffff; z-index: 1002;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; flex-direction: column;
}
.sidebar.active { transform: translateX(0); }

.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 25px; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.sidebar-logo { max-width: 150px; height: auto; }
.btn-icon-close {
    background: var(--soft-pink); color: var(--color-pink);
    border: none; width: 35px; height: 35px; border-radius: 10px;
    font-size: 18px; cursor: pointer; display: flex;
    justify-content: center; align-items: center; transition: 0.3s;
}
.btn-icon-close:hover { background: var(--color-pink); color: #fff; transform: rotate(90deg); }

.sidebar-menu { display: flex; flex-direction: column; padding: 20px 0; overflow-y: auto; }
.sidebar-link {
    padding: 15px 25px; font-size: 14px; font-weight: 600;
    color: var(--text-main); display: flex; align-items: center; gap: 15px;
    border-left: 4px solid transparent; transition: 0.3s;
}
.sidebar-link i { font-size: 18px; color: var(--text-muted); width: 22px; text-align: center; transition: 0.3s; }
.sidebar-link:hover, .sidebar-link.active {
    background: var(--soft-blue); color: var(--color-blue);
    border-left-color: var(--color-blue);
}
.sidebar-link:hover i, .sidebar-link.active i { color: var(--color-blue); }

/* =================================================================
   APP WRAPPER
   ================================================================= */
.app-wrapper {
    width: 100%; max-width: 1200px; margin: 20px auto; 
    background-color: var(--bg-app); min-height: 95vh;
    position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border-radius: 24px; overflow: hidden; backdrop-filter: blur(10px); 
}

/* =================================================================
   HEADER WARNA-WARNI & LOGO BESAR + ANIMASI GETAR
   ================================================================= */
.app-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 25px; 
    background: linear-gradient(-45deg, #1877f2, #6f42c1, #d8459e, #1877f2);
    background-size: 300% 300%;
    animation: gradientHeader 8s ease infinite;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

@keyframes gradientHeader {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes entranceShake {
    0%, 100% { transform: scale(1.5) rotate(0deg); }
    15%, 45%, 75% { transform: scale(1.5) rotate(-5deg); }
    30%, 60% { transform: scale(1.5) rotate(5deg); }
}

@keyframes entranceShakeMobile {
    0%, 100% { transform: scale(1.65) rotate(0deg); }
    15%, 45%, 75% { transform: scale(1.65) rotate(-5deg); }
    30%, 60% { transform: scale(1.65) rotate(5deg); }
}

.logo { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 15px; }

.header-logo { 
    height: 55px; 
    width: auto; 
    max-width: 100%; 
    object-fit: contain; 
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
    animation: entranceShake 1.2s ease-in-out forwards;
}

.app-header .btn-icon {
    width: 42px; height: 42px; background: rgba(255, 255, 255, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 12px;
    font-size: 16px; color: #ffffff; backdrop-filter: blur(5px);
    cursor: pointer; display: flex; justify-content: center; align-items: center;
    transition: 0.3s; flex-shrink: 0; 
}
.app-header .btn-icon:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.4); color: #fff; }

/* =================================================================
   WELCOME BANNER (MARQUEE SMOOTH)
   ================================================================= */
.welcome-alert {
    background: var(--soft-blue); margin: 20px 25px;
    padding: 15px 20px; border-radius: 12px;
    display: flex; align-items: center; gap: 12px; overflow: hidden;
}
.wave { font-size: 18px; flex-shrink: 0; }
.marquee-wrapper { width: 100%; overflow: hidden; white-space: nowrap; position: relative; }
.marquee-content {
    display: inline-block; font-size: 12px; font-weight: 600;
    color: var(--color-blue); text-transform: uppercase;
    will-change: transform; animation: scroll-left 25s linear infinite;
}
@keyframes scroll-left { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }

/* =================================================================
   HERO BANNER (AUTO SLIDER) - FIX ASPECT RATIO (TIDAK TERPOTONG)
   ================================================================= */
.hero-section { 
    position: relative; margin: 0 25px 25px; border-radius: 20px; 
    overflow: hidden; box-shadow: 0 8px 25px rgba(0,0,0,0.1); 
    background-color: var(--soft-blue); 
}
.slider-track {
    display: flex; width: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.hero-slide {
    width: 100%; 
    height: auto; 
    aspect-ratio: 4 / 1; /* Rasio Ideal 1200x300 px */
    flex-shrink: 0;
    object-fit: cover; 
    display: block;
}
.slider-indicators {
    position: absolute; bottom: 12px; left: 50%;
    transform: translateX(-50%); display: flex; gap: 8px; z-index: 10;
}
.indicator {
    width: 8px; height: 8px; background: rgba(0,0,0,0.3);
    border-radius: 50%; cursor: pointer; transition: 0.4s;
}
.indicator.active { background: var(--color-blue); width: 20px; border-radius: 6px; }

/* =================================================================
   MAIN CARDS
   ================================================================= */
.main-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 25px 25px; }
.main-card {
    border-radius: 20px; padding: 25px 20px; display: flex; align-items: center; gap: 15px;
    color: #fff; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: 0.3s;
}
.main-card:hover { transform: translateY(-5px); box-shadow: 0 15px 25px rgba(0,0,0,0.15); }
.card-blue { background: linear-gradient(135deg, #439dfa, #1877f2); }
.card-pink { background: linear-gradient(135deg, #e45b9b, #c32fa1); }
.card-icon { width: 55px; height: 55px; background: rgba(255,255,255,0.2); border-radius: 14px; display: flex; justify-content: center; align-items: center; font-size: 26px; }
.card-text h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.card-text p { font-size: 11px; opacity: 0.9; }

/* =================================================================
   PERALATAN TOGEL (TOOLS)
   ================================================================= */
.tools-section { background: #fff; margin: 0 25px 25px; border-radius: 24px; padding: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.04); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.title-left { display: flex; align-items: center; gap: 10px; flex: 1; overflow: hidden; }
.title-left h2 { font-size: 15px; font-weight: 700; color: #2b3b5a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-see-all { font-size: 13px; font-weight: 600; color: var(--color-blue); transition: 0.3s; white-space: nowrap; flex-shrink: 0; margin-left: 10px; }
.link-see-all:hover { color: #105bbd; }

.tools-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 20px 15px; }
.tool-item { display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; }
.tool-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; justify-content: center; align-items: center; font-size: 24px; margin-bottom: 10px; transition: 0.3s; }
.tool-text-wrap { display: flex; flex-direction: column; line-height: 1.3; }
.tool-title { font-size: 12px; font-weight: 700; color: var(--text-main); }
.tool-subtitle { font-size: 11px; color: var(--text-muted); }

/* =================================================================
   IFRAME DATA RESULT SECTION
   ================================================================= */
.iframe-section { background: #fff; margin: 0 25px 25px; border-radius: 24px; padding: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.04); }
.result-title { font-size: 15px; font-weight: 700; color: #2b3b5a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block; }
.iframe-container { width: 100%; height: 500px; border-radius: 16px; overflow: hidden; background: var(--bg-body); border: 2px solid var(--soft-blue); position: relative; }
.iframe-container iframe { width: 100%; height: 100%; border: none; display: block; }

/* =================================================================
   INFO SECTION
   ================================================================= */
.info-section { background: #fff; margin: 0 25px 25px; border-radius: 24px; padding: 25px; display: flex; align-items: center; gap: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.04); }
.info-icon img { width: 60px; }
.info-text { flex: 1; }
.info-text h3 { font-size: 14px; margin-bottom: 6px; }
.info-text p { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; line-height: 1.5; }
.info-text .bold-text { font-weight: 700; color: var(--text-main); }
.badge-gratis { background: var(--soft-blue); padding: 12px 15px; border-radius: 14px; display: flex; align-items: center; gap: 8px; }
.badge-gratis i { color: var(--color-yellow); font-size: 24px; }
.badge-gratis div { font-size: 11px; color: var(--color-blue); line-height: 1.2; }

/* =================================================================
   PLAY STORE DOWNLOAD BUTTON (ANIMATED 3D CUBE)
   ================================================================= */
.playstore-section { display: flex; justify-content: center; margin: 0 25px 25px; perspective: 1000px; }
.playstore-btn {
    background: linear-gradient(135deg, #202124, #3c4043);
    border: 1px solid #5f6368; border-radius: 18px;
    padding: 15px 30px; display: flex; align-items: center; gap: 20px;
    text-decoration: none; color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); transition: 0.4s ease;
    width: 100%; max-width: 350px; justify-content: center;
}
.playstore-btn:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(32,33,36,0.3); }

/* 3D Cube System */
.cube-wrapper { width: 35px; height: 35px; perspective: 800px; }
.cube {
    width: 100%; height: 100%; position: relative;
    transform-style: preserve-3d; animation: rotateCube 5s infinite linear;
}
.cube-face {
    position: absolute; width: 35px; height: 35px;
    display: flex; justify-content: center; align-items: center;
    font-size: 18px; border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}
.cube-front  { transform: rotateY(0deg) translateZ(17.5px); background: #4285F4; } 
.cube-back   { transform: rotateY(180deg) translateZ(17.5px); background: #EA4335; } 
.cube-right  { transform: rotateY(90deg) translateZ(17.5px); background: #FBBC05; } 
.cube-left   { transform: rotateY(-90deg) translateZ(17.5px); background: #34A853; } 
.cube-top    { transform: rotateX(90deg) translateZ(17.5px); background: #ffffff; }
.cube-bottom { transform: rotateX(-90deg) translateZ(17.5px); background: #202124; }
.cube-face i { color: #fff; text-shadow: 1px 1px 3px rgba(0,0,0,0.4); }

@keyframes rotateCube { 0% { transform: rotateX(-20deg) rotateY(0deg); } 100% { transform: rotateX(-20deg) rotateY(360deg); } }

.playstore-text { display: flex; flex-direction: column; text-align: left; }
.playstore-text span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #a8aaad; font-weight: 500; }
.playstore-text span:last-child { font-size: 19px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }

/* =================================================================
   FOOTER
   ================================================================= */
.site-footer { text-align: center; padding: 20px; margin-top: 10px; border-top: 1px solid rgba(0,0,0,0.05); }
.site-footer p { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* =================================================================
   BOTTOM NAVIGATION
   ================================================================= */
.bottom-spacer { height: 110px; }

.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 1200px; 
    
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    
    display: flex; justify-content: space-around; padding: 12px 10px 18px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.08); z-index: 1000;
    border-top-left-radius: 30px; border-top-right-radius: 30px;
}

.nav-item { 
    display: flex; flex-direction: column; align-items: center; gap: 4px; 
    color: var(--text-muted); padding: 8px 18px; border-radius: 20px;
    transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
    text-decoration: none;
}

.nav-item i { font-size: 20px; transition: 0.4s; }
.nav-item span { font-size: 11px; font-weight: 500; transition: 0.4s; }

.nav-item.active { 
    background: linear-gradient(135deg, #1877f2, #d8459e, #fd7e14);
    background-size: 200% 200%;
    animation: navGradient 3s ease infinite;
    color: #fff;
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(216, 69, 158, 0.3);
}

@keyframes navGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nav-item.active i { color: #fff; transform: translateY(-2px); }
.nav-item.active span { font-weight: 700; color: #fff; }
.nav-item:hover:not(.active) { color: var(--color-blue); background: rgba(24, 119, 242, 0.1); }

/* =================================================================
   MODAL, PWA PROMPT & LOGIN
   ================================================================= */
#pwa-install-prompt {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-150%);
    background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,0.2); border-radius: 16px;
    padding: 15px 20px; z-index: 9999; display: flex; align-items: center; justify-content: space-between;
    gap: 15px; width: 90%; max-width: 400px; opacity: 0; visibility: hidden;
    transition: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
#pwa-install-prompt.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
#pwa-install-prompt.hidden { display: none !important; }
.pwa-content { display: flex; align-items: center; gap: 15px; }
.pwa-content img { width: 45px; height: 45px; border-radius: 12px; }
.pwa-content h4 { font-size: 14px; margin: 0; color: #2d3748; }
.pwa-content p { font-size: 11px; margin: 0; color: #718096; }
.pwa-actions { display: flex; gap: 8px; }
.pwa-btn { padding: 8px 14px; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.pwa-btn-close { background: #f0f2f5; color: #718096; }
.pwa-btn-install { background: var(--color-blue); color: #fff; box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3); }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    z-index: 9999; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.login-modal {
    background: #fff; width: 90%; max-width: 420px; border-radius: 24px;
    padding: 35px 30px; position: relative;
    transform: translateY(30px) scale(0.95);
    transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}
.modal-overlay.active .login-modal { transform: translateY(0) scale(1); }
.btn-icon-close-modal {
    position: absolute; top: 20px; right: 20px; width: 35px; height: 35px;
    border-radius: 10px; border: none; background: var(--soft-pink);
    color: var(--color-pink); font-size: 16px; cursor: pointer; transition: 0.3s;
    display: flex; justify-content: center; align-items: center;
}
.btn-icon-close-modal:hover { background: var(--color-pink); color: #fff; transform: rotate(90deg); }
.login-modal-header { text-align: center; margin-bottom: 25px; }
.login-modal-header img { width: auto; height: 50px; margin-bottom: 15px; }
.login-modal-header h3 { font-size: 20px; color: #2b3b5a; font-weight: 700; margin-bottom: 5px; }
.login-modal-header p { font-size: 12px; color: var(--text-muted); }
.input-group { position: relative; margin-bottom: 15px; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 16px; transition: 0.3s; }
.input-group input { width: 100%; padding: 14px 15px 14px 45px; border-radius: 14px; border: 2px solid #e2e8f0; font-size: 14px; color: var(--text-main); outline: none; transition: 0.3s; font-family: 'Poppins', sans-serif; background: #f8fafc; }
.input-group input:focus { border-color: var(--color-blue); background: #fff; box-shadow: 0 0 0 4px var(--soft-blue); }
.input-group input:focus + .input-icon { color: var(--color-blue); }
.toggle-pwd-btn { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 5px; transition: 0.3s; }
.toggle-pwd-btn:hover { color: var(--color-blue); }
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; margin-top: 10px; font-size: 12px; font-weight: 500; }
.remember-me { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-muted); }
.remember-me input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--color-blue); }
.forgot-pwd-link { color: var(--color-blue); transition: 0.3s; font-weight: 600; }
.forgot-pwd-link:hover { text-decoration: underline; color: #105bbd; }
.btn-submit-login { width: 100%; padding: 15px; border: none; border-radius: 14px; background: linear-gradient(135deg, var(--color-blue), #105bbd); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3); transition: 0.3s; }
.btn-submit-login:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(24, 119, 242, 0.4); }

/* ANIMASI TOOLS */
@keyframes shake { 0%, 100% {transform: translateX(0);} 25% {transform: translateX(-5px);} 75% {transform: translateX(5px);} }
@keyframes spin { 100% {transform: rotate(360deg);} }
@keyframes pulse { 0% {transform: scale(1);} 50% {transform: scale(1.15);} 100% {transform: scale(1);} }
@keyframes wobble { 0% {transform: translateX(0%);} 15% {transform: translateX(-15%) rotate(-5deg);} 30% {transform: translateX(10%) rotate(3deg);} 45% {transform: translateX(-10%) rotate(-3deg);} 60% {transform: translateX(5%) rotate(2deg);} 75% {transform: translateX(-2%) rotate(-1deg);} 100% {transform: translateX(0%);} }
@keyframes swing { 20% {transform: rotate(15deg);} 40% {transform: rotate(-10deg);} 60% {transform: rotate(5deg);} 80% {transform: rotate(-5deg);} 100% {transform: rotate(0deg);} }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-15px);} 60% {transform: translateY(-7px);} }
@keyframes jello { 0%, 100% {transform: none;} 22% {transform: skewX(-12.5deg) skewY(-12.5deg);} 33% {transform: skewX(6.25deg) skewY(6.25deg);} 44% {transform: skewX(-3.125deg) skewY(-3.125deg);} 55% {transform: skewX(1.5deg) skewY(1.5deg);} }
@keyframes heartbeat { 0% {transform: scale(1);} 14% {transform: scale(1.2);} 28% {transform: scale(1);} 42% {transform: scale(1.2);} 70% {transform: scale(1);} }

.anim-shake:hover .tool-icon { animation: shake 0.4s ease-in-out; } .anim-spin:hover .tool-icon { animation: spin 0.8s linear; } .anim-pulse:hover .tool-icon { animation: pulse 0.8s; } .anim-wobble:hover .tool-icon { animation: wobble 0.8s; } .anim-swing:hover .tool-icon { animation: swing 0.8s; } .anim-bounce:hover .tool-icon { animation: bounce 0.8s; } .anim-jello:hover .tool-icon { animation: jello 0.8s; } .anim-heartbeat:hover .tool-icon { animation: heartbeat 0.8s; }

/* UTILITY COLORS */
.text-blue { color: var(--color-blue); } .text-pink { color: var(--color-pink); } .text-yellow { color: var(--color-yellow); } .text-green { color: var(--color-green); } .text-orange { color: var(--color-orange); } .text-purple { color: var(--color-purple); } .text-cyan { color: var(--color-cyan); } .text-magenta { color: var(--color-magenta); }
.bg-soft-blue { background-color: var(--soft-blue); } .bg-soft-pink { background-color: var(--soft-pink); } .bg-soft-yellow { background-color: var(--soft-yellow); } .bg-soft-green { background-color: var(--soft-green); } .bg-soft-orange { background-color: var(--soft-orange); } .bg-soft-purple { background-color: var(--soft-purple); } .bg-soft-cyan { background-color: var(--soft-cyan); } .bg-soft-magenta { background-color: var(--soft-magenta); }

/* =================================================================
   LIVE HK GRID & BALLS SPESIFIK 
   ================================================================= */
.live-hk-container { margin: 0 25px 25px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 5px 20px rgba(0,0,0,0.1); border: 2px solid #800000; }
.live-hk-header { background: #800000; color: #fff; padding: 15px; text-align: center; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.live-hk-row { display: flex; border-top: 1px solid #ccc; }
.live-hk-title { width: 30%; padding: 15px 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; text-align: center; border-right: 1px solid #ccc; }
.live-hk-numbers { width: 70%; padding: 15px; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; background: #e6f7ff; }
.live-hk-ball-group { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.bg-title-yellow { background: #ffffcc; color: #990000; }
.bg-title-green { background: #ccffcc; color: #990000; }

.ld-ball {
    width: 38px; height: 38px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 18px; font-weight: 900; color: #fff;
    box-shadow: inset -4px -4px 8px rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.ball-1st { background: radial-gradient(circle at 30% 30%, #ff4d4d, #b30000); }      
.ball-2nd { background: radial-gradient(circle at 30% 30%, #4d94ff, #0033b3); }      
.ball-3rd { background: radial-gradient(circle at 30% 30%, #4dff4d, #008000); }      
.ball-starter { background: radial-gradient(circle at 30% 30%, #ff9933, #b35900); }  
.ball-consolation { background: radial-gradient(circle at 30% 30%, #b84dff, #6600cc);} 

/* =================================================================
   MEDIA QUERIES (MOBILE RESPONSIVE + SCALING)
   ================================================================= */
@media (max-width: 768px) {
    .app-wrapper { margin: 0; border-radius: 0; max-width: 100%; }
    .header-logo { max-width: 200px; height: 45px; }
    .tools-grid { grid-template-columns: repeat(4, 1fr); }
    .info-section { flex-direction: column; text-align: center; }
    .badge-gratis { width: 100%; justify-content: center; margin-top: 10px; }
    .iframe-container { height: 400px; }
}

@media (max-width: 480px) {
    /* HEADER SANGAT RAMPING & LOGO POP OUT MAX DI MOBILE */
    .app-header { padding: 8px 15px; }
    .header-logo { 
        height: 40px; 
        animation: entranceShakeMobile 1.2s ease-in-out forwards;
    }
    .app-header .btn-icon { width: 38px; height: 38px; font-size: 14px; }
    
    /* SLIDER ASPECT RATIO UNTUK MOBILE (AGAR LEBIH TINGGI DI HP) */
    .hero-slide { aspect-ratio: 3 / 1; } /* Contoh: 900x300 */

    @keyframes scroll-left { 0% { transform: translateX(100vw); } 100% { transform: translateX(-120%); } }

    .title-left h2 { font-size: 14px; }
    .result-title { font-size: 11px; letter-spacing: -0.3px; padding-right: 5px; }
    .link-see-all { font-size: 12px; }

    .tools-grid { grid-template-columns: repeat(4, 1fr); gap: 15px 5px; }
    .tool-icon { width: 45px; height: 45px; font-size: 18px; margin-bottom: 6px; }
    .tool-title { font-size: 10px; letter-spacing: -0.2px; }
    .tool-subtitle { font-size: 9px; }

    .main-cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 15px 20px; }
    .main-card { padding: 15px 12px; flex-direction: column; text-align: center; gap: 8px; border-radius: 16px;}
    .card-icon { width: 45px; height: 45px; font-size: 22px; margin: 0 auto; }
    .card-text h3 { font-size: 13px; margin-bottom: 2px; }
    .card-text p { font-size: 10px; line-height: 1.2; }
    
    .iframe-section { padding: 20px 15px; }
    .iframe-container { height: 380px; }
    
    .playstore-section { margin: 0 15px 20px; }
    .playstore-btn { padding: 12px 20px; }
    .playstore-text span:last-child { font-size: 16px; }

    .login-modal { padding: 25px 20px; }
    .login-modal-header h3 { font-size: 18px; }
    .login-modal-header img { height: 40px; }
    
    .bottom-nav { padding: 10px 5px 15px; }
    .nav-item { padding: 8px 12px; }

    /* LAYOUT LIVE HK UNTUK MOBILE - DIPAKSA 1 BARIS (NOWRAP) */
    .live-hk-container { margin: 0 15px 25px; }
    
    /* Header Tanggal / Jam dipaksa 1 baris */
    .live-hk-header { 
        font-size: 10px; 
        padding: 12px 5px; 
        white-space: nowrap; 
    }
    
    /* Lebar kolom judul dilebarkan sedikit menjadi 38% agar Consolation muat 1 baris */
    .live-hk-title { 
        width: 38%; 
        font-size: 10px; 
        padding: 10px 2px; 
        white-space: nowrap; 
    }
    
    /* Kolom Angka (Bola) sisanya 62% */
    .live-hk-numbers { 
        width: 62%; 
        padding: 10px 5px; 
        gap: 8px; 
    }
    .live-hk-ball-group { gap: 3px; }
    
    /* Ukuran bola sedikit dikecilkan agar muat di kolom 62% */
    .ld-ball { 
        width: 25px; 
        height: 25px; 
        font-size: 12px; 
        box-shadow: inset -2px -2px 5px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3); 
    }
}