@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Oswald:wght@500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }

/* GLOBALS & CUSTOM SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #111217; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #2a2d38; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

body { background-color: #111217; color: #ffffff; font-family: 'Montserrat', sans-serif; overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; position: relative; }
body::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 10, 15, 0.1); pointer-events: none; z-index: -4; }

#snow { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: hidden; }
.flake { position: absolute; bottom: 100%; background-color: rgba(255, 255, 255, 0.8); border-radius: 50%; animation: snow-fall linear infinite; }
@keyframes snow-fall { to { transform: translateY(105vh) translateX(30px); } }

.top-header-wrapper {
    display: contents; /* Ito ang solusyon para hindi matakpan ang content ng website mo */
}

.top-header-inner {
    max-width: 1200px; margin: 0 auto; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    height: 115px; position: relative; padding: 0 20px;
}
.logo img {
    height: 130px; /* Bagong laki (ultra quality) */
    width: auto;
    display: block;
    image-rendering: high-quality; /* Optimize for quality display */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); /* Add slight depth and premium feel */
}
.main-nav { display: flex; gap: 35px; font-size: 0.85rem; font-weight: 700; letter-spacing: 1px; }
.main-nav a { color: #aaa; text-decoration: none; transition: color 0.3s; padding-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.main-nav a:hover, .main-nav a.active { color: #fff; border-bottom: 2px solid #e60000; text-shadow: 0 0 10px rgba(230,0,0,0.5); }
.lock-icon { font-size: 0.7rem; color: #555; transition: 0.3s; }
.main-nav a:hover .lock-icon { color: #ff3333; }
.main-nav a.active .lock-icon { display: none; }

.login-text-btn { background: transparent; border: none; color: #fff; display: flex; align-items: center; gap: 10px; cursor: pointer; font-family: 'Montserrat', sans-serif; transition: 0.3s; }
.login-text-btn:hover { text-shadow: 0 0 8px rgba(255,255,255,0.5); }

#bgContainer { 
    position: fixed; 
    top: 0; /* Pinalitan mula 115px */
    left: 0; 
    width: 100vw; 
    height: 100vh; /* Pinalitan mula calc(100vh - 115px) */
    z-index: -3; 
    pointer-events: none; 
}
.bg-static { width: 100%; height: 100%; object-fit: cover; object-position: right top; image-rendering: crisp-edges; filter: contrast(1.05) saturate(1.1); }

/* CENTERING ALL TABS */
.tab-content { display: none; flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* FOOTER */
.site-footer { margin-top: auto; background-color: rgba(15, 16, 21, 0.95); backdrop-filter: blur(10px); border-top: 3px solid #e60000; padding: 30px 10% 20px; font-family: 'Montserrat', sans-serif; display: flex; flex-direction: column; align-items: center; width: 100%; box-shadow: 0 -5px 20px rgba(0,0,0,0.5); }

/* MODALS */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 9999; justify-content: center; align-items: center; }
.modal-box { width: 100%; max-width: 400px; background: rgba(26, 28, 35, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); position: relative; padding: 40px; border-radius: 12px; transition: 0.3s; box-shadow: 0 15px 35px rgba(0,0,0,0.6); }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 24px; cursor: pointer; color: #aaa; transition: 0.2s; }
.close-modal:hover { color: #fff; transform: scale(1.1); }
.input-group-custom { display: flex; flex-direction: column; gap: 10px; }

/* INPUTS & BUTTONS */
.input-group-custom input, .custom-select, .register-grid input, .register-grid select { width: 100%; padding: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(17, 17, 17, 0.6); color: #fff; border-radius: 6px; font-family: 'Montserrat', sans-serif; transition: 0.3s; outline: none; }
.input-group-custom input:focus, .custom-select:focus, .register-grid input:focus, .register-grid select:focus { border-color: #e60000; background: rgba(17, 17, 17, 0.9); box-shadow: 0 0 10px rgba(230,0,0,0.2); }
input[type="date"] { color-scheme: dark; background: rgba(17, 17, 17, 0.6) !important; color: #fff !important; }

.btn-red-custom, .btn-red { background: linear-gradient(135deg, #ff3333 0%, #cc0000 100%); color: #fff; border: none; padding: 12px 25px; font-weight: bold; cursor: pointer; border-radius: 6px; transition: 0.3s; box-shadow: 0 4px 15px rgba(230,0,0,0.3); }
.btn-red-custom { width: 100%; margin-top: 15px; }
.btn-red-custom:hover, .btn-red:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230,0,0,0.5); filter: brightness(1.1); }
.btn-outline { background: rgba(255,255,255,0.03); backdrop-filter: blur(5px); color: #fff; border: 1px solid rgba(255,255,255,0.2); padding: 12px 25px; font-weight: 600; cursor: pointer; border-radius: 6px; transition: 0.3s; }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; transform: translateY(-2px); }

.auth-toggle { text-align: center; margin-top: 15px; font-size: 0.85rem; color: #aaa; cursor: pointer; transition: 0.2s; }
.auth-toggle:hover { color: #fff; text-decoration: underline; }
.register-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ALERTS */
.notification-container { position: fixed; top: 20px; left: 20px; right: auto; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.custom-notify { background: rgba(26, 28, 35, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.05); border-left: 4px solid #e60000; color: #fff; padding: 15px 20px; border-radius: 8px; box-shadow: 0 8px 25px rgba(0,0,0,0.6); display: flex; align-items: center; gap: 12px; font-family: 'Montserrat', sans-serif; font-size: 0.9rem; min-width: 280px; animation: slideInRight 0.3s ease-out; }
.custom-notify.notify-success { border-left-color: #23a559; }

@keyframes slideInRight { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: 0; } }

.new-players-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin-top: 25px !important; /* Pinalitan natin ito para bumaba ng onti at humiwalay sa YouTube */
    margin-left: 0;
    background: transparent;
    padding: 10px 0;
    box-shadow: none;
    backdrop-filter: none;
}

.np-list-wrapper { position: relative; height: 150px; overflow: hidden; }
.np-list { display: flex; flex-direction: column; }
.np-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; height: 50px; box-sizing: border-box; animation: slideInNp 0.4s ease-out forwards, flashRow 1s ease-out forwards; }
@keyframes slideInNp { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flashRow { 0% { background-color: rgba(35, 165, 89, 0.2); } 100% { background-color: transparent; } }
.np-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid #2a2d38; }
.np-info { display: flex; flex-direction: column; line-height: 1.2; }
.np-name { color: #fff; font-size: 0.9rem; font-weight: 600; }
.np-time { color: #23a559; font-size: 0.7rem; font-weight: bold; text-transform: uppercase; }

/* YELLOW FLAME & PARTICLES */
/* YELLOW FLAME & PARTICLES */
.yellow-flame-wrapper { 
    position: absolute; 
    bottom: 5%; 
    right: 25%; /* Pinalitan mula 0% papuntang 25% para umusog pakaliwa */
    width: 400px; 
    height: 600px; 
    pointer-events: none; 
    z-index: 1; 
}
.yellow-flame-effect { position: absolute; width: 100%; height: 100%; background: radial-gradient(ellipse at center, rgba(255, 204, 0, 0.45) 0%, rgba(255, 102, 0, 0.15) 50%, transparent 70%); border-radius: 50%; filter: blur(30px); mix-blend-mode: screen; animation: flameFlicker 3.5s infinite alternate ease-in-out; }
@keyframes flameFlicker { 0% { transform: scale(1) translateY(0) rotate(-2deg); opacity: 0.5; } 33% { transform: scale(1.05) translateY(-15px) rotate(1deg); opacity: 0.7; } 66% { transform: scale(0.95) translateY(10px) rotate(-1deg); opacity: 0.4; } 100% { transform: scale(1.1) translateY(-25px) rotate(2deg); opacity: 0.8; } }

.spark { position: absolute; bottom: 20%; width: 4px; height: 4px; background: #ffcc00; border-radius: 50%; box-shadow: 0 0 8px #ff6600, 0 0 15px #ffcc00; opacity: 0; animation: floatSparks linear infinite; mix-blend-mode: screen; }
@keyframes floatSparks { 0% { transform: translateY(0) scale(0.5); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 0.8; } 100% { transform: translateY(-300px) scale(1.2); opacity: 0; } }
.spark.p1 { left: 20%; animation-duration: 3s; animation-delay: 0s; }
.spark.p2 { left: 50%; animation-duration: 4.5s; animation-delay: 1.2s; width: 6px; height: 6px; }
.spark.p3 { left: 70%; animation-duration: 3.2s; animation-delay: 0.5s; }
.spark.p4 { left: 30%; animation-duration: 4s; animation-delay: 2s; width: 5px; height: 5px; }
.spark.p5 { left: 60%; animation-duration: 3.8s; animation-delay: 2.8s; }
.spark.p6 { left: 80%; animation-duration: 5s; animation-delay: 1.5s; width: 7px; height: 7px; }
.spark.p7 { left: 40%; animation-duration: 3.5s; animation-delay: 3s; }

/* WHITE DRIFTING PARTICLES */
.hero-content { position: relative; }
.white-particles-wrapper { position: absolute; top: 0; left: -20px; width: 100%; height: 100%; pointer-events: none; z-index: 10; }
.w-spark { position: absolute; width: 3px; height: 3px; background: #ffffff; border-radius: 50%; box-shadow: 0 0 6px #ffffff, 0 0 12px rgba(255, 255, 255, 0.8); opacity: 0; animation: driftWhiteSpark linear infinite; mix-blend-mode: screen; }
@keyframes driftWhiteSpark { 0% { transform: translate(0, 0) scale(0.5); opacity: 0; } 20% { opacity: 0.8; } 80% { opacity: 0.5; } 100% { transform: translate(250px, 200px) scale(1.2); opacity: 0; } }
.w-spark.wp1 { top: 10px; left: 0px; animation-duration: 5s; animation-delay: 0s; }
.w-spark.wp2 { top: 50px; left: -15px; animation-duration: 6.5s; animation-delay: 1.2s; width: 4px; height: 4px; }
.w-spark.wp3 { top: -5px; left: 10px; animation-duration: 4.8s; animation-delay: 2.5s; }
.w-spark.wp4 { top: 90px; left: -5px; animation-duration: 5.5s; animation-delay: 0.8s; width: 2px; height: 2px; }
.w-spark.wp5 { top: 30px; left: -20px; animation-duration: 7s; animation-delay: 3.1s; width: 5px; height: 5px; }

#notifDropdown::before { content: ''; position: absolute; top: -10px; right: 231px; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 10px solid rgba(255,255,255,0.08); }
#notifDropdown::after { content: ''; position: absolute; top: -8px; right: 232px; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 9px solid rgba(26, 28, 35, 0.95); }
#inboxDropdown::before { content: ''; position: absolute; top: -10px; right: 279px; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 10px solid rgba(255,255,255,0.08); }
#inboxDropdown::after { content: ''; position: absolute; top: -8px; right: 280px; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 9px solid rgba(26, 28, 35, 0.95); }

.notif-header { padding: 15px; background: rgba(22, 24, 30, 0.6); border-bottom: 1px solid rgba(255,255,255,0.05); font-weight: bold; font-size: 0.95rem; color: #fff; display: flex; justify-content: space-between; align-items: center; border-radius: 12px 12px 0 0; }

/* PREMIUM HEADER ACTIONS DESIGN */
.premium-header-actions {
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(20, 22, 28, 0) 0%, rgba(20, 22, 28, 0.7) 40%);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 20px 20px; 
    padding: 10px 8px 8px 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    gap: 15px;
    transition: all 0.3s ease;
    
    position: absolute;
    top: -58px; 
    right: 0;
    margin: 0;
}
/* BAGONG DAGDAG: Para patayin ang lumang gradient hover effect */
.premium-header-actions:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#livePlayerWidget { position: absolute; top: 15px; right: 5px; margin: 0 !important; }

.premium-icon-group { display: flex; align-items: center; gap: 8px; border-right: 1px solid rgba(255,255,255,0.1); padding-right: 15px; }
.premium-icon-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 1.1rem; cursor: pointer; position: relative; transition: all 0.3s ease; }
.premium-icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.2); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.premium-badge { position: absolute; top: -4px; right: -4px; background: linear-gradient(135deg, #e60000, #ff4d4d); color: white; font-size: 0.65rem; font-weight: bold; padding: 2px 6px; border-radius: 12px; border: 2px solid #1a1c23; box-shadow: 0 2px 8px rgba(230,0,0,0.6); }

.premium-user-profile { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 4px; border-radius: 40px; transition: 0.3s; }
.premium-user-profile:hover { background: rgba(255,255,255,0.05); }
.premium-user-text { display: flex; flex-direction: column; align-items: flex-end; }
.premium-username { font-family: 'Montserrat', sans-serif; font-size: 0.95rem; font-weight: 700; color: #fff; letter-spacing: 0.5px; margin-bottom: 2px; }
.premium-level-badge { background: linear-gradient(135deg, #e60000, #b30000); color: #fff; font-size: 0.6rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 2px 5px rgba(230,0,0,0.5); }
.premium-avatar-wrapper { position: relative; display: flex; }
.premium-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #2a2d38; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.premium-avatar-wrapper .status-dot { width: 14px; height: 14px; border: 3px solid #1a1c23; right: -2px; bottom: -2px; }

/* 1. UPDATE BUONG WRAPPER (Ito na ang gagawin nating sticky) */
.top-header-wrapper {
    position: sticky; 
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex; flex-direction: column;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    transition: transform 0.3s ease; /* BAGONG DAGDAG: Para dumulas pataas */
}

/* BAGONG DAGDAG: Ito ang magtatago sa top bar sa pamamagitan ng pag-slide pataas */
.top-header-wrapper.scrolled {
    transform: translateY(-45px); 
}
.top-sub-bar {
    position: relative;
    z-index: 999;
    width: 100%;
    background: transparent !important;
    border-bottom: none !important;
    padding: 8px 0;
    transition: opacity 0.3s ease; /* Tinanggal natin yung pagpapaliit ng height para di mangatal */
}
.top-sub-bar-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 20px; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    position: relative; 
}

.sub-bar-left { flex: 1; display: flex; justify-content: flex-start; }
.sub-bar-right { flex: 1; display: flex; justify-content: flex-end; }

/* FIX: PINILIT NATIN ANG WIDGET NA BUMALIK SA KALIWA */
#livePlayerWidget {
    position: static !important; /* Binabasag ang lumang rule na humihila sa kanya pa-kanan */
    top: auto !important; right: auto !important; margin: 0 !important;
    width: 150px !important; 
    display: flex !important; flex-direction: column !important;
    background: transparent !important; pointer-events: none;
}

.premium-header-actions {
    display: flex; align-items: center; 
    background: transparent; border: none; box-shadow: none; padding: 0; margin: 0; gap: 15px;
    position: relative; 
    top: 0;             
    right: 0;
}

.premium-icon-group { display: flex; align-items: center; gap: 15px; border-right: 1px solid rgba(255,255,255,0.1); padding-right: 15px; }
.premium-icon-btn { width: 32px; height: 32px; border-radius: 50%; background: transparent; border: none; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 1.05rem; cursor: pointer; position: relative; transition: all 0.2s ease; }
.premium-icon-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.premium-badge { position: absolute; top: -2px; right: -2px; background: #e60000; color: white; font-size: 0.6rem; font-weight: bold; padding: 2px 5px; border-radius: 10px; border: none; box-shadow: none; }

.login-text-btn { background: transparent; border: none; color: #ccc; display: flex; align-items: center; gap: 8px; cursor: pointer; font-family: 'Montserrat', sans-serif; font-size: 0.85rem; font-weight: 600; transition: 0.2s; }
.login-text-btn:hover { color: #fff; }

.premium-user-profile { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 2px 6px; border-radius: 20px; transition: 0.2s; }
.premium-user-profile:hover { background: rgba(255,255,255,0.05); }
.premium-user-text { display: flex; flex-direction: column; align-items: flex-end; }
.premium-username { font-family: 'Montserrat', sans-serif; font-size: 0.85rem; font-weight: 700; color: #fff; line-height: 1; }
.premium-level-badge { background: #e60000; color: #fff; font-size: 0.55rem; font-weight: 800; padding: 2px 4px; border-radius: 3px; letter-spacing: 0.5px; text-transform: uppercase; margin-top: 3px; }
.premium-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid #333; }
.premium-avatar-wrapper { position: relative; display: flex; }
.premium-avatar-wrapper .status-dot { width: 10px; height: 10px; right: -2px; bottom: -2px; border-width: 2px; }

/* ==========================================
   TOP SUB BAR & SCROLL ANIMATION (Dapat nasa LABAS ng Mobile View)
   ========================================== */
.top-sub-bar {
    position: relative;
    z-index: 1002; /* Pinalitan mula 999 para pumatong sa main-header-glass */
    width: 100%;
    background: transparent !important;
    border-bottom: none !important;
    padding: 8px 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 100px; /* Sapat na height para sa content nito */
    opacity: 1;
    overflow: visible !important; /* Pinalitan mula hidden para hindi maputol ang dropdown */
}

/* Ang magha-hide sa top bar kapag nag-scroll */
.top-header-wrapper.scrolled .top-sub-bar {
    opacity: 0;
    pointer-events: none; /* Para hindi ma-click kahit transparent */
}

/* Maglalagay ng anino para mas lutang kapag nag-scroll ka na */
.top-header-wrapper.scrolled .main-header-glass {
    box-shadow: 0 5px 20px rgba(0,0,0,0.6);
}

.main-header-glass {
    position: relative; /* Hindi na kailangang sticky dahil sticky na ang wrapper */
    z-index: 1001;
    background-color: rgba(15, 16, 21, 0.4) !important;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: box-shadow 0.3s ease;
}

.top-header-inner {
    max-width: 1200px; margin: 0 auto; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    min-height: 90px; padding: 10px 20px;
}

.logo { display: flex; align-items: center; flex: 1; }
.logo img { 
    height: 100px; 
    width: auto; 
    display: block; 
    image-rendering: high-quality; 
    box-shadow: none; filter: none; border: none; outline: none; 
}

/* FIX: TABS SA GITNA */
.main-nav { display: flex; align-items: center; justify-content: center; flex: 2; gap: 30px; font-size: 0.9rem; font-weight: 700; letter-spacing: 1px; flex-wrap: wrap; }
.main-nav a { color: #aaa; text-decoration: none; transition: color 0.3s; padding-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.main-nav a:hover, .main-nav a.active { color: #fff; border-bottom: 2px solid #e60000; text-shadow: 0 0 10px rgba(230,0,0,0.5); }
.lock-icon { font-size: 0.7rem; color: #555; transition: 0.3s; }
.main-nav a:hover .lock-icon { color: #ff3333; }
.main-nav a.active .lock-icon { display: none; }

.header-right-spacer { flex: 1; }

/* ==========================================
   PERFECT DESKTOP DROPDOWN ALIGNMENT
   ========================================== */
@media (min-width: 901px) {
    .notif-dropdown {
        position: absolute !important; 
        width: 320px !important; 
        background: #1a1c23 !important;
        border: 1px solid #333 !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.8) !important;
        border-radius: 8px !important;
        z-index: 99999 !important;
    }

    /* 1. PINASIKIP ANG SPACE: Idinikit nang husto sa profile */
    .auth-section {
        width: 120px !important;
        min-width: 120px !important;
        display: flex;
        justify-content: flex-end;
    }
    .premium-username {
        max-width: 80px; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }

    /* 2. PINALIIT ANG GAPS NG MGA ICONS AT BORDER */
    .premium-header-actions { gap: 10px !important; }
    .premium-icon-group { padding-right: 12px !important; gap: 8px !important; }

    /* 3. RECALIBRATED POSITIONS: Binawasan ang 'right' para umusog PAKANAN */
    #notifDropdown { right: 50px !important; top: 60px !important; }
    #inboxDropdown { right: 95px !important; top: 60px !important; }

    /* 4. TATSULOK (TAILS) ALIGNMENT */
    #notifDropdown::before, #inboxDropdown::before { right: 150px !important; border-bottom-color: #333 !important; display: block !important; }
    #notifDropdown::after, #inboxDropdown::after { right: 151px !important; border-bottom-color: #1a1c23 !important; display: block !important; }
}

@media (max-width: 900px) {
    .top-header-inner { flex-direction: column; height: auto; padding: 10px 15px; gap: 10px; align-items: center; }
    .logo img { height: 60px; } 
    
    /* FIX: Paliitin ang spaces at widget para hindi lumagpas sa screen */
    .top-sub-bar-inner { flex-direction: row; justify-content: space-between; align-items: center; gap: 0; padding: 0 5px; }
    #livePlayerWidget { width: 110px !important; }
    #livePlayerWidget span { font-size: 0.65rem !important; }
    
    .sub-bar-left, .sub-bar-right { flex: initial; justify-content: center; }
    
    /* FIX: Pagdikitin ang icons at profile */
    .premium-header-actions { position: relative; top: 0; right: 0; padding: 0; background: transparent; flex-direction: row; gap: 5px; }
    .premium-icon-group { border-right: 1px solid rgba(255,255,255,0.1); padding-right: 5px; gap: 5px; }
    .premium-icon-btn { width: 28px; height: 28px; font-size: 0.95rem; }
    
    /* FIX: Saktuhin ang lapad ng pangalan at avatar */
    .auth-section { 
        padding-left: 5px; 
        max-width: 120px; /* Mas pinasikip para hindi lumagpas sa kanan */
    }
    
    .premium-user-profile { gap: 5px; padding: 2px; }
    .premium-avatar { width: 26px; height: 26px; }
    
    /* DAGDAG ITO: Puputulin ng tuldok-tuldok (...) ang mahabang pangalan sa mobile */
    .premium-username {
        max-width: 60px; /* Pinaliit para saktong mag-fit */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block; 
    }

    .main-nav { justify-content: center; width: 100%; margin-top: 5px; gap: 10px; font-size: 0.75rem; flex-wrap: wrap; }
    .header-right-spacer { display: none; }
    #bgContainer { top: 0; height: 100vh; }
    .top-header-wrapper.scrolled { transform: translateY(-45px); }

    /* FIX SA OVERLAPPING NG NOTIFICATION AT MENU SA MOBILE */
    .top-sub-bar {
        z-index: 9999 !important; 
    }
    .notif-dropdown {
        background: #16181e !important; 
    }
}

/* ==========================================
   MOBILE RESPONSIVENESS PARA SA UPLOAD MODALS
   ========================================== */
@media (max-width: 768px) {
    /* Gawing 1 column ang form inputs sa mobile imbes na magkatabi */
    .form-row { 
        grid-template-columns: 1fr !important; 
        gap: 10px !important; 
    }
    
    /* Paliitin ang padding at font size sa mobile para mag-fit */
    .modal-box { 
        padding: 20px !important; 
        width: 90% !important;
    }
    .premium-admin-header h2 { 
        font-size: 1.2rem !important; 
    }
    
    /* Ayusin ang close button para hindi sumiksik sa title */
    .close-modal {
        top: 10px;
        right: 15px;
    }
}

.tongits-action-btn {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 12px 25px;
    border-radius: 25px;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.4);
    cursor: pointer;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: all 0.1s;
}

.tongits-action-btn:active {
    transform: translateY(4px);
    border-bottom-width: 0px !important;
    margin-top: 4px;
}

.tongits-action-btn:disabled {
    filter: grayscale(100%);
    opacity: 0.5;
    cursor: not-allowed;
}