/* Secondary pages (About, Scores) — same storybook look as the game,
   but scrollable with a painted, softened backdrop. */

html, body {
    height: auto;
    min-height: 100%;
    overflow: auto;
}

body {
    background: #16241a;
}

.page-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('/static/images/backgrounds/spring.png') center bottom / cover no-repeat;
    filter: blur(6px) brightness(0.55) saturate(0.9);
    transform: scale(1.04);
}

.page-wrap {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 18px 60px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--card-blur));
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.back-link:hover {
    transform: translateX(-2px);
    border-color: var(--accent);
}

.page-card {
    background: rgba(18, 28, 22, 0.72);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    padding: 36px 40px;
    line-height: 1.7;
}

.page-card h1 {
    font-size: 2.3rem;
    font-weight: 800;
    color: #a5d6a7;
    line-height: 1.15;
    margin-bottom: 4px;
}

.page-card .subtitle {
    font-size: 1.05rem;
    opacity: 0.65;
    margin-bottom: 28px;
}

.page-card h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #c5e1a5;
    margin-top: 28px;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.page-card p {
    margin-bottom: 14px;
    opacity: 0.88;
}

.page-card ul {
    margin: 8px 0 18px 4px;
    list-style: none;
}

.page-card li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 8px;
    opacity: 0.88;
}

.page-card li::before {
    content: '🌿';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.85rem;
}

.page-card strong {
    color: #a5d6a7;
    font-weight: 800;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin: 16px 0 8px;
}

.rule {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px 16px;
}

.rule .rule-icon {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 6px;
}

.rule .rule-title {
    font-weight: 800;
    color: #e8f5e9;
    margin-bottom: 2px;
}

.rule p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.peebee-section {
    margin-top: 36px;
    padding: 22px;
    background: rgba(102, 187, 106, 0.1);
    border: 1px solid rgba(102, 187, 106, 0.25);
    border-radius: 18px;
    text-align: center;
}

.peebee-section p { opacity: 1; margin-bottom: 0; }

.peebee-section a {
    color: #a5d6a7;
    font-weight: 800;
    text-decoration: none;
}

.peebee-section a:hover { text-decoration: underline; }

/* --- Scores --- */
.scores-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.score-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 14px;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 12px 16px;
    transition: background 0.2s ease;
}

.score-row:hover { background: rgba(255, 255, 255, 0.09); }

.score-rank {
    font-size: 1.3rem;
    font-weight: 800;
    color: #a5d6a7;
    text-align: center;
}

.rank-1 .score-rank { color: #ffd54f; }
.rank-2 .score-rank { color: #cfd8dc; }
.rank-3 .score-rank { color: #d7a16b; }

.score-main { min-width: 0; }

.score-days {
    font-weight: 800;
    font-size: 1.05rem;
}

.score-days span {
    font-weight: 600;
    opacity: 0.6;
    font-size: 0.9rem;
}

.score-meta {
    font-size: 0.8rem;
    opacity: 0.65;
    margin-top: 2px;
}

.days-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.days-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-deep), #9ccc65);
    border-radius: 3px;
}

.outcome-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.outcome-completed {
    background: rgba(102, 187, 106, 0.2);
    color: #a5d6a7;
}

.outcome-died {
    background: rgba(229, 115, 115, 0.18);
    color: #ef9a9a;
}

.empty-state {
    text-align: center;
    padding: 44px 20px;
    opacity: 0.7;
}

.empty-state .big { font-size: 2.4rem; margin-bottom: 8px; }
.empty-state p { margin-bottom: 4px; }

@media (max-width: 600px) {
    .page-wrap { padding: 16px 12px 40px; }
    .page-card { padding: 26px 20px; border-radius: 20px; }
    .page-card h1 { font-size: 1.8rem; }
    .score-row { grid-template-columns: 36px 1fr; }
    .score-row .outcome-badge { grid-column: 2; justify-self: start; }
}
