*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #1e1e1e;
    padding: 0 2rem;
    height: 52px;
    display: flex;
    align-items: center;
}

.header-inner {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 0.85rem;
}

.site-nav-link {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7d7d7d;
    text-decoration: none;
    padding: 0.2rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav-link:hover {
    color: #b0b0b0;
}

.site-nav-link.active {
    color: #f0d894;
    border-bottom-color: #7a6027;
}

/* ── Main content ── */
.site-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

/* ── Section ── */
.concerts-section {
    margin-bottom: 3.5rem;
}

.section-heading {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #555;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-heading--toggle {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.section-heading--toggle:hover {
    color: #888;
}

.toggle-chevron {
    font-size: 1rem;
    line-height: 1;
    color: #444;
    transition: transform 0.2s ease, color 0.15s ease;
    display: inline-block;
    transform: rotate(0deg);
}

.toggle-chevron.open {
    transform: rotate(90deg);
    color: #666;
}

/* ── Concert list ── */
.concert-list {
    display: flex;
    flex-direction: column;
}

.concert-row {
    display: grid;
    grid-template-columns: 8rem 1fr 8rem 1fr;
    gap: 0 1.5rem;
    align-items: baseline;
    padding: 0.7rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.1s ease;
}

.concert-row:not(:last-child) {
    border-bottom: 1px solid #141414;
}

.concert-row:hover {
    background-color: #161616;
}

.concert-date {
    font-size: 0.78rem;
    color: #5a5a5a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.concert-name {
    font-weight: 500;
    color: #ddd;
    font-size: 0.93rem;
}

.concert-venue {
    font-size: 0.82rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.concert-attendants {
    font-size: 0.78rem;
    color: #4a4a4a;
}

.concert-attendants strong {
    color: #e8c97a;
    font-weight: 600;
}

/* Past concerts slightly more muted */
.concert-list--past .concert-name {
    color: #777;
}

.concert-list--past .concert-date {
    color: #383838;
}

/* Year selector styles */
.year-select-wrapper {
    margin: 0 0 1rem 0;
}

.year-select-label {
    font-size: 0.78rem;
    color: #8a8a8a;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.year-select {
    background: #0b0b0b;
    color: #e0e0e0;
    border: 1px solid #1f1f1f;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .year-select {
        width: 100%;
    }
}


.empty-state {
    color: #3a3a3a;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

/* ── Dante quiz ── */
.quiz-section {
    margin-top: 1.5rem;
}

.quiz-intro {
    color: #8e8e8e;
    margin: 0 0 1rem;
    max-width: 58ch;
    font-size: 0.92rem;
}

.quiz-card,
.quiz-result {
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    background: linear-gradient(165deg, #111 0%, #0d0d0d 60%, #090909 100%);
    padding: 1rem;
}

.quiz-progress {
    margin: 0 0 0.5rem;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
}

.quiz-question {
    margin: 0 0 0.9rem;
    font-size: 1.04rem;
    color: #e2e2e2;
    line-height: 1.35;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.quiz-option {
    text-align: left;
    border: 1px solid #242424;
    border-radius: 6px;
    background: #101010;
    color: #cfcfcf;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.08s ease;
}

.quiz-option:hover {
    border-color: #3a3a3a;
    background: #151515;
}

.quiz-option.selected {
    border-color: #9e7b32;
    background: #1c1710;
    color: #f1dfb0;
}

.quiz-option:active {
    transform: translateY(1px);
}

.quiz-option-label {
    display: inline-block;
    line-height: 1.35;
}

.quiz-actions {
    margin-top: 0.95rem;
}

.quiz-next,
.quiz-retake {
    border: 1px solid #4a3a18;
    border-radius: 6px;
    background: #241c10;
    color: #eedcb2;
    padding: 0.58rem 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.quiz-next:hover,
.quiz-retake:hover {
    background: #312512;
    border-color: #7a6027;
}

.quiz-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-result-kicker {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6d6d6d;
}

.quiz-circle-name {
    margin: 0.4rem 0 0.5rem;
    color: #f0d894;
    font-size: 1.12rem;
}

.quiz-circle-description {
    margin: 0 0 0.95rem;
    color: #b8b8b8;
    line-height: 1.45;
    max-width: 60ch;
}

/* ── Bernini art library ── */
.bernini-section {
    margin-top: 1.5rem;
}

.bernini-intro {
    color: #8e8e8e;
    margin: 0 0 1.5rem;
    max-width: 58ch;
    font-size: 0.92rem;
}

.artwork-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.artwork-card {
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    background: linear-gradient(165deg, #111 0%, #0d0d0d 60%, #090909 100%);
    padding: 1.1rem 1.2rem;
}

.artwork-title {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    color: #f0d894;
    font-weight: 600;
}

.artwork-meta {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    color: #777;
    letter-spacing: 0.03em;
}

.artwork-year,
.artwork-medium {
    color: #999;
}

.artwork-description {
    margin: 0 0 0.7rem;
    color: #b8b8b8;
    line-height: 1.5;
    font-size: 0.92rem;
    max-width: 65ch;
}

.artwork-location {
    margin: 0;
    font-size: 0.82rem;
    color: #6d9e6d;
}

.location-institution {
    font-weight: 600;
}

.location-city,
.location-country {
    color: #5a8a5a;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .site-main {
        padding: 2rem 1.25rem 4rem;
    }

    .site-header {
        height: auto;
        min-height: 52px;
        padding: 0.7rem 1.25rem;
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .site-nav {
        width: 100%;
        gap: 0.9rem;
    }

    .concert-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.1rem 1rem;
    }

    .concert-date { grid-column: 1; grid-row: 1; }
    .concert-name { grid-column: 2; grid-row: 1; }
    .concert-venue { grid-column: 1; grid-row: 2; }
    .concert-attendants { grid-column: 2; grid-row: 2; }

    .quiz-card,
    .quiz-result {
        padding: 0.85rem;
    }

    .quiz-question {
        font-size: 0.98rem;
    }

    .quiz-next,
    .quiz-retake {
        width: 100%;
    }

    .artwork-card {
        padding: 0.9rem 1rem;
    }

    .artwork-description {
        font-size: 0.88rem;
    }
}

/* ── Blazor infrastructure ── */
#blazor-error-ui {
    background: #181818;
    border-top: 1px solid #2a2a2a;
    color: #e0e0e0;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #1e0a0a;
    padding: 1rem;
    color: #e0e0e0;
    border: 1px solid #4a1010;
    border-radius: 4px;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #1c1c1c;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #3a3a3a;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}
.artwork-link {
  margin-top: 0.5rem;
}

.artwork-link a {
  color: #a78bfa;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.artwork-link a:hover {
  color: #c4b5fd;
}

.artwork-link a:active {
  color: #9d7fe6;
}
