/* ── Strava-Seite (/strava) ───────────────────────────────────────────────── */

html, body {
    min-height: 100%;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.25rem 2rem;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 15%, rgba(252, 76, 2, 0.08) 0%, transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(244, 244, 244, 0.05) 0%, transparent 50%);
}

/* ── Theme Toggle ─────────────────────────────────────────────────────────── */
.sr-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s;
    z-index: 10;
}
.sr-theme-toggle:hover { border-color: var(--color-accent-warm); }

/* ── Card ─────────────────────────────────────────────────────────────────── */
.sr-main { width: 100%; display: flex; justify-content: center; flex: 1; }

.sr-card {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: srFadeIn 0.6s ease-out both;
}

@keyframes srFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sr-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fc4c02;
    margin-bottom: 0.75rem;
}

.sr-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.sr-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1.75rem;
}

.sr-empty-text {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--color-text-muted);
    max-width: 40ch;
}

/* ── Stats-Grid ───────────────────────────────────────────────────────────── */
.sr-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.sr-stat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.sr-stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.sr-stat-value {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--color-text);
}

/* ── Karte ────────────────────────────────────────────────────────────────── */
.sr-map-wrapper {
    width: 100%;
    position: relative;
    margin-bottom: 1.75rem;
}

.sr-map {
    width: 100%;
    height: 340px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    position: relative;
    background: var(--color-surface);
}

.sr-map .map-tile-layer img { filter: brightness(0.85) saturate(0.7); }

.sr-map .map-zoom-controls { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 2px; z-index: 10; }
.sr-map .map-zoom-btn {
    width: 30px; height: 30px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1.1rem; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.sr-map .map-zoom-btn:hover { background: var(--color-surface-elevated); border-color: var(--color-accent-warm); }

.sr-map .map-attribution {
    position: absolute; bottom: 6px; right: 8px;
    background: rgba(10, 10, 10, 0.8);
    color: var(--color-text-muted);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
}
.sr-map .map-attribution a { color: var(--color-accent-warm); text-decoration: none; }

.sr-map-consent-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    text-align: center;
    height: 340px;
}

.sr-map-consent-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 40ch;
}

.sr-map-consent-btn {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    border: 1px solid var(--color-accent-warm);
    background: transparent;
    color: var(--color-accent-warm);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.sr-map-consent-btn:hover { background: var(--color-accent-warm); color: var(--color-bg); }

/* ── Strava-Link ──────────────────────────────────────────────────────────── */
.sr-strava-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    background: #fc4c02;
    color: #fff;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
    margin-bottom: 2rem;
}
.sr-strava-link:hover { background: #e04402; transform: translateY(-2px); }

/* ── Historie ─────────────────────────────────────────────────────────────── */
.sr-history {
    width: 100%;
    text-align: left;
    margin-bottom: 1.5rem;
}

.sr-history-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 1rem;
}
.sr-history-count {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.sr-history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.sr-history-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.sr-history-link:hover,
.sr-history-link:focus-visible {
    border-color: #fc4c02;
    transform: translateX(2px);
}

.sr-history-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}
.sr-history-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.sr-history-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}
.sr-history-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sr-history-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.sr-history-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
    text-align: right;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.sr-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}
.sr-page-link {
    color: var(--color-accent-warm);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    transition: border-color 0.15s;
}
.sr-page-link:hover { border-color: var(--color-accent-warm); }
.sr-page-link-disabled {
    color: var(--color-text-muted);
    opacity: 0.4;
    pointer-events: none;
}
.sr-page-info { color: var(--color-text-muted); }

@media (max-width: 420px) {
    .sr-history-stats { display: none; }
}

/* ── Zurück / Footer ──────────────────────────────────────────────────────── */
.sr-back {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.sr-back:hover { color: var(--color-accent-warm); }

.sr-footer {
    margin-top: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-align: center;
}
.sr-footer a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--color-border); }
.sr-footer a:hover { color: var(--color-accent-warm); border-color: var(--color-accent-warm); }

@media (max-width: 420px) {
    .sr-map { height: 260px; }
    .sr-map-consent-overlay { height: 260px; }
}
