:root {
    --bg-base: #000000;
    --bg-surface: #111111;
    --border-color: #333333;
    --text-primary: #ffffff;
    --text-meta: #888888;
    --accent: #00ff00; /* Lab/Terminal green */
    --font-mono: 'IBM Plex Mono', monospace, 'Courier New', Courier;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 13px;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar: High Density */
.sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h1 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.search-box {
    padding: 12px;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
}

.search-box input {
    flex: 1;
    background: #000;
    border: 1px solid var(--border-color);
    padding: 6px 8px;
    color: #fff;
    font-size: 12px;
}

.search-box button {
    background: #222;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.search-box button:hover { background: #333; }

.user-list-container {
    flex: 1;
    overflow-y: auto;
}

.user-list-container h3 {
    padding: 8px 16px;
    font-size: 11px;
    color: var(--text-meta);
    text-transform: uppercase;
}

#user-list li {
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 1px solid #1a1a1a;
    transition: background 0.1s;
}

#user-list li:hover { background: #1a1a1a; }
#user-list li.active { background: #222; border-left: 2px solid var(--accent); }

.user-item-name { display: block; font-weight: 600; font-family: var(--font-mono); }
.user-item-name.deleted { text-decoration: line-through; color: #ff4444; opacity: 0.6; }
.deleted-tag { font-size: 8px; background: #ff4444; color: #fff; padding: 1px 4px; border-radius: 2px; margin-left: 4px; vertical-align: middle; text-transform: uppercase; font-family: var(--font-mono); }
.user-item-meta { font-size: 11px; color: var(--text-meta); }

.status-indicator {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #555; }

/* Main Content: Raw & Fast */
.main-content {
    flex: 1;
    background: var(--bg-base);
    overflow-y: auto;
    padding: 24px;
}

.hidden { display: none !important; }

/* Compact Profile Header */
.profile-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.profile-pic-wrapper img {
    width: 100px;
    height: 100px;
    border: 1px solid var(--border-color);
    object-fit: cover;
}

.profile-info-main h2 { font-size: 20px; font-family: var(--font-mono); }
.full-name { color: var(--text-meta); margin-bottom: 12px; }

.stats-container { display: flex; gap: 24px; margin-bottom: 12px; }
.stat-box .v { font-weight: 700; font-family: var(--font-mono); }
.stat-box .l { font-size: 11px; color: var(--text-meta); text-transform: uppercase; }

.bio-box { font-size: 12px; color: #ccc; max-width: 800px; white-space: pre-wrap; }
.deleted-warning { background: rgba(255, 68, 68, 0.1); border: 1px solid #ff4444; color: #ff4444; padding: 12px 16px; margin-bottom: 24px; font-family: var(--font-mono); font-weight: bold; display: flex; align-items: center; gap: 12px; }
.deleted-warning span { font-size: 18px; }

/* Functional Tabs */
.tab-nav {
    display: flex;
    gap: 1px;
    background: var(--border-color);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.tab-nav button {
    background: #000;
    border: none;
    color: var(--text-meta);
    padding: 8px 24px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.tab-nav button.active { background: #222; color: var(--accent); }

/* High-Density Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.media-card {
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    overflow: hidden;
    cursor: pointer;
}

.card-media { width: 100%; aspect-ratio: 1/1; position: relative; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; }

.type-tag {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 800;
    border: 1px solid #333;
}

.carousel-tag { 
    border-color: #00ffff; /* Cyan for carousel visibility */
    color: #00ffff; 
    background: rgba(0, 40, 40, 0.9);
}

.carousel-info-dots {
    position: absolute;
    bottom: 8px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4px;
    pointer-events: none;
}

.dot {
    width: 4px;
    height: 4px;
    background: #555;
    border-radius: 50%;
}

.dot.active { background: #00ffff; }

.card-info { padding: 8px; }
.card-stats { 
    display: flex; 
    justify-content: space-between; 
    font-size: 10px; 
    font-family: var(--font-mono); 
    gap: 4px;
}
.card-title { font-size: 10px; color: var(--text-meta); margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Modal: Simple Overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: flex;
}

.modal-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.modal-media-view {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative; /* CRITICAL for absolute nav controls */
}

.modal-media-view img, .modal-media-view video { max-width: 100%; max-height: 100%; }

/* Carousel Controls */
.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    transform: translateY(-50%);
}

.modal-nav button {
    pointer-events: auto;
    background: rgba(0,0,0,0.8);
    border: 1px solid #444;
    color: #fff;
    width: 50px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    font-family: var(--font-mono);
    transition: all 0.1s;
}

.modal-nav button:hover { background: #222; border-color: var(--accent); }
.modal-nav button:disabled { opacity: 0.1; cursor: default; }

.carousel-counter {
    position: absolute;
    bottom: 20px;
    background: rgba(0,0,0,0.8);
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    border: 1px solid var(--border-color);
}

.modal-aside {
    width: 400px;
    background: #111;
    border-left: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #fff;
    z-index: 1001;
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-meta);
}
