/* ============================================================
   DZUL019 WORKSPACE — styles.css v4.0 ULTIMATE
   Animasi scroll, tombol, ripple, background, topbar lengkap
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ===== VARIABLES ===== */
:root {
    --brand:   #00d4aa;
    --brand2:  #00f0c8;
    --brand3:  #00ffd5;
    --bg:      #050a0e;
    --bg2:     #0d1117;
    --surface: rgba(13,17,23,0.97);
    --surf2:   rgba(22,30,38,0.95);
    --border:  rgba(0,212,170,0.2);
    --border2: rgba(0,212,170,0.5);
    --text:    #f0f6fc;
    --text2:   rgba(240,246,252,0.72);
    --text3:   rgba(240,246,252,0.4);
    --red:     #ff4b4b;
    --glow:    0 0 20px rgba(0,212,170,0.3);
    --glow2:   0 0 40px rgba(0,212,170,0.55);
    --shadow:  0 18px 45px rgba(0,0,0,0.9);
    --font:    'Inter', system-ui, -apple-system, sans-serif;
    --mono:    'JetBrains Mono', 'Courier New', monospace;
    --ease:    cubic-bezier(0.25,1,0.5,1);
    --ease2:   cubic-bezier(0.16,1,0.3,1);
    --tr:      0.22s var(--ease);
    --sb-w:    272px;
}

html, body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--brand), var(--brand2)); border-radius: 99px; }

/* ===== APP ROOT ===== */
#app-root {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* ============================================================
   MOBILE MENU BUTTON
   ============================================================ */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 8px; left: 8px;
    z-index: 500;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(13,17,23,0.95);
    border: 1px solid var(--border2);
    color: var(--brand);
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.6), var(--glow);
    align-items: center;
    justify-content: center;
    transition: all .22s var(--ease);
    overflow: hidden;
}
.mobile-menu-btn::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(0,212,170,.1);
    opacity: 0; transition: opacity .2s;
    border-radius: 12px;
}
.mobile-menu-btn:hover::after { opacity: 1; }
.mobile-menu-btn:active       { transform: scale(.9); }

/* ============================================================
   SIDEBAR OVERLAY
   ============================================================ */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.72);
    z-index: 400;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0; transition: opacity .3s;
    pointer-events: none;
}
.sidebar-overlay.show { opacity: 1; pointer-events: all; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sb-w);
    min-width: var(--sb-w);
    height: 100vh;
    background: linear-gradient(180deg, rgba(10,14,20,.99) 0%, rgba(7,11,17,.99) 100%);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    display: flex;
    flex-direction: column;
    z-index: 450;
    flex-shrink: 0;
    transition: transform .32s var(--ease2);
    box-shadow: 3px 0 35px rgba(0,0,0,.55);
    overflow: hidden;
    position: relative;
}

/* Sidebar glow accent line */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 100%;
    background: linear-gradient(180deg, transparent, var(--brand), transparent);
    opacity: .4;
}

.sidebar-header {
    padding: 1rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 60px;
    background: rgba(0,212,170,.025);
    position: relative;
}

.sidebar-logo {
    font-family: var(--mono);
    font-weight: 900;
    font-size: 1.15rem;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    filter: drop-shadow(0 0 8px rgba(0,212,170,.35));
}

.sidebar-close-btn {
    display: none;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--text3);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    transition: var(--tr);
}
.sidebar-close-btn:hover  { color: var(--brand); border-color: var(--border); }
.sidebar-close-btn:active { transform: scale(.9); }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .6rem .55rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    -webkit-overflow-scrolling: touch;
}

/* NAV GROUP */
.nav-group { margin-bottom: .6rem; }

.nav-group > summary {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .62rem;
    font-weight: 900;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: .4rem .6rem;
    cursor: pointer;
    list-style: none;
    border-radius: 8px;
    transition: background .15s, opacity .15s;
    opacity: .75;
    user-select: none;
    -webkit-user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::before {
    content: '▸';
    font-size: .55rem;
    display: inline-block;
    transition: transform .2s;
    flex-shrink: 0;
}
.nav-group[open] > summary::before { transform: rotate(90deg); }
.nav-group > summary:hover { background: rgba(0,212,170,.08); opacity: 1; }

/* NAV ITEM */
.nav-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .56rem .7rem;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text2);
    font-size: .8rem;
    font-family: var(--font);
    font-weight: 500;
    cursor: pointer;
    transition: all .18s var(--ease);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
    position: relative;
    overflow: hidden;
}
.nav-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(0,212,170,.1), transparent);
    transform: translateX(-100%);
    transition: transform .4s;
}
.nav-item:hover::after { transform: translateX(100%); }
.nav-item i {
    width: 18px;
    text-align: center;
    font-size: .78rem;
    flex-shrink: 0;
    color: var(--text3);
    transition: color .15s, transform .2s;
}
.nav-item:hover {
    background: rgba(0,212,170,.1);
    color: var(--text);
    transform: translateX(4px);
}
.nav-item:hover i { color: var(--brand); transform: scale(1.15); }
.nav-item:active  { transform: translateX(1px) scale(.97); }
.nav-item.active {
    background: linear-gradient(135deg, rgba(0,212,170,.22), rgba(0,212,170,.1));
    color: var(--brand);
    font-weight: 700;
    border: 1px solid rgba(0,212,170,.3);
    box-shadow: 0 0 16px rgba(0,212,170,.12), inset 0 1px 0 rgba(255,255,255,.06);
}
.nav-item.active i { color: var(--brand); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: transparent;
    position: relative;
}

/* ============================================================
   TOP BAR — JAM / BATTERY / DISCORD WAJIB MUNCUL
   ============================================================ */
.top-bar {
    background: rgba(10,14,20,.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-shrink: 0;
    z-index: 50;
    box-shadow: 0 2px 20px rgba(0,0,0,.4);
    position: relative;
}

/* Glow line bawah top bar */
.top-bar::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    opacity: .4;
    animation: topbarScan 6s ease-in-out infinite;
}
@keyframes topbarScan {
    0%   { transform: scaleX(0); transform-origin: left; }
    50%  { transform: scaleX(1); transform-origin: left; }
    51%  { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

/* Ticker */
.ticker-wrap {
    height: 24px;
    overflow: hidden;
    font-family: var(--mono);
    font-size: .65rem;
    color: var(--brand);
    display: flex;
    align-items: center;
    padding: 0 .85rem;
    border-bottom: 1px solid rgba(255,255,255,.04);
    background: rgba(0,212,170,.02);
    letter-spacing: .3px;
}
.ticker-track {
    white-space: nowrap;
    animation: ticker 38s linear infinite;
    will-change: transform;
}
@keyframes ticker {
    from { transform: translateX(100vw); }
    to   { transform: translateX(-100%); }
}

/* Header widgets row */
.header-widgets {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    padding: .38rem .85rem;
    min-height: 34px;
    flex-wrap: nowrap;
}

/* Battery badge */
.battery-badge {
    display: flex;
    align-items: center;
    gap: .3rem;
    background: rgba(0,212,170,.1);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: .22rem .6rem;
    font-family: var(--mono);
    font-size: .65rem;
    font-weight: 700;
    color: var(--brand);
    flex-shrink: 0;
    transition: border-color .3s;
    white-space: nowrap;
}
.battery-badge i { font-size: .68rem; }

/* Clock badge */
.clock-badge {
    display: flex;
    align-items: center;
    gap: .35rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: .22rem .7rem;
    font-family: var(--mono);
    font-size: .67rem;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
    letter-spacing: .3px;
    white-space: nowrap;
}
.clock-badge i { color: var(--brand); font-size: .65rem; }

/* Discord badge */
.discord-badge {
    display: flex;
    align-items: center;
    gap: .35rem;
    background: rgba(88,101,242,.1);
    border: 1px solid rgba(88,101,242,.22);
    border-radius: 20px;
    padding: .22rem .65rem;
    font-size: .63rem;
    font-family: var(--mono);
    color: var(--text2);
    font-weight: 600;
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}
.discord-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #747f8d;
    flex-shrink: 0;
    animation: dotPulse 2.5s ease-in-out infinite;
}
@keyframes dotPulse {
    0%,100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50%      { opacity: .6; }
}
#discord-text {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

/* ============================================================
   VIEW CONTAINER
   ============================================================ */
.view-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.2rem;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    height: 0; /* flex trick */
    position: relative;
}

/* ============================================================
   GLOBAL TOOL BUTTON FIXES
   Semua tombol Tailwind di tools visible & kontras
   ============================================================ */

/* bg-white/10 terlalu transparan */
.view-container .bg-white\/10,
.view-container [class*="bg-white/1"] {
    background-color: rgba(255,255,255,.22) !important;
}
.view-container .bg-white\/20 {
    background-color: rgba(255,255,255,.3) !important;
}
.view-container .bg-white\/5 {
    background-color: rgba(255,255,255,.14) !important;
}

/* Semua button di tools */
.view-container button {
    opacity: 1 !important;
    min-height: 44px;
    cursor: pointer;
    font-weight: 600;
    transition: all .2s var(--ease);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

/* Brand button */
.view-container .bg-brand {
    background: linear-gradient(135deg, var(--brand), var(--brand2)) !important;
    color: #0a0a0a !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 18px rgba(0,212,170,.4) !important;
}
.view-container .bg-brand:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 25px rgba(0,212,170,.6) !important;
}
.view-container .bg-brand:active {
    transform: scale(.96) !important;
    box-shadow: 0 2px 10px rgba(0,212,170,.3) !important;
}

/* Hover effect semua tombol */
.view-container button:hover  { filter: brightness(1.08); }
.view-container button:active { transform: scale(.96); }

/* Fix flex wrap — tombol tidak terpotong di mobile */
.view-container .flex.gap-2,
.view-container .flex.gap-3,
.view-container .flex.gap-4 {
    flex-wrap: wrap;
}

/* Input fields */
.view-container input[type="text"],
.view-container input[type="url"],
.view-container input[type="email"],
.view-container input[type="number"],
.view-container input[type="password"],
.view-container textarea,
.view-container select {
    font-size: 16px !important;
    width: 100%;
    min-height: 44px;
    background: rgba(0,0,0,.55) !important;
    border: 1px solid rgba(0,212,170,.22) !important;
    border-radius: 12px !important;
    color: #fff !important;
    padding: .75rem 1rem !important;
    outline: none !important;
    transition: border .2s, box-shadow .2s !important;
    font-family: var(--mono) !important;
}
.view-container input:focus,
.view-container textarea:focus,
.view-container select:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px rgba(0,212,170,.12) !important;
    background: rgba(0,0,0,.7) !important;
}
.view-container textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.view-container select {
    cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300d4aa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 2.5rem !important;
}

/* Output / pre */
.view-container pre {
    background: rgba(0,0,0,.65) !important;
    border: 1px solid rgba(0,212,170,.18) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    color: var(--brand2) !important;
    font-family: var(--mono) !important;
    font-size: .8rem !important;
    line-height: 1.65 !important;
    word-break: break-all;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

/* h-full fix */
.view-container .h-full { height: auto !important; min-height: 70vh; }
.view-container > div   { min-height: 100%; height: auto !important; }

/* Padding fix */
.view-container .p-6  { padding: 1rem !important; }
.view-container .p-4  { padding: .85rem !important; }
.view-container .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }

/* Border */
.view-container .border,
.view-container .border-white\/10 { border-color: rgba(0,212,170,.2) !important; }

/* BG cards */
.view-container .bg-black\/50,
.view-container .bg-black\/40 { background: rgba(0,0,0,.55) !important; }

/* Rounded */
.view-container .rounded-2xl { border-radius: 14px !important; }
.view-container .rounded-xl   { border-radius: 10px !important; }
.view-container .rounded-lg   { border-radius: 8px !important; }

/* Red variations */
.view-container .bg-red-500\/20 {
    background: rgba(255,75,75,.2) !important;
    border: 1px solid rgba(255,75,75,.3) !important;
}
.view-container .text-red-400  { color: #ff6b6b !important; }
.view-container .bg-red-500\/30 { background: rgba(255,75,75,.3) !important; }

/* Text colors */
.view-container .text-brand { color: var(--brand) !important; }
.view-container .text-white  { color: #fff !important; }

/* ============================================================
   ERROR STATE
   ============================================================ */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    min-height: 220px;
    color: var(--red);
    font-size: .9rem;
    line-height: 1.65;
    gap: .6rem;
}
.error-state small { color: var(--text3); font-size: .75rem; font-family: var(--mono); }
.error-state button {
    margin-top: 1rem;
    padding: .75rem 1.6rem;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    color: #0a0a0a;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    font-size: .82rem;
    box-shadow: 0 4px 18px rgba(0,212,170,.35);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.db-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* Hero */
.db-hero {
    background: linear-gradient(135deg, rgba(0,212,170,.07) 0%, rgba(13,17,23,.98) 65%);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 2.2rem 1.8rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
    animation: heroAppear .7s var(--ease2) both;
}
@keyframes heroAppear {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}
.db-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(0,212,170,.1) 0%, transparent 70%);
    animation: heroOrb 8s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes heroOrb {
    from { transform: translate(0,0) scale(1); }
    to   { transform: translate(-30px,20px) scale(1.3); }
}
.db-hero::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    animation: heroScan 5s ease-in-out infinite;
}
@keyframes heroScan { 0%{left:-100%} 50%{left:200%} 100%{left:200%} }

.db-hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, var(--brand2) 55%, var(--brand3) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    letter-spacing: -.5px;
    margin-bottom: .3rem;
    position: relative; z-index: 1;
}
.db-hero-sub {
    font-size: .78rem; color: var(--text3);
    margin-bottom: 1.6rem;
    font-family: var(--mono); letter-spacing: 1px;
    position: relative; z-index: 1;
}

/* WEB UTAMA button */
.db-utama {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    background: linear-gradient(135deg, #001f18, #002d21, #001f18);
    background-size: 200% 200%;
    border: 1px solid rgba(0,212,170,.6);
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    font-weight: 900;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    animation: gradBG 4s linear infinite;
    box-shadow: 0 0 40px rgba(0,212,170,.18), inset 0 1px 0 rgba(0,212,170,.15);
    transition: all .25s var(--ease2);
    z-index: 1;
    width: 100%; max-width: 480px;
}
@keyframes gradBG {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.db-utama::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(0,212,170,.18), transparent);
    transform: translateX(-100%);
    animation: utamaShine 3s ease-in-out infinite;
}
@keyframes utamaShine { 0%{transform:translateX(-100%)} 50%,100%{transform:translateX(200%)} }
.db-utama:hover {
    border-color: rgba(0,212,170,.9);
    box-shadow: 0 0 60px rgba(0,212,170,.4);
    transform: translateY(-2px);
}
.db-utama:active { transform: scale(.97); }

.db-utama-icon {
    width: 44px; height: 44px;
    border-radius: 13px;
    background: rgba(0,212,170,.18);
    border: 1px solid rgba(0,212,170,.5);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: var(--brand);
    flex-shrink: 0;
    animation: iconPulse 2s ease-in-out infinite;
}
@keyframes iconPulse {
    0%,100% { box-shadow: 0 0 12px rgba(0,212,170,.3); }
    50%      { box-shadow: 0 0 28px rgba(0,212,170,.7); }
}
.db-utama-body  { display: flex; flex-direction: column; gap: 3px; }
.db-utama-label { font-size: .6rem; color: var(--brand2); letter-spacing: 2.5px; font-weight: 700; font-family: var(--mono); }
.db-utama-name  { font-size: .92rem; font-weight: 900; letter-spacing: .8px; }
.db-utama-arrow { margin-left: auto; color: var(--brand); font-size: 1.1rem; animation: arrPulse 1.5s ease-in-out infinite; flex-shrink: 0; }
@keyframes arrPulse {
    0%,100% { transform: translateX(0); opacity: .7; }
    50%      { transform: translateX(5px); opacity: 1; }
}

/* Stats row */
.db-stats {
    display: flex;
    gap: .65rem;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
}
.db-stat {
    flex: 1;
    min-width: 70px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .85rem .75rem;
    text-align: center;
    transition: all .25s var(--ease2);
    animation: fadeUp .6s var(--ease2) both;
}
.db-stat:nth-child(1) { animation-delay: .1s; }
.db-stat:nth-child(2) { animation-delay: .15s; }
.db-stat:nth-child(3) { animation-delay: .2s; }
.db-stat:nth-child(4) { animation-delay: .25s; }
.db-stat:hover {
    border-color: rgba(0,212,170,.4);
    transform: translateY(-3px);
    box-shadow: var(--glow);
}
.db-stat-num { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 900; color: var(--brand); display: block; }
.db-stat-lbl { font-size: .6rem; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; display: block; }

/* Live bar */
.db-live {
    background: rgba(0,212,170,.04);
    border: 1px solid rgba(0,212,170,.15);
    border-radius: 12px;
    padding: .85rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    animation: fadeUp .6s .3s var(--ease2) both;
}
.db-live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand);
    flex-shrink: 0;
    animation: liveBlip 1.2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--brand);
}
@keyframes liveBlip { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.7)} }
.db-live-text {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-live-text span { color: var(--brand); font-weight: 700; }

/* Section title */
.db-section-title {
    font-size: .63rem;
    font-weight: 900;
    color: rgba(0,212,170,.7);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: .8rem;
    padding-left: .2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    animation: fadeUp .5s .35s var(--ease2) both;
}
.db-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0,212,170,.25), transparent);
}

/* Quick cards grid */
.db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.db-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem .9rem;
    text-align: center;
    cursor: pointer;
    transition: all .25s var(--ease2);
    color: var(--text);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    min-height: 95px;
    user-select: none;
    animation: fadeUp .5s both;
}

/* Stagger card animations */
.db-card:nth-child(1)  { animation-delay: .06s; }
.db-card:nth-child(2)  { animation-delay: .09s; }
.db-card:nth-child(3)  { animation-delay: .12s; }
.db-card:nth-child(4)  { animation-delay: .15s; }
.db-card:nth-child(5)  { animation-delay: .18s; }
.db-card:nth-child(6)  { animation-delay: .21s; }
.db-card:nth-child(7)  { animation-delay: .24s; }
.db-card:nth-child(8)  { animation-delay: .27s; }
.db-card:nth-child(9)  { animation-delay: .30s; }
.db-card:nth-child(10) { animation-delay: .33s; }
.db-card:nth-child(11) { animation-delay: .36s; }
.db-card:nth-child(12) { animation-delay: .39s; }
.db-card:nth-child(13) { animation-delay: .42s; }

/* Shimmer line on hover */
.db-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    transition: left .5s;
}
.db-card:hover::before { left: 100%; }

/* Background glow sweep */
.db-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,212,170,.12) 0%, transparent 65%);
    opacity: 0;
    transition: opacity .3s;
}
.db-card:hover::after { opacity: 1; }

.db-card:hover {
    border-color: rgba(0,212,170,.55);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 35px rgba(0,0,0,.65), var(--glow);
}
.db-card:active {
    transform: translateY(-2px) scale(.97);
    box-shadow: 0 5px 15px rgba(0,0,0,.5);
}
.db-card-icon {
    font-size: 1.45rem;
    color: var(--brand);
    margin-bottom: .55rem;
    display: block;
    transition: transform .25s var(--ease2);
    position: relative; z-index: 1;
}
.db-card:hover .db-card-icon { transform: scale(1.22) rotate(-5deg); }
.db-card-title { font-weight: 700; font-size: .8rem; margin-bottom: .2rem; line-height: 1.25; position: relative; z-index: 1; }
.db-card-sub   { font-size: .63rem; color: var(--text3); line-height: 1.35; position: relative; z-index: 1; }

/* ============================================================
   SOCIAL LINKS PAGE
   ============================================================ */
.sl-wrap { max-width: 540px; margin: 0 auto; padding-bottom: 2rem; }
.sl-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem; font-weight: 900; text-align: center;
    background: linear-gradient(135deg, #fff, var(--brand));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 1.5rem;
    animation: fadeUp .5s var(--ease2) both;
}
.sl-item {
    display: flex; align-items: center; gap: .9rem;
    padding: .95rem 1.1rem;
    border-radius: 14px; border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: .7rem;
    text-decoration: none; color: var(--text);
    transition: all .25s var(--ease2);
    min-height: 64px;
    -webkit-tap-highlight-color: transparent;
    position: relative; overflow: hidden;
    animation: fadeUp .5s var(--ease2) both;
}
.sl-item:nth-child(1) { animation-delay: .05s; }
.sl-item:nth-child(2) { animation-delay: .1s; }
.sl-item:nth-child(3) { animation-delay: .15s; }
.sl-item:nth-child(4) { animation-delay: .2s; }
.sl-item:nth-child(5) { animation-delay: .25s; }
.sl-item:nth-child(6) { animation-delay: .3s; }
.sl-item::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(0,212,170,.06), transparent);
    transform: translateX(-100%); transition: transform .45s;
}
.sl-item:hover::before { transform: translateX(100%); }
.sl-item:hover { border-color: rgba(0,212,170,.5); transform: translateX(6px); box-shadow: 0 5px 22px rgba(0,0,0,.4), var(--glow); }
.sl-item:active { transform: translateX(2px) scale(.99); }
.sl-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(0,212,170,.12); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: var(--brand);
    flex-shrink: 0; transition: var(--tr);
}
.sl-item:hover .sl-icon { background: rgba(0,212,170,.22); box-shadow: var(--glow); transform: scale(1.1); }
.sl-label { flex: 1; font-weight: 600; font-size: .87rem; }
.sl-arrow { color: var(--text3); transition: var(--tr); }
.sl-item:hover .sl-arrow { color: var(--brand); transform: translateX(4px); }

/* ============================================================
   GAMES PAGE
   ============================================================ */
.gm-wrap { max-width: 720px; margin: 0 auto; padding-bottom: 2rem; }
.gm-title { font-family: 'Orbitron', sans-serif; font-size: 1.6rem; font-weight: 900; color: var(--text); margin-bottom: .3rem; }
.gm-sub   { font-size: .8rem; color: var(--text3); margin-bottom: 1.5rem; }
.gm-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: .85rem; }
.gm-card  {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.3rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    display: block;
    transition: all .25s var(--ease2);
    -webkit-tap-highlight-color: transparent;
    animation: fadeUp .5s var(--ease2) both;
    position: relative; overflow: hidden;
}
.gm-card:hover { border-color: rgba(0,212,170,.5); transform: translateY(-4px); background: rgba(0,212,170,.07); box-shadow: 0 12px 30px rgba(0,0,0,.5), var(--glow); }
.gm-card:active { transform: scale(.97); }
.gm-card i { font-size: 2rem; display: block; margin-bottom: .6rem; transition: transform .25s; }
.gm-card:hover i { transform: scale(1.2) rotate(-5deg); }
.gm-card b { font-size: .85rem; display: block; margin-bottom: .2rem; }
.gm-card span { font-size: .65rem; color: var(--text3); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    color: #0a0a0a;
    padding: .7rem 1.3rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: .82rem;
    z-index: 9999;
    animation: toastIn .3s var(--ease2) forwards;
    box-shadow: 0 4px 22px rgba(0,212,170,.5);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(18px) scale(.95); }
    to   { opacity: 1; transform: none; }
}

/* ============================================================
   SHARED ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE — MOBILE FIRST
   ============================================================ */

/* Tablet + Mobile (≤1024px) */
@media (max-width: 1024px) {
    .mobile-menu-btn   { display: flex; }
    .sidebar-close-btn { display: flex; }
    .sidebar-overlay   { display: block; }

    .sidebar {
        position: fixed;
        left: 0; top: 0; height: 100%;
        transform: translateX(-100%);
        z-index: 450;
        width: min(var(--sb-w), 88vw);
        min-width: unset;
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 100px rgba(0,0,0,.95), var(--glow);
    }

    .main-content { width: 100%; }
    .ticker-wrap  { padding-left: 3.6rem; font-size: .62rem; }
    .header-widgets { padding: .3rem .7rem; gap: .4rem; }
    .discord-badge  { max-width: 110px; }
    #discord-text   { max-width: 70px; }
    .view-container { padding: .85rem; }

    .db-hero  { padding: 1.6rem 1.2rem 1.5rem; border-radius: 18px; }
    .db-grid  { grid-template-columns: repeat(3,1fr); gap: .65rem; }
    .db-card  { padding: .9rem .65rem; min-height: 88px; border-radius: 12px; }
    .db-card-icon  { font-size: 1.25rem; }
    .db-card-title { font-size: .75rem; }
    .db-card-sub   { font-size: .6rem; }
    .db-utama { padding: 1rem 1.1rem; gap: .85rem; max-width: 100%; }
    .db-utama-name { font-size: .85rem; }
    .gm-grid  { grid-template-columns: repeat(2,1fr); }

    .view-container .p-6  { padding: .85rem !important; }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .view-container { padding: .7rem; }
    .db-hero-title  { font-size: 1.55rem; }
    .db-hero        { padding: 1.4rem 1rem 1.3rem; }
    .db-stats       { gap: .5rem; }
    .db-stat        { padding: .75rem .6rem; }
    .db-stat-num    { font-size: 1.05rem; }
    .db-grid        { grid-template-columns: repeat(3,1fr); gap: .55rem; }
    .db-card        { padding: .8rem .5rem; min-height: 82px; }
    .db-card-icon   { font-size: 1.15rem; margin-bottom: .4rem; }
    .db-card-title  { font-size: .7rem; }
    .db-card-sub    { display: none; }
    .header-widgets { gap: .3rem; }
    .battery-badge  { padding: .18rem .5rem; font-size: .6rem; }
    .clock-badge    { padding: .18rem .55rem; font-size: .62rem; }
    .discord-badge  { display: none; }
    .ticker-wrap    { font-size: .58rem; padding-left: 3.4rem; }
}

/* Extra small (≤360px) */
@media (max-width: 360px) {
    .db-grid     { grid-template-columns: repeat(2,1fr); }
    .db-card-sub { display: none; }
    .battery-badge { display: none; }
}

/* Desktop (>1024px) */
@media (min-width: 1025px) {
    .mobile-menu-btn   { display: none; }
    .sidebar-close-btn { display: none; }
    .sidebar-overlay   { display: none; }
    .sidebar {
        position: relative;
        transform: none !important;
        height: 100vh;
        width: var(--sb-w);
        min-width: var(--sb-w);
    }
    .view-container { padding: 1.4rem; }
    .ticker-wrap    { padding-left: .85rem; }
}

/* ============================================================
   iOS SAFE AREA
   ============================================================ */
@supports (-webkit-touch-callout: none) {
    input[type="text"], input[type="email"], input[type="url"],
    input[type="number"], input[type="password"],
    input[type="search"], select, textarea {
        font-size: 16px !important;
    }
}
@supports (padding: max(0px)) {
    .sidebar { padding-bottom: env(safe-area-inset-bottom); }
    .view-container { padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); }
    .mobile-menu-btn {
        top:  max(8px, env(safe-area-inset-top));
        left: max(8px, env(safe-area-inset-left));
    }
}

/* ============================================================
   BACKGROUND CANVAS VISIBILITY FIX
   Make sure particle canvas shows through the UI
   ============================================================ */
body, html { background: #050a0e; }

#app-root { background: transparent !important; }
.main-content { background: transparent !important; }
.view-container { background: transparent !important; }

/* Tool-page fade-in animation */
@keyframes toolEnter {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.view-container > * {
    animation: toolEnter .35s cubic-bezier(.16,1,.3,1) both;
}

/* Floating particles glow on bg-canvas */
#bg-canvas {
    opacity: .85;
}

