* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #0f1419;
    color: #e6e9ec;
}
a { color: #4ea1ff; }

.navbar { background: #161b22; border-bottom: 1px solid #2a3038; }
.nav-container {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
}
.nav-logo { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: #fff; }
.nav-links { display: flex; gap: 16px; flex: 1; }
.nav-link { text-decoration: none; }
.nav-link.active { color: #fff; font-weight: 600; }
.nav-user { display: flex; gap: 10px; align-items: center; font-size: 0.9rem; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; }
.nav-logout { font-size: 0.85rem; }

.site-footer { text-align: center; padding: 20px; color: #6b7480; font-size: 0.8rem; }

.hero {
    max-width: 480px;
    margin: 80px auto;
    text-align: center;
    padding: 0 20px;
}
.btn-discord {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: #5865F2;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}
.error { color: #e74c3c; margin-top: 14px; }

.map-page { position: relative; }
#map { height: calc(100vh - 57px); width: 100%; }
.map-overlay {
    position: absolute;
    z-index: 1000;
    top: 12px;
    left: 12px;
    background: rgba(22, 27, 34, 0.92);
    padding: 12px 16px;
    border-radius: 10px;
    max-width: 260px;
}
.completion-badge strong { font-size: 1.6rem; display: block; }
.completion-badge span { font-size: 0.8rem; color: #9aa4af; }
.completion-badge small { display: block; margin-top: 4px; color: #9aa4af; }
.completion-by-mode { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.85rem; }
.completion-by-mode li { padding: 2px 0; }

.map-legend {
    background: rgba(22, 27, 34, 0.92);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #e6e9ec;
    line-height: 1.6;
}
.legend-row { display: flex; align-items: center; gap: 8px; }
.legend-swatch { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

.log-page, .stats-page { max-width: 640px; margin: 30px auto; padding: 0 20px; }
.log-page form { display: flex; flex-direction: column; gap: 14px; }
.log-page label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.log-page input[type=text], .log-page input[type=date], .log-page select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #2a3038;
    background: #1c232c;
    color: #e6e9ec;
}
.route-results { list-style: none; margin: 0; padding: 0; }
.route-results li {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #2a3038;
}
.route-results li:hover { background: #1c232c; }
.selected-route { border: 1px solid #2a3038; border-radius: 8px; padding: 12px; }
.selected-route.hidden { display: none; }
.stop-list { max-height: 260px; overflow-y: auto; margin-top: 10px; }
.stop-item { display: block; padding: 4px 0; font-size: 0.9rem; }
button {
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    background: #4ea1ff;
    color: #0f1419;
    font-weight: 600;
    cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
#log-feedback.success { color: #2ecc71; }
#log-feedback.error { color: #e74c3c; }

.stat-cards { display: flex; flex-wrap: wrap; gap: 14px; margin: 20px 0; }
.stat-card {
    flex: 1 1 140px;
    background: #161b22;
    border: 1px solid #2a3038;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.stat-card strong { display: block; font-size: 1.4rem; }
.stat-card span { font-size: 0.8rem; color: #9aa4af; }

.mode-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.mode-table th, .mode-table td { text-align: left; padding: 8px; border-bottom: 1px solid #2a3038; }

.import-log {
    margin-top: 16px;
    background: #161b22;
    border: 1px solid #2a3038;
    border-radius: 8px;
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 0.85rem;
}
