body { margin: 0; background-color: #0f0f0f; color: #fff; font-family: sans-serif; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

header { position: relative; background: #0a0a0a; padding: 15px 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; border-bottom: 1px solid #222; flex-shrink: 0; z-index: 10; cursor: pointer; transition: background 0.2s; }
header:hover { background: #111; }

.memes-btn { position: absolute; left: 20px; top: 12px; background: #7289da; color: white; text-decoration: none; padding: 8px 15px; border-radius: 5px; font-size: 0.85em; font-weight: bold; transition: background 0.2s; z-index: 20; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.memes-btn:hover { background: #5b6eae; transform: translateY(-1px); }
.memes-btn svg { width: 16px; height: 16px; }

.sys-panel { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; font-size: 0.75em; color: #666; width: 100%; margin-top: 5px; }
.sys-panel > span { display: flex; gap: 5px; white-space: nowrap; }
.sys-panel span span { color: #aaa; font-family: monospace; }

.advanced-telemetry { display: none; width: 100%; max-width: 900px; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #333; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; font-size: 0.8em; color: #888; text-align: left; cursor: default; }
header.expanded .advanced-telemetry { display: grid; }

.telemetry-group { display: flex; flex-direction: column; gap: 8px; }
.telemetry-title { color: #7289da; font-weight: bold; text-transform: uppercase; font-size: 0.85em; margin-bottom: 5px; }
.telemetry-row { display: flex; justify-content: space-between; border-bottom: 1px solid #1a1a1a; padding-bottom: 3px; }
.telemetry-row span.val { color: #ccc; font-family: monospace; }
.telemetry-row span.status-ok { color: #43b581; font-weight: bold; }

.main-wrapper { flex: 1; overflow-y: auto; padding-bottom: 60px; }

#view-server { display: block; }
#view-users { display: none; }
#view-user-detail { display: none; }
#view-login { display: none; padding: 40px 20px; justify-content: center; align-items: center; min-height: 50vh; }

.bottom-nav-wrapper { position: fixed; bottom: 0; left: 0; width: 100%; display: flex; justify-content: flex-start; pointer-events: none; z-index: 100; padding-left: 15px; }
.bottom-nav { background: #121212; border: 1px solid #333; border-bottom: none; border-radius: 12px 12px 0 0; display: inline-flex; pointer-events: auto; box-shadow: 0 -4px 15px rgba(0,0,0,0.5); overflow: hidden; }
.nav-container { display: flex; }
.nav-btn { background: transparent; border: none; color: #888; font-weight: bold; font-size: 0.9em; cursor: pointer; padding: 10px 20px; transition: all 0.2s; border-top: 3px solid transparent; outline: none; }
.nav-btn:hover { background: #1a1a1a; color: #ddd; }

#btn-main-server.active { color: #7289da; border-top-color: #7289da; background: #1a1a1a; }
#btn-main-users.active { color: #43b581; border-top-color: #43b581; background: #1a1a1a; }
#btn-main-login.active { color: #f1c40f; border-top-color: #f1c40f; background: #1a1a1a; }

#btn-ctx-server:hover { color: #7289da; border-top-color: #7289da; background: #1a1a1a; }
#btn-sub-ach.active { color: #faa61a; border-top-color: #faa61a; background: #1a1a1a; }
#btn-sub-stats.active { color: #eb459e; border-top-color: #eb459e; background: #1a1a1a; }

.global-bar { background: #121212; display: flex; justify-content: space-around; padding: 10px 15px; border-bottom: 1px solid #333; font-size: 0.8em; color: #7289da; flex-wrap: wrap; gap: 10px; }
.global-item { text-align: center; min-width: 100px; flex: 1; }
.global-val { display: block; color: #fff; font-weight: bold; font-size: 1.1em; margin-top: 3px; text-transform: none; }

.ticker-wrap { width: 100%; overflow: hidden; background: #080808; border-bottom: 1px solid #222; padding: 8px 0; box-sizing: border-box; }
.ticker-move { display: inline-block; white-space: nowrap; animation: ticker linear infinite; }
.ticker-item { display: inline-block; padding: 0 40px; font-size: 0.85em; color: #ccc; }
@keyframes ticker { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }

.heatmap-wrapper { overflow-x: auto; width: 100%; padding-bottom: 10px; }
.heatmap-grid { display: grid; grid-template-columns: 35px repeat(24, minmax(15px, 25px)); gap: 4px; justify-content: start; margin-top: 10px; }
.hm-cell { height: 15px; width: 100%; border-radius: 2px; background: #1a1a1a; transition: transform 0.1s, background 0.2s; position: relative; cursor: pointer; }
.hm-cell:hover { transform: scale(1.2); z-index: 5; box-shadow: 0 0 5px rgba(0,0,0,0.5); }
.hm-label { height: auto; display: flex; align-items: center; justify-content: center; color: #666; font-size: 0.75em; background: transparent !important; cursor: default; }
.hm-cell:hover.hm-label { transform: none; box-shadow: none; }
.heatmap-info { text-align: center; font-size: 0.85em; color: #555; margin-top: 8px; font-weight: bold; min-height: 1.2em; }

.cal-controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 15px; }
.cal-controls select { background: #111; color: #ccc; border: 1px solid #333; padding: 5px 10px; border-radius: 4px; cursor: pointer; outline: none; }

.user-grid { padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; align-content: start; }
.user-card { background: #202020; border: 1px solid #333; border-radius: 8px; padding: 15px; text-align: center; cursor: pointer; transition: transform 0.2s, background 0.2s, border-color 0.2s; display: flex; flex-direction: column; align-items: center; }
.user-card:hover { transform: translateY(-5px); background: #2a2a2a; border-color: #7289da; }
.avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; border: 2px solid #444; transition: all 0.3s ease; }
.user-info { width: 100%; overflow: hidden; }
.username { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; color: #fff; }
.online-time { font-size: 0.8em; color: #aaa; }
.last-seen { font-size: 0.7em; color: #555; margin-top: 8px; }

.profile-header { background: #141414; padding: 30px; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: space-between; gap: 25px; flex-wrap: wrap; }
.profile-info { display: flex; align-items: center; gap: 25px; flex: 1; }
.profile-info img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid #555; }
.profile-info h2 { margin: 0; font-size: 2.5em; color: #fff; word-break: break-all; }
.logout-btn { background: #f04747; color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background 0.2s; display: none; }
.logout-btn:hover { background: #d83c3c; }

.stats-grid { 
    column-count: auto; 
    column-width: 320px; 
    column-gap: 20px; 
    padding: 20px; 
    display: block; 
}
.stats-grid .stat-category { 
    margin: 0 0 20px 0; 
    break-inside: avoid; 
    display: inline-block; 
    width: 100%; 
    background: #202020; 
    border: 1px solid #333; 
    border-radius: 8px; 
    padding: 20px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    box-sizing: border-box; 
} 

.stat-category { background: #202020; border: 1px solid #333; border-radius: 8px; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.section-title { color: #7289da; font-weight: bold; margin-bottom: 15px; text-transform: uppercase; font-size: 0.85em; letter-spacing: 1px; border-bottom: 1px solid #333; padding-bottom: 8px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #2a2a2a; font-size: 0.9em; gap: 15px; }
.stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.stat-value { font-weight: bold; color: #ddd; text-align: right; }

.chart-container { position: relative; height: 250px; width: 100%; }

@media (max-width: 768px) { 
    header { padding: 15px 10px; }
    .memes-btn { position: static; margin-bottom: 12px; }
    .sys-panel { gap: 10px; font-size: 0.7em; margin-top: 0; }
    .global-bar { padding: 8px; gap: 5px; }
    .global-item { min-width: 30%; font-size: 0.75em; margin-bottom: 5px;}
    
    .profile-header { flex-direction: column; text-align: center; }
    .profile-info { flex-direction: column; }
    .profile-info h2 { font-size: 1.8em; }
    .logout-btn { width: 100%; }
    
    .stats-grid { column-count: 1; padding: 15px; }
    .stat-category { margin-bottom: 15px; padding: 15px; }
    
    .nav-btn { padding: 10px 15px; font-size: 0.8em; }
}