:root {
    --bg-dark: #0e1015;
    --bg-panel: #161922;
    --bg-card: #1e2230;
    --bg-card-active: #272c3d;
    --accent: #ff5500;
    --accent-red: #e63946;
    --text: #f1f5f9;
    --text-muted: #8e9bb0;
    --border: #262c3e;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: var(--font-sans);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }

/* Navigation Header */
.navbar {
    height: 60px;
    background: #12141c;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: 0.5px; }

.nav-controls { display: flex; gap: 0.75rem; }

.nav-controls input, .nav-controls select {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    outline: none;
}

/* Two-Column App Layout */
.app-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Sidebar */
.sidebar-list {
    width: 320px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.list-item:hover { background: var(--bg-card); }
.list-item.active {
    background: var(--bg-card-active);
    border-left: 4px solid var(--accent);
}

.rank-num {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-muted);
    min-width: 30px;
}

.item-info h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.item-info p { font-size: 0.75rem; color: var(--text-muted); }

/* Right Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-header h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.4rem; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

.tags-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.media-container img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Metric Boxes Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
}

.metric-box {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.m-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.m-value { font-size: 1.1rem; font-weight: 700; }

/* Panel Sections */
.panel-section {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
}

.panel-section h2 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.zeta-calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.calc-field { display: flex; flex-direction: column; gap: 0.3rem; }
.calc-label { font-size: 0.8rem; color: var(--text-muted); }

.calc-val {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

.reflection-text { line-height: 1.6; color: #d0d7de; font-size: 0.95rem; }
