:root {
    --bg-base: #05070a;
    --panel-bg: rgba(13, 18, 28, 0.95);
    --panel-border: rgba(255, 255, 255, 0.08);
    --neon-green: #00ff88;
    --neon-purple: #9945FF;
    --neon-pink: #d946ef;
    --neon-yellow: #f1c40f;
    --text-primary: #ffffff;
    --text-muted: #808e9b;
    --danger: #ff4757;
    --radius-lg: 16px;
    --radius-md: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; }

body { background-color: var(--bg-base); color: var(--text-primary); min-height: 100vh; padding-bottom: 90px; }

/* Navbar & Top Bar */
.announcement-bar { background: #090e17; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 8px 12px; font-size: 0.75rem; }
.announcement-wrapper { display: flex; align-items: center; gap: 8px; }
.live-pill { background: rgba(0, 255, 136, 0.15); color: var(--neon-green); border: 1px solid var(--neon-green); font-weight: 800; font-size: 0.6rem; padding: 2px 6px; border-radius: 20px; }
.pulse-dot { width: 5px; height: 5px; background-color: var(--neon-green); border-radius: 50%; box-shadow: 0 0 6px var(--neon-green); display: inline-block; }
.announcement-msg { color: var(--text-muted); font-weight: 500; }

.navbar { background: rgba(5, 7, 10, 0.95); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.brand-name { font-weight: 800; font-size: 1rem; color: #fff; text-decoration: none; }
.brand-name .highlight { color: var(--neon-green); }

.nav-right { display: flex; align-items: center; gap: 8px; }
.price-widget { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; }
.widget-label { color: var(--text-muted); font-weight: 600; }
.widget-value { color: var(--neon-green); font-weight: 800; }

.btn-discord { background: #5865F2; color: #fff; border: none; padding: 8px 12px; border-radius: var(--radius-md); font-weight: 700; font-size: 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.user-card { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 4px 10px; border-radius: 20px; cursor: pointer; }
.user-avatar { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--neon-green); }
.user-name-text { font-size: 0.75rem; font-weight: 700; }

.dropdown-menu { display: none; position: absolute; top: 50px; right: 14px; background: #0b0f19; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-md); flex-direction: column; z-index: 200; width: 160px; overflow: hidden; }
.dropdown-link { background: none; border: none; color: #fff; padding: 10px; text-align: left; font-size: 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.dropdown-link:hover { background: rgba(255,255,255,0.05); }
.admin-color { color: var(--neon-green); }

/* App Views Layout */
.main-content { max-width: 1000px; margin: 15px auto; padding: 0 12px; }
.tab-page { display: none; }
.tab-page.active { display: block; }

.glass-panel { background: var(--panel-bg); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 20px; }
.panel-head h2 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.badge-count { font-size: 0.7rem; background: rgba(255, 255, 255, 0.05); padding: 2px 8px; border-radius: 10px; color: var(--text-muted); }

/* Dynamic Coin Cards */
.coin-list-container { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.coin-card { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: var(--radius-md); padding: 12px; display: flex; align-items: center; justify-content: space-between; }
.coin-card-left { display: flex; align-items: center; gap: 12px; }
.coin-rank { font-size: 0.85rem; font-weight: 800; color: var(--text-muted); width: 20px; }
.coin-details h4 { font-size: 0.95rem; font-weight: 800; }
.coin-meta { display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.tier-pill { font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; font-weight: 800; text-transform: uppercase; }
.tier-pill.tier1 { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tier-pill.tier2 { background: rgba(0, 255, 136, 0.15); color: var(--neon-green); border: 1px solid var(--neon-green); }
.tier-pill.koth { background: rgba(153, 69, 255, 0.2); color: var(--neon-purple); border: 1px solid var(--neon-purple); }

.coin-card-right { display: flex; align-items: center; gap: 10px; }

/* Hero Spotlight */
.hero-spotlight { background: linear-gradient(135deg, rgba(153, 69, 255, 0.2), rgba(0, 255, 136, 0.05)); border: 1px solid var(--neon-purple); border-radius: var(--radius-lg); padding: 20px; position: relative; }
.spotlight-badge { position: absolute; top: -10px; left: 16px; background: var(--neon-purple); color: #fff; font-size: 0.65rem; font-weight: 800; padding: 2px 8px; border-radius: 12px; }
.spotlight-content { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }

/* Forms & Controls */
.form-control { margin-bottom: 12px; }
.form-control label { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.form-control input, .form-control select, textarea { width: 100%; padding: 12px; background: #080c14; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-md); color: #fff; font-size: 0.85rem; }

.wallet-status-box { background: rgba(255, 255, 255, 0.03); border: 1px dashed rgba(255, 255, 255, 0.15); padding: 10px; border-radius: var(--radius-md); font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; text-align: center; }

/* Buttons */
.btn-neon { background: var(--neon-green); color: #000; border: none; padding: 8px 14px; border-radius: var(--radius-md); font-weight: 800; font-size: 0.8rem; cursor: pointer; }
.btn-secondary { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15); padding: 10px; border-radius: var(--radius-md); font-weight: 700; cursor: pointer; font-size: 0.8rem; }
.btn-pay { width: 100%; background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink)); color: #fff; border: none; padding: 14px; border-radius: var(--radius-md); font-weight: 800; font-size: 0.9rem; cursor: pointer; }

/* Legal Content Styling */
.legal-content h2 { font-size: 1.2rem; margin-bottom: 6px; }
.legal-content hr { border: none; border-bottom: 1px solid rgba(255,255,255,0.08); margin: 12px 0; }
.legal-content h3 { font-size: 0.9rem; margin-top: 14px; margin-bottom: 4px; color: var(--neon-green); }
.legal-content p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* Footer */
.footer { text-align: center; padding: 20px 10px; color: var(--text-muted); font-size: 0.75rem; }
.footer-links { margin-top: 6px; display: flex; justify-content: center; gap: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* Mobile Bottom Navigation Bar */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(5, 7, 10, 0.98); border-top: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(12px); display: flex; justify-content: space-around; padding: 8px 0; z-index: 999; }
.nav-item { background: none; border: none; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 0.65rem; font-weight: 700; cursor: pointer; width: 20%; }
.nav-item i { font-size: 1rem; }
.nav-item.active { color: var(--neon-green); }

/* Modals */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 1000; padding: 10px; }
.modal-container { background: #0b0f19; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-lg); width: 100%; height: 85vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-large { max-width: 550px; height: auto; max-height: 85vh; }
.modal-header { padding: 12px 16px; background: rgba(255, 255, 255, 0.02); border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 700; }
.btn-icon-close { background: rgba(255, 71, 87, 0.2); color: var(--danger); border: 1px solid var(--danger); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; }
.modal-body-chart { flex: 1; }
.modal-body-chart iframe { width: 100%; height: 100%; border: none; }
.modal-body-padding { padding: 16px; overflow-y: auto; }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 10px; }
.admin-tab-btn { background: transparent; border: none; color: var(--text-muted); font-weight: 700; font-size: 0.75rem; cursor: pointer; padding: 6px 10px; border-radius: 6px; }
.admin-tab-btn.active { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-sub-page { display: none; }
.admin-sub-page.active { display: block; }

.hidden { display: none !important; }
.full-width { width: 100%; }
.text-neon-green { color: var(--neon-green); }
.text-neon-purple { color: var(--neon-purple); }
.text-neon-pink { color: var(--neon-pink); }
.text-neon-yellow { color: var(--neon-yellow); }

@media (min-width: 768px) {
    .hide-mobile { display: inline; }
    .spotlight-content { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (max-width: 767px) {
    .hide-mobile { display: none; }
}

/* Page Transition Spinner */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 10, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.page-loader.hidden {
    display: none !important;
    opacity: 0;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--neon-green);
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}

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