/* gosongpa competition server - minimal clean style */

:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-border: #e0e0e0;
    --color-primary: #2563eb;
    --color-positive: #16a34a;
    --color-negative: #dc2626;
    --color-progress: #2563eb;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
    --font-mono: "SF Mono", "Fira Code", monospace;
}

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

body {
    font-family: var(--font-stack);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 14px;
}

/* Navigation */
.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-brand a {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--color-text);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-text-muted);
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* Champion rows */
.champion-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.champion-row:last-child {
    border-bottom: none;
}

.champion-info {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    flex-wrap: wrap;
    padding: 0.25rem 0;
}

.champion-experiment {
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.champion-project {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.champion-metric {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.champion-date {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.champion-info.empty {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: center;
}

.tabs a {
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.tabs a:hover {
    background: var(--color-border);
}

.tabs a.active {
    background: var(--color-primary);
    color: white;
}

.tab-divider {
    color: var(--color-border);
}

/* Filter form */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.filter-form label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.filter-form input,
.filter-form select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font-stack);
    width: 120px;
}

.filter-form button {
    padding: 0.4rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.filter-form button:hover {
    opacity: 0.9;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead th {
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

tbody tr:nth-child(even) {
    background: var(--color-bg);
}

tbody tr:hover {
    background: #f0f4ff;
}

tbody td small {
    color: var(--color-text-muted);
    display: block;
    font-size: 0.75rem;
}

.leaderboard-table a {
    color: var(--color-primary);
    text-decoration: none;
}

.leaderboard-table a:hover {
    text-decoration: underline;
}

/* Metric colors */
.positive {
    color: var(--color-positive);
}

.negative {
    color: var(--color-negative);
}

/* Detail list */
.detail-list {
    list-style: none;
    padding: 0;
}

.detail-list li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.detail-list strong {
    display: inline-block;
    min-width: 100px;
}

/* Metrics table */
.metrics-table {
    max-width: 400px;
}

/* Progress bar */
.progress-bar-container {
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    height: 28px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-progress);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 40px;
    transition: width 0.3s ease;
}

/* Empty state */
.empty-row {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    padding: 2rem 0;
}

/* Links */
.link-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 1rem;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
}

.link-btn:hover {
    opacity: 0.9;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
    }
    .nav-links {
        gap: 0.75rem;
    }
    .filter-form {
        flex-direction: column;
    }
    .filter-form input,
    .filter-form select {
        width: 100%;
    }
    table {
        font-size: 0.75rem;
    }
    tbody td {
        padding: 0.35rem 0.4rem;
    }
}
