/* --- 1. THEME VARIABLES --- */
:root {
    --bg-dark: #050505;
    --neon-orange: #FF5500; 
    --orange-glow: 0 0 20px rgba(255, 85, 0, 0.5);
    --text-white: #ffffff;
    
    /* Glass Styling */
    --glass-bg: rgba(20, 20, 20, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    
    --gap: 8px; 
    --header-h: 70px;
    --sidebar-w: 50px;
    --bottom-h: 75px;
}

* { margin: 0; padding: 0; box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent;}

/* --- 2. ANIMATED BACKGROUND (Moving Version) --- */
body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    overflow-x: hidden;
    padding-top: calc(var(--header-h) + var(--gap) + 20px); 
    padding-bottom: calc(var(--bottom-h) + var(--gap) + 20px);
    position: relative;
    min-height: 100vh;
}

/* Glow Orb 1 (Left Top) */
body::before {
    content: ''; 
    position: fixed; 
    top: -10%; 
    left: -10%; 
    width: 70vw; 
    height: 70vw;
    background: radial-gradient(circle, rgba(255, 85, 0, 0.296), transparent 70%);
    filter: blur(30px);
    animation: moveGlow1 5s infinite alternate ease-in-out;
    z-index: -2; 
    pointer-events: none;
}

/* Glow Orb 2 (Right Bottom) */
body::after {
    content: ''; 
    position: fixed; 
    bottom: -10%; 
    right: -10%; 
    width: 70vw; 
    height: 70vw;
    background: radial-gradient(circle, rgba(255, 60, 0, 0.241), transparent 70%);
    filter: blur(30px);
    animation: moveGlow2 6s infinite alternate-reverse ease-in-out;
    z-index: -2; 
    pointer-events: none;
}

/* Grid Pattern */
.bg-grid {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px; 
    z-index: -1; pointer-events: none;
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes moveGlow1 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    100% { transform: translate(20vw, 10vh) scale(1.3); opacity: 0.8; }
}

@keyframes moveGlow2 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    100% { transform: translate(-20vw, -15vh) scale(1.4); opacity: 0.7; }
}

@media (max-width: 480px) {
    body::before, body::after { width: 100vw; height: 100vw; filter: blur(20px); }
    body::before { animation-duration: 4s; }
    body::after { animation-duration: 5s; }
}

/* --- 3. FLOATING TOP BAR --- */
.top-glass-nav {
    position: fixed; top: var(--gap); left: var(--gap); right: var(--gap);
    height: var(--header-h);
    background: var(--glass-bg); backdrop-filter: var(--glass-blur);
    border: var(--glass-border); border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; z-index: 2000;
}

.nav-left { display: flex; align-items: center; gap: 10px; width: 30%; }
.profile-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--neon-orange); box-shadow: var(--orange-glow); }
.p-name { font-weight: bold; font-size: 0.9rem; color: #fff; text-transform: uppercase; }
.p-role { font-size: 0.65rem; color: var(--neon-orange); letter-spacing: 1px; }

.nav-center { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; }
.logo-text { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; font-weight: 900; color: #fff; text-shadow: 0 0 10px var(--neon-orange); }
.logo-text span { color: var(--neon-orange); }

.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: 30%; }
.nav-btns { display: flex; align-items: center; gap: 10px; }
.balance-pill { background: rgba(255, 85, 0, 0.15); border: 1px solid rgba(255, 85, 0, 0.3); border-radius: 20px; padding: 6px 12px; font-size: 0.8rem; font-weight: bold; color: var(--neon-orange); font-family: 'Orbitron', sans-serif; white-space: nowrap; }
.restore-btn { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; }
.restore-btn:active { transform: rotate(180deg); color: var(--neon-orange); }
.logout-btn { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,0,0,0.1); border: 1px solid rgba(255,0,0,0.2); color: #ff4444; display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }

/* --- 4. FLOATING HERO SLIDER --- */
.hero-slider-container {
    width: calc(75% - (var(--gap) * 2)); height: 200px; margin: 0 auto 20px auto;
    border-radius: 20px; overflow: hidden; position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8); border: 1px solid rgba(255, 85, 0, 0.2); z-index: 10;
}
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; background-size: cover; background-position: center; }
.slide.active { opacity: 1; }
.slide::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 60%); }
.hero-content { position: absolute; bottom: 20px; left: 20px; z-index: 2; }
.hero-title { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; font-weight: bold; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0,0,0,1); }
.hero-title span { color: var(--neon-orange); }
.slider-dots { position: absolute; bottom: 15px; right: 20px; display: flex; gap: 8px; z-index: 3; }
.dot { width: 8px; height: 8px; background: rgba(255,255,255,0.3); border-radius: 50%; transition: 0.3s; }
.dot.active { background: var(--neon-orange); box-shadow: 0 0 10px var(--neon-orange); transform: scale(1.2); }

/* --- 5. CONTENT LAYOUT --- */
.layout-container { display: flex; align-items: flex-start; padding: 0 var(--gap); gap: 15px; max-width: 1200px; margin: 0 auto; }

/* ★★★ SIDEBAR UPDATED (Clean Version) ★★★ */
.sidebar-left { 
    width: var(--sidebar-w); 
    min-width: var(--sidebar-w); 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    position: sticky; 
    top: calc(var(--header-h) + var(--gap) + 20px); 
    z-index: 100; 
}

.side-bubble {
    width: 100%; 
    padding: 5px 0;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column; /* Icon အပေါ်၊ Text အောက် */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent !important; 
    border: none !important;
    transition: transform 0.2s;
}

/* Icon Styling (Sharpness Fixed) */
.sidebar-icon {
    width: 36px; 
    height: 36px;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1; 
    filter: none;
    
    /* GPU Rendering Fix */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0); 
    will-change: transform;
}

/* Text Label Styling */
.icon-label {
    font-size: 11px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    color: #aaaaaa; 
    margin-top: 6px;
    text-align: center;
    line-height: 1;
    transition: 0.3s;
    opacity: 0.8;
}

/* Hover & Active Effects */
.side-bubble:hover .sidebar-icon,
.side-bubble.active .sidebar-icon {
    transform: scale(1.15) translateZ(0); 
    filter: drop-shadow(0 0 8px rgba(255, 85, 0, 0.9)); 
}

.side-bubble.active .icon-label,
.side-bubble:hover .icon-label {
    color: var(--neon-orange);
    text-shadow: 0 0 5px rgba(255, 85, 0, 0.5);
    opacity: 1;
}

/* --- GAME GRID --- */
.games-right { flex: 1; }
.section-head { font-family: 'Orbitron', sans-serif; font-size: 1.1rem; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; color: #fff; }
.section-head i { color: var(--neon-orange); }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.game-card { border-radius: 15px; transition: 0.3s; position: relative; overflow: hidden; display: block; text-decoration: none;}
.game-card:hover { border-color: var(--neon-orange); transform: translateY(-3px); background: rgba(255,255,255,0.05); box-shadow: 0 5px 20px rgba(0,0,0,0.6); }

/* Updated Shine Effect */
.img-wrapper { position: relative; overflow: hidden; border-radius: 12px; width: 100%; margin-bottom: 8px; }
.img-wrapper::before { content: ''; position: absolute; top: 0; left: -100%; width: 30%; height: 100%; background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent); transform: skewX(-45deg); z-index: 2; pointer-events: none; animation: shine 3s infinite; }
@keyframes shine { 0% { left: -80%; } 100% { left: 140%; } }

.game-card .g-img { width: 100%;  object-fit: fill; display: block; margin: 0; opacity: 0.9; transition: 0.3s; background: rgba(0,0,0,0.3); }
@media (max-width: 480px) {
   .game-card .g-img{ width: 100%;}
}
.g-title { font-size: 0.8rem; font-weight: bold; text-align: center; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-type { font-size: 0.65rem; color: var(--neon-orange); text-align: center; margin-top: 2px; }

/* --- 6. FLOATING BOTTOM BAR --- */
.glass-bottom {
    position: fixed; bottom: var(--gap); left: var(--gap); right: var(--gap); height: var(--bottom-h);
    background: var(--glass-bg); backdrop-filter: var(--glass-blur); border: var(--glass-border); border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9); display: flex; justify-content: space-around; align-items: center; z-index: 2000;
}
.btm-item { text-decoration: none; color: #cbcbcb; display: flex; flex-direction: column; align-items: center; transition: 0.3s; flex: 1; }
.btm-item i { font-size: 1.3rem; margin-bottom: 4px; }
.btm-item span { font-size: 0.7rem; font-weight: 600; }
.btm-item.active { color: var(--neon-orange); text-shadow: 0 0 10px var(--neon-orange); }

.btm-center {
    width: 65px; height: 65px; background: var(--neon-orange); border-radius: 50%; margin-top: -45px;
    border: 5px solid var(--bg-dark); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem;
    box-shadow: var(--orange-glow); animation: pulse 2s infinite; text-decoration: none;
}
@keyframes pulse { 0% {box-shadow: 0 0 0 0 rgba(255,85,0,0.7);} 70% {box-shadow: 0 0 0 15px rgba(255,85,0,0);} 100% {box-shadow: 0 0 0 0 rgba(255,85,0,0);} }

/* --- 7. MOBILE ADJUSTMENTS --- */
/* --- 7. MOBILE ADJUSTMENTS --- */
@media (max-width: 480px) {
    .hero-slider-container { 
    height: auto !important; 
    width: calc(100% - (var(--gap) * 2));
    aspect-ratio: 2.5 / 1; 
    }
    /* Game Grid ကို ဖုန်းမှာ ၂ ကော်လံပြမည်၊ Sidebar ပါနေလို့ Gap လျှော့မည် */
    .game-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    
    /* Top Bar Mobile Fixes */
    .top-glass-nav { height: 70px !important; padding: 0 8px !important; }
    .nav-left { flex-direction: row !important; align-items: center !important; gap: 6px !important; width: auto !important; }
    .profile-img { width: 32px !important; height: 32px !important; border-width: 1px !important; }
    .profile-info { display: block !important; text-align: left; }
    .p-name { font-size: 0.75rem !important; margin-bottom: 0; line-height: 1.1; max-width: 80px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .p-role { font-size: 0.55rem !important; color: var(--neon-orange); display: block !important; }
    .nav-center { top: 50%; transform: translate(-50%, -50%); width: auto; }
    .logo-text { font-size: 1.1rem !important; }
    .nav-right { display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: flex-end !important; width: 100px !important; gap: 3px !important; }
    .balance-pill { width: 100% !important; text-align: center !important; font-size: 0.7rem !important; padding: 3px 0 !important; order: 1; }
    .nav-btns { display: flex !important; width: 100% !important; gap: 5px !important; justify-content: space-between !important; order: 2; }
    .restore-btn, .logout-btn { display: flex !important; flex: 1 !important; width: auto !important; height: 24px !important; border-radius: 8px !important; justify-content: center; align-items: center; font-size: 0.8rem !important; }

    /* ★ Sidebar Mobile Fix (Vertical Restore) ★ */
    .sidebar-left { 
        display: flex !important; 
        flex-direction: column !important; /* ဒေါင်လိုက်အတိုင်း ပြန်ထားသည် */
        width: var(--sidebar-w) !important; /* အကျယ် 50px အသေ */
        min-width: var(--sidebar-w) !important;
        gap: 10px; 
        position: sticky;
        top: calc(var(--header-h) + 15px); /* Header အောက်နားကပ်မည် */
        margin-bottom: 0;
        padding-bottom: 0;
        overflow: visible;
        margin-top: 10px;/* Scroll မလုပ်တော့ပါ */
    }
    
    .side-bubble {
        width: 100%;
        min-width: auto;
        margin-bottom: 5px;
        /* Icon နှင့် စာသားပုံစံ မပျက်အောင် ထိန်းသည် */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}

/* --- GUEST MODE STYLES --- */
.top-glass-nav.guest-mode { height: var(--header-h); display: flex; justify-content: space-between; align-items: center; }
.logo-text.guest-logo { font-size: 1.5rem !important; text-shadow: 0 0 10px var(--neon-orange); margin: 0; }
.guest-btn-group { display: flex; gap: 10px; align-items: center; }
.g-btn { text-decoration: none; padding: 8px 20px; border-radius: 50px; font-family: 'Rajdhani', sans-serif; font-weight: bold; font-size: 0.85rem; transition: 0.3s; white-space: nowrap; }
.g-btn.login { border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; background: transparent; }
.g-btn.login:hover { border-color: var(--neon-orange); color: var(--neon-orange); }
.g-btn.register { background: var(--neon-orange); color: #fff; box-shadow: 0 0 10px rgba(255, 85, 0, 0.4); border: 1px solid var(--neon-orange); }
.g-btn.register:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 85, 0, 0.6); }

@media (max-width: 480px) {
    .top-glass-nav.guest-mode { padding: 0 10px !important; height: 70px !important; }
    .logo-text.guest-logo { font-size: 1.2rem !important; }
    .g-btn { padding: 6px 12px; font-size: 0.75rem; }
    .guest-btn-group { gap: 8px; }
}

/* --- SWEETALERT CUSTOM THEME --- */
.neon-popup { background: rgba(15, 15, 15, 0.95) !important; border: 1px solid var(--neon-orange) !important; border-radius: 20px !important; box-shadow: 0 0 30px rgba(255, 85, 0, 0.3) !important; padding: 20px !important; }
.swal2-title { font-family: 'Orbitron', sans-serif !important; color: #fff !important; font-size: 1.5rem !important; letter-spacing: 1px; text-shadow: 0 0 10px var(--neon-orange); }
.swal2-html-container { font-family: 'Rajdhani', sans-serif !important; color: #aaa !important; font-size: 1rem !important; }
.swal2-icon.swal2-success { border-color: var(--neon-orange) !important; }
.swal2-icon.swal2-success .swal2-success-line { background-color: var(--neon-orange) !important; }
.swal2-icon.swal2-success .swal2-success-ring { border: 4px solid rgba(255, 85, 0, 0.2) !important; }

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseText {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px #FF5500; }
    50% { opacity: 0.5; text-shadow: none; }
}

/* Hide Class */
.loaded {
    opacity: 0;
    pointer-events: none; 
}

/* --- SUPPORT FLOATING BUTTON --- */
.support-floater {
    position: fixed;
    bottom: 160px; 
    right: 16px;
    width: 80px;
    height: 80px;
    z-index: 2000;
    cursor: pointer;
    transition: transform 0.3s;
    animation: pulse-glow 2s infinite;
}
.support-floater:active { transform: scale(0.9); }

.support-floater img {
    width: 100%; height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5));
}

/* --- POPUP MENU --- */
.support-popup {
    display: none; 
    position: fixed;
    bottom: 230px; 
    right: 25px;
    width: 220px;
    background: rgba(25, 25, 25, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 85, 0, 0.3);
    border-radius: 15px;
    padding: 15px;
    flex-direction: column;
    gap: 10px;
    z-index: 1999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    animation: slideUp 0.3s ease-out;
}

.popup-header {
    text-align: center; color: #fff; font-family: 'Orbitron'; 
    font-size: 0.9rem; margin-bottom: 5px; border-bottom: 1px solid #333; padding-bottom: 8px;
}

.contact-item {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 10px; border-radius: 10px;
    text-decoration: none; color: #ccc; font-weight: bold;
    transition: 0.3s; border: 1px solid transparent;
}
.contact-item:hover {
    background: rgba(255, 85, 0, 0.1);
    border-color: var(--neon-orange);
    color: #fff;
}
.c-icon { width: 30px; height: 30px; object-fit: contain; }

/* Keyframes */
@keyframes pulse-glow {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,85,0,0)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 10px rgba(255,85,0,0.6)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,85,0,0)); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

