@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@500;600;700&display=swap');

/* Accessibility: visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

html {
    overflow-x: hidden;
}

:root {
    /* Light theme (default) */
    --bg: #f6f7fb;
    --bg-soft: #eef1f8;
    --card: #ffffff;
    --card-contrast: #f5f7fd;
    --text: #121826;
    --muted: #5b6678;
    --accent: #e10600;
    --accent-text: var(--accent);
    --accent-2: #2563eb;
    --glass: rgba(15, 23, 42, 0.04);
    --stroke: rgba(15, 23, 42, 0.1);
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --radius: 16px;
    --font-primary: 'Space Grotesk', 'Manrope', 'Sarabun', system-ui, -apple-system, sans-serif;
    --bg-gradient: radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.06), transparent 38%),
        radial-gradient(circle at 82% 12%, rgba(225, 6, 0, 0.06), transparent 32%),
        radial-gradient(circle at 15% 82%, rgba(79, 139, 255, 0.08), transparent 34%),
        linear-gradient(160deg, #f9fafc 0%, #eef1f7 55%, #e7ecf7 100%);
}

[data-theme="dark"] {
    --bg: #0d0d0d;
    --bg-soft: #171717;
    --card: #141414;
    --card-contrast: #1c1c1c;
    --text: #f5f5f5;
    --muted: #a3a3a3;
    --accent: #ef4444;
    --accent-text: #f87171;
    --accent-2: #60a5fa;
    --glass: rgba(255, 255, 255, 0.06);
    --stroke: rgba(255, 255, 255, 0.12);
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
    --bg-gradient: radial-gradient(circle at 20% 18%, rgba(239, 68, 68, 0.04), transparent 40%),
        radial-gradient(circle at 82% 8%, rgba(96, 165, 250, 0.06), transparent 36%),
        radial-gradient(circle at 15% 80%, rgba(96, 165, 250, 0.05), transparent 34%),
        linear-gradient(160deg, #0a0a0a 0%, #0d0d0d 60%, #0a0a0a 100%);
}

body {
    font-family: var(--font-primary);
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    background-image: var(--bg-gradient);
    min-height: 100vh;
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    width: 100%;
}

img,
video {
    max-width: 100%;
    height: auto;
}

main {
    flex: 1;
}

.theme-transition::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 50%, rgba(225, 6, 0, 0.30), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(79, 139, 255, 0.25), transparent 70%);
    mix-blend-mode: screen;
    opacity: 0;
    filter: blur(6px);
    animation: flash-fade 0.32s ease;
    z-index: 10;
}

@keyframes flash-fade {
    0% { opacity: 0; transform: scale(0.98); }
    35% { opacity: 0.6; transform: scale(1.01); }
    100% { opacity: 0; transform: scale(1); }
}

header {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    padding: 0.6rem 1rem;
    text-align: center;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] header {
    background: rgba(20, 20, 20, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

[data-theme="dark"] .theme-toggle {
    background: var(--card-contrast);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .theme-toggle:hover {
    background: #262626;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .nav-link:hover {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .nav-link.active {
    background: var(--accent);
    border-color: var(--accent);
}

[data-theme="dark"] .secondary-button {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .secondary-button:hover {
    background: #262626;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .archive-control-btn {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .archive-control-btn:hover {
    background: #262626;
    border-color: var(--accent);
}

[data-theme="dark"] .timeline-chip {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timeline-chip:hover {
    background: #262626;
}

[data-theme="dark"] .video-card {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .video-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .grandprix-section {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hero-card {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero-card.upcoming-card {
    border-left-color: #60a5fa;
}

[data-theme="dark"] .hero-kicker {
    color: #f87171;
}

[data-theme="dark"] .hero-title {
    color: #f5f5f5;
}

[data-theme="dark"] .hero-date {
    color: #a3a3a3;
}

[data-theme="dark"] .hero-sessions {
    color: #e5e5e5;
}

[data-theme="dark"] .sprint-chip {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.35);
    color: #f472b6;
}

[data-theme="dark"] .drawer-panel {
    background: #171717;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .drawer-close {
    background: #262626;
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .session-item {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .session-item:hover {
    background: #262626;
}

[data-theme="dark"] footer {
    background: #111111;
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .calendar-list-item {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .info-card {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sidebar-calendar-container {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .sidebar-session-item {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .sidebar-session-item:hover {
    background: #262626;
}

[data-theme="dark"] .countdown-card {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timeline-details {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .timeline-summary:hover {
    background: #1f1f1f;
}

[data-theme="dark"] .timeline-content {
    border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .embed-info {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.25);
}

[data-theme="dark"] .status-badge.past {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .video-count {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
}

[data-theme="dark"] .play-overlay {
    background: rgba(10, 10, 10, 0.7);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
    color: var(--text);
    letter-spacing: 0.015em;
}

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

.header-nav {
    background: transparent;
    border-bottom: 1px solid var(--stroke);
    padding: 0.6rem 1rem;
}

.header-nav-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-actions {
    position: absolute;
    right: max(1rem, calc((100% - 1320px) / 2 + 1rem));
    top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header-toggle {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

.header-toggle:hover {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1;
    white-space: nowrap;
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.nav-link:visited {
    color: var(--text);
}

.nav-link:hover {
    background: var(--glass);
    border-color: var(--stroke);
}

.nav-link.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.nav-link.active:visited {
    color: white;
}

.nav-link.active:hover {
    background: #dc2626;
}

.nav-link:focus-visible,
.theme-toggle:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.55);
    outline-offset: 3px;
}

.last-updated {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    margin-top: 0.25rem;
}

.embed-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    margin: 0.25rem 0 0.45rem;
    color: var(--accent-2);
    font-weight: 600;
    font-size: 0.9rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: transparent;
    color: var(--text);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    background: var(--glass);
    border-color: var(--muted);
}

.theme-toggle.header-toggle:hover {
    background: var(--glass);
}

.theme-toggle-icon {
    font-size: 1rem;
    color: inherit;
}

.nav-toggle {
    display: none;
}

.nav-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.light-stack {
    display: inline-flex;
    gap: 0.25rem;
}

.light-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b5563;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle.is-dark .light-dot {
    background: #d62828;
    box-shadow: 0 0 8px rgba(214,40,40,0.6), inset 0 0 0 1px rgba(255,255,255,0.12);
}

.theme-toggle:not(.is-dark) .light-dot:last-child {
    background: #2ecc71;
    box-shadow: 0 0 10px rgba(46,204,113,0.65), inset 0 0 0 1px rgba(255,255,255,0.15);
}

/* Smooth theme-dependent surfaces */
header,
.grandprix-section,
.video-card,
.hero-card,
footer,
.footer-grid-card,
.session-timeline .timeline-chip,
.watch-button,
.theme-toggle,
.footer-chip {
    transition: background 0.35s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease;
}

.last-updated {
    font-size: 0.9rem;
    color: var(--muted);
}

.timezone-note {
    font-size: 0.85rem;
    color: var(--muted);
}

main {
    width: 80%;
    max-width: 1800px;
    margin: 0.6rem auto 1.2rem;
    padding: 0;
}

.hero {
    margin: 0.2rem 0 0.75rem;
    padding: 0;
}

.hero-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 12px;
}

.hero-card.hero-centered {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 0.85rem 1.25rem;
    gap: 1rem;
}

.hero-card.hero-centered .hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.hero-card.hero-centered .hero-flag {
    font-size: 1.75rem;
    order: -1;
}

.hero-card.hero-centered .hero-title {
    font-size: 1.15rem;
    margin: 0;
}

.hero-card.hero-centered .hero-kicker {
    font-size: 0.7rem;
}

.hero-card.hero-centered .hero-date {
    font-size: 0.85rem;
}

.hero-card.hero-centered .hero-countdown {
    margin-top: 0.25rem;
}

.hero-card.hero-centered .countdown-units {
    gap: 0.35rem;
}

.hero-card.hero-centered .countdown-unit {
    font-size: 0.9rem;
}

.hero-card.hero-centered .countdown-unit strong {
    font-size: 1.1rem;
}

.hero-card.hero-centered .countdown-session {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.upcoming-card {
    border-left: 3px solid var(--accent-2);
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-text);
    margin-bottom: 0.05rem;
}

.hero-title {
    font-size: 1.5rem;
    margin: 0.2rem 0;
    color: var(--text);
    line-height: 1.35;
}

.hero-date {
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-sessions {
    color: var(--text);
    font-weight: 600;
    margin-top: 0.35rem;
}

.feature-list {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
    display: grid;
    gap: 0.4rem;
}

.feature-list li {
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.hero-actions .watch-button,
.hero-actions .secondary-button {
    display: inline-flex;
    align-items: center;
}

.sprint-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.4rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: transparent;
    border: 1px solid #ec4899;
    color: #ec4899;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.hero-flag {
    font-size: 2.2rem;
}

.loading {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    border-top: 4px solid var(--accent);
    width: 52px;
    height: 52px;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-container {
    padding: 1rem 0;
}

.grandprix-section {
    margin-bottom: 1.5rem;
    background: var(--card);
    border-radius: 12px;
    padding: 1.25rem 1.25rem 0.95rem;
    border: 1px solid var(--stroke);
    position: relative;
}

.grandprix-section.current-weekend {
    border-color: var(--accent);
}

.grandprix-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.grandprix-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    flex: 1;
}

.status-badge {
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--stroke);
    background: transparent;
    color: var(--muted);
}

.status-badge.current {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.status-badge.recent {
    background: #eab308;
    color: #1c1917;
    border-color: #eab308;
}

.status-badge.past {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--stroke);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.video-count {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--card-contrast);
    border: 1px solid var(--stroke);
    padding: 0.32rem 0.7rem;
    border-radius: 10px;
}

.grandprix-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.session-timeline {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    gap: 0.65rem;
    overflow-x: auto;
    padding: 0.35rem 0 0.85rem;
    margin-bottom: 0.6rem;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    scroll-padding: 0.5rem;
    overscroll-behavior-x: contain;
}

.session-timeline::-webkit-scrollbar {
    height: 8px;
}

.session-timeline::-webkit-scrollbar-thumb {
    background: var(--stroke);
    border-radius: 999px;
}

.timeline-chip {
    border: 1px solid var(--stroke);
    background: transparent;
    color: var(--text);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    scroll-snap-align: start;
}

.timeline-chip.fp1 { border-left: 3px solid #22c55e; }
.timeline-chip.fp2 { border-left: 3px solid #3b82f6; }
.timeline-chip.fp3 { border-left: 3px solid #0ea5e9; }
.timeline-chip.sprint { border-left: 3px solid #ec4899; }
.timeline-chip.sprint-quali { border-left: 3px solid #a855f7; }
.timeline-chip.qualifying { border-left: 3px solid #eab308; }
.timeline-chip.race { border-left: 3px solid #ef4444; }

.timeline-chip:hover {
    background: var(--glass);
    border-color: var(--muted);
}

.chip-label {
    font-weight: 600;
    letter-spacing: 0.01em;
}

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


.video-card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--stroke);
    transition: border-color 0.2s ease;
    position: relative;
}

.video-card:hover {
    border-color: var(--muted);
}


.video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    cursor: pointer;
    overflow: hidden;
}


.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s ease;
    filter: saturate(1.02);
}

.video-thumbnail-container:hover .video-thumbnail {
    transform: scale(1.05);
}


.play-overlay {
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
    z-index: 2;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.video-thumbnail-container:hover .play-overlay {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.08);
}

.play-button {
    font-size: 1.4rem;
    margin-left: 3px;
    line-height: 1;
}





.video-info {
    padding: 1.05rem 1.05rem 0.95rem;
}

.video-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text);
    line-height: 1.35;
}

.video-date {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

.video-type {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: transparent;
}

.video-type.fp1 { color: #22c55e; border: 1px solid #22c55e; }
.video-type.fp2 { color: #3b82f6; border: 1px solid #3b82f6; }
.video-type.fp3 { color: #0ea5e9; border: 1px solid #0ea5e9; }
.video-type.qualifying { color: #eab308; border: 1px solid #eab308; }
.video-type.sprint { color: #ec4899; border: 1px solid #ec4899; }
.video-type.sprint-quali { color: #a855f7; border: 1px solid #a855f7; }
.video-type.race { color: #ef4444; border: 1px solid #ef4444; }
.video-type.race-quali { color: #f59e0b; border: 1px solid #f59e0b; }
.video-type.other {
    color: var(--muted);
    border: 1px solid var(--stroke);
}

.video-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.45rem;
}

.watch-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    min-height: 34px;
    line-height: 1;
    transition: background 0.2s ease, opacity 0.2s ease;
    text-transform: none;
    letter-spacing: 0.01em;
}

.watch-button:visited {
    color: white;
}

.watch-button:hover {
    background: #dc2626;
    opacity: 0.95;
}

[data-theme="dark"] .watch-button {
    background: #ef4444;
}

[data-theme="dark"] .watch-button:hover {
    background: #f87171;
}

.watch-button svg {
    width: 16px;
    height: 16px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 0.8rem;
    min-height: 34px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.secondary-button:hover {
    background: var(--glass);
    border-color: var(--muted);
}

.drawer {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 15;
}

.drawer.open {
    opacity: 1;
    pointer-events: auto;
}

.drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
}

.drawer-panel {
    position: relative;
    width: min(820px, 92vw);
    max-height: 88vh;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform 0.25s ease;
}

.drawer.open .drawer-panel {
    transform: translateY(0);
}

.drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--glass);
    border: 1px solid var(--stroke);
    color: var(--text);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 1.1rem;
}

.drawer-body {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 320px;
}

.drawer-media {
    background-size: cover;
    background-position: center;
    min-height: 280px;
}

.drawer-meta {
    padding: 1.4rem 1.4rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.drawer-session {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-text);
    font-weight: 800;
    font-size: 0.85rem;
}

.drawer-title {
    font-size: 1.4rem;
    margin: 0.2rem 0;
}

.drawer-date, .drawer-gp {
    color: var(--muted);
}

.drawer-actions {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    header {
        position: sticky;
        top: 0;
        padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
    }

    .header-inner {
        flex-direction: column;
        gap: 0.6rem;
    }

    .header-text {
        text-align: center;
    }

    .drawer-body {
        grid-template-columns: 1fr;
    }
    .drawer-panel {
        width: 95vw;
    }
    .hero-card {
        grid-template-columns: 1fr;
    }
    .hero-card.hero-centered {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .hero-card.hero-centered .hero-meta {
        align-items: flex-start;
    }

    .header-actions {
        position: static;
        margin: 0.35rem auto 0;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        min-height: 44px;
        padding: 0.45rem 0.8rem;
        border-radius: 8px;
        border: 1px solid var(--stroke);
        background: transparent;
        color: var(--text);
        font-weight: 600;
        font-size: 0.8rem;
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .nav-toggle:hover {
        background: var(--glass);
        border-color: var(--muted);
    }

    .header-nav {
        display: block;
        padding: 0 1rem;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease;
    }

    .header-nav.is-open {
        max-height: 320px;
        opacity: 1;
        padding: 0.4rem 1rem 0.9rem;
        visibility: visible;
        pointer-events: auto;
    }

    .header-nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
        font-size: 0.95rem;
        min-height: 44px;
    }
}

.error {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text);
    background: rgba(225, 6, 0, 0.08);
    border-radius: 14px;
    margin: 2rem 0;
    border: 1px solid rgba(225, 6, 0, 0.35);
}

footer {
    background: var(--card);
    border-top: 1px solid var(--stroke);
    margin-top: auto;
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.footer-tagline {
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-theme {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    gap: 1.25rem;
}

.footer-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--accent-text);
}

.footer-bottom {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--stroke);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-tz {
    opacity: 0.8;
}

.footer-copyright {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.25rem;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .watch-button,
    .secondary-button {
        min-height: 44px;
        padding: 0.65rem 1rem;
    }

    .drawer-close {
        width: 44px;
        height: 44px;
    }

    .footer-logo {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .footer-link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0.35rem 0.6rem;
    }

    .footer-theme .theme-toggle {
        min-height: 44px;
        padding: 0.5rem 0.8rem;
    }

    .ics-download-link {
        min-height: 44px;
        padding: 0.45rem 0.8rem;
    }

    .sidebar-calendar-item {
        min-height: 44px;
        padding: 0.65rem 1.25rem;
    }
}

/* Legacy footer classes for compatibility */
.footer-inline-link,
.footer-inline-link:visited {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
}

.footer-inline-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    header h1 {
        font-size: 2.05rem;
    }
    
    main {
        width: 100%;
        margin: 1.2rem auto 2.4rem;
        padding: 0 1rem;
    }
    
    .grandprix-section {
        margin-bottom: 2.1rem;
        padding: 1.35rem 1.25rem 1rem;
    }
    
    .grandprix-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }
    
    .grandprix-title {
        font-size: 1.55rem;
    }
    
    .grandprix-videos {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .status-badge {
        align-self: flex-start;
    }
}

@media (max-width: 540px) {
    header {
        padding: 0.9rem 0.8rem 0.85rem;
    }
    header h1 {
        font-size: 1.65rem;
    }
    header p {
        font-size: 0.95rem;
    }
    .header-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
        width: 100%;
    }
    .header-actions .header-toggle {
        width: 100%;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
    }
    .hero-kicker {
        font-size: 0.75rem;
    }
    .hero-title {
        font-size: 1.25rem;
    }
    .hero-date,
    .hero-sessions {
        font-size: 0.9rem;
    }
    .hero-card {
        padding: 1.1rem 1.2rem;
    }
    .theme-toggle {
        width: 100%;
        justify-content: center;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
}
.footer-section ul {
    list-style: none;
    padding: 0;
}

.timeline-container {
    margin: 0;
    padding: 1.4rem 0 1.6rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.65rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, rgba(225, 6, 0, 0.85) 0%, rgba(225, 6, 0, 0.35) 100%);
    border-radius: 999px;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.6rem;
    padding-left: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.9rem;
    top: 1.15rem;
    width: 18px;
    height: 18px;
    background: var(--card);
    border: 3px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg), 0 4px 12px rgba(225, 6, 0, 0.3);
    z-index: 1;
}

.timeline-item.completed::before {
    background: var(--accent);
    border-color: var(--card);
}

.timeline-item.upcoming::before {
    background: var(--accent-2);
    border-color: var(--card);
    animation: pulse 2s ease-in-out infinite;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}

/* Archive Controls */
.archive-controls {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.archive-control-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: transparent;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.archive-control-btn:hover {
    background: var(--glass);
    border-color: var(--muted);
}

.archive-control-btn svg {
    opacity: 0.7;
}

/* Collapsible Grand Prix */
.timeline-details {
    width: 100%;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.timeline-summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    transition: background 0.2s ease;
}

.timeline-summary::-webkit-details-marker {
    display: none;
}

.timeline-summary:hover {
    background: var(--card-contrast);
}

.timeline-summary-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.timeline-chevron {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.timeline-chevron::before {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(-45deg);
    transition: transform 0.3s ease, border-color 0.2s ease;
}

.timeline-details[open] .timeline-chevron::before {
    transform: rotate(45deg);
}

.timeline-summary:hover .timeline-chevron::before {
    border-color: var(--accent);
}

.timeline-video-count {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    background: var(--glass);
    border-radius: 999px;
}

.timeline-details .timeline-content {
    margin-top: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.timeline-date {
    font-size: 0.92rem;
    color: var(--muted);
    font-weight: 600;
}

.timeline-badge {
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--stroke);
}

.timeline-badge.completed {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.35);
}

.timeline-badge.upcoming {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.35);
    animation: pulse 2s ease-in-out infinite;
}

.timeline-content {
    background: transparent;
    border-radius: 0;
    padding: 0 1rem 1rem;
    border: none;
    border-top: 1px solid var(--stroke);
    box-shadow: none;
}

.timeline-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0;
}

.timeline-no-videos {
    text-align: center;
    padding: 1.4rem;
    color: var(--muted);
    font-size: 1rem;
}

.timeline-no-videos-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.timeline-item:last-child {
    margin-bottom: 0.8rem;
}

@media (min-width: 1400px) {
    .timeline-videos {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (min-width: 1100px) {
    .timeline-videos {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
}

.calendar-loading {
    text-align: center;
    padding: 2.2rem 1rem;
    color: var(--muted);
}

.calendar-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--stroke);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.calendar-error {
    text-align: center;
    padding: 3rem;
    color: var(--accent-text);
    background: rgba(225, 6, 0, 0.1);
    border-radius: var(--radius);
    margin: 2rem 1rem;
}

.load-more-trigger {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.load-more-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--stroke);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 2.5rem;
    }

    .timeline::before {
        left: 0.5rem;
    }

    .timeline-item::before {
        left: -1.75rem;
        width: 16px;
        height: 16px;
        top: 1.2rem;
    }

    .timeline-title {
        font-size: 1.4rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-videos {
        grid-template-columns: 1fr;
    }

    /* Collapsible mobile styles */
    .archive-controls {
        padding: 0 1rem;
    }

    .archive-control-btn {
        flex: 1;
        justify-content: center;
        padding: 0.6rem 0.75rem;
        min-height: 44px;
    }

    .timeline-summary {
        padding: 0.6rem 0.85rem;
    }

    .timeline-summary-content {
        gap: 0.5rem;
    }

    .timeline-summary-content .timeline-title {
        width: 100%;
        font-size: 1.2rem;
    }

    .timeline-video-count {
        font-size: 0.75rem;
    }
}

.calendar-list-view {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.4rem 1rem 1.6rem 1.9rem;
}

.calendar-list-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem 1.2rem;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.calendar-list-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(225, 6, 0, 0.06), rgba(225, 6, 0, 0) 32%, rgba(79, 139, 255, 0.05));
    pointer-events: none;
}

.calendar-list-item.completed {
    border-left: 4px solid #4ade80;
}

.calendar-list-item.upcoming {
    border-left: 4px solid var(--accent-2);
}

.calendar-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.calendar-list-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.calendar-list-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.calendar-list-location {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.calendar-list-dates {
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--stroke);
    font-weight: 600;
}

.calendar-list-sprint-tag {
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(120deg, #f6c344, #ff9f1c);
    color: #1b1200;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-list-sessions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.session-item {
    padding: 0.8rem 0.85rem;
    border-radius: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
}

.session-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.session-item.completed {
    border-left: 3px solid #4ade80;
}

.session-item.completed .session-status {
    color: #4ade80;
}

.session-item.upcoming {
    border-left: 3px solid var(--accent-2);
}

.session-item.upcoming .session-status {
    color: var(--accent-2);
}

.session-name {
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.session-time {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.session-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
}

.session-status.completed {
    background: rgba(74, 222, 128, 0.15);
}

.session-status.upcoming {
    background: rgba(96, 165, 250, 0.15);
}

.countdown-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1rem 1rem;
}

.countdown-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.countdown-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(79, 139, 255, 0.1), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(225, 6, 0, 0.08), transparent 50%);
    pointer-events: none;
}

.countdown-label {
    font-size: 1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.countdown-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--accent-text);
    margin-bottom: 0.35rem;
}

.countdown-timer {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-timer.urgent {
    color: var(--accent-text);
}

.countdown-timer.warning {
    color: #f39c12;
}

.countdown-timer.safe {
    color: var(--accent-2);
}

.countdown-session-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.5rem;
}

.countdown-session-name .session-type {
    color: var(--accent-text);
}

.countdown-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--muted);
    flex-wrap: wrap;
}

.countdown-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.countdown-detail-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    min-width: 50px;
    text-align: center;
}

.countdown-detail-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .calendar-list-view {
        padding: 1.5rem 0.75rem 1.5rem 1.75rem;
    }

    .calendar-list-item {
        padding: 1.25rem 1rem;
    }

    .calendar-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .calendar-list-title {
        font-size: 1.3rem;
    }

    .calendar-list-sessions {
        grid-template-columns: 1fr;
    }

    .countdown-timer {
        font-size: 2.25rem;
    }

    .countdown-details {
        gap: 1rem;
    }

    .countdown-detail-value {
        min-width: 40px;
        font-size: 1.25rem;
    }
}

.main-layout {
    display: flex;
    flex-direction: row;
    gap: 1.75rem;
    margin: 0;
    align-items: flex-start;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.info-panel {
    width: min(360px, 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card {
    background: linear-gradient(145deg, var(--card), var(--card-contrast));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow);
}

.info-card.subtle {
    background: var(--card-contrast);
}

.info-card h3 {
    margin: 0 0 0.35rem;
    color: var(--text);
}

.info-card p {
    color: var(--muted);
    margin: 0 0 0.75rem;
}

.info-card .watch-button,
.info-card .secondary-button {
    width: 100%;
    justify-content: center;
}

.sidebar-calendar-container {
    background: var(--card);
    border-radius: var(--radius);
    padding: 0;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.sidebar-calendar-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(79, 139, 255, 0.1), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(225, 6, 0, 0.08), transparent 50%);
    pointer-events: none;
}

.calendar-sidebar {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

.calendar-sidebar-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--stroke);
}

.sidebar-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.sidebar-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.sidebar-calendar-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-session-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--stroke);
    transition: all 0.2s ease;
}

.sidebar-session-item:hover {
    transform: translateX(4px);
    background: var(--glass);
}

.sidebar-session-item.completed {
    border-left: 3px solid #4ade80;
}

.sidebar-session-item.completed .sidebar-session-status {
    color: #4ade80;
}

.sidebar-session-item.upcoming {
    border-left: 3px solid var(--accent-2);
}

.sidebar-session-item.upcoming .sidebar-session-status {
    color: var(--accent-2);
}

.sidebar-session-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
}

.sidebar-session-name {
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.sidebar-session-time {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }

    .content-area {
        min-width: auto;
        width: 100%;
    }

    .calendar-sidebar {
        max-width: 100%;
    }

    .info-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .calendar-sidebar {
        padding: 1.25rem 1rem;
    }

    .sidebar-title {
        font-size: 1.2rem;
    }
}
/* ============================================
   UNIFIED HOMEPAGE REDESIGN STYLES
   ============================================ */

/* Season Progress Bar */
.season-progress {
    margin: 0 0 1.25rem;
    padding: 0;
}

.season-progress-bar {
    position: relative;
    height: 8px;
    background: var(--glass);
    border-radius: 999px;
    overflow: visible;
    border: 1px solid var(--stroke);
}

.season-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
    border-radius: 999px;
    transition: width 0.6s ease;
    position: relative;
}

.season-progress-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--accent);
    border: 3px solid var(--card);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(225, 6, 0, 0.4);
    transition: left 0.6s ease;
}

.season-progress-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    font-weight: 500;
}

/* GP Section Headers */
.gp-section {
    margin-bottom: 1.5rem;
}

.gp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.gp-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gp-section-icon {
    font-size: 1.1rem;
}

.gp-section-link {
    color: var(--accent-text);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.gp-section-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* GP Cards Grid */
.gp-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Unified GP Card */
.gp-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gp-card:hover {
    border-color: var(--muted);
}

.gp-card.completed {
    border-left: 4px solid #22c55e;
}

.gp-card.upcoming {
    border-left: 4px solid var(--accent-2);
}

.gp-card.next-up {
    border-left: 4px solid var(--accent);
    box-shadow: 0 4px 20px rgba(225, 6, 0, 0.12);
}

.gp-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.gp-card-info {
    flex: 1;
    min-width: 200px;
}

.gp-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gp-card-flag {
    font-size: 1.1rem;
}

.gp-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--muted);
}

.gp-card-dates {
    font-weight: 500;
}

.gp-card-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sprint-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #ec4899;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gp-card-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.gp-status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gp-status-badge.completed {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.gp-status-badge.next {
    background: var(--accent);
    color: white;
    border: 1px solid var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

.gp-status-badge.upcoming {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-2);
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.gp-video-count {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--glass);
    border: 1px solid var(--stroke);
    color: var(--muted);
}

/* Session Strip */
.session-strip {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1rem;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding: 1rem;
    overscroll-behavior-x: contain;
}

.session-strip::-webkit-scrollbar {
    height: 6px;
}

.session-strip::-webkit-scrollbar-thumb {
    background: var(--stroke);
    border-radius: 999px;
}

/* Session Chip */
.session-chip {
    flex: 0 0 auto;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    background: var(--card-contrast);
    border: 1px solid var(--stroke);
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
    scroll-snap-align: start;
}

.session-chip.has-video {
    cursor: pointer;
}

.session-chip.has-video:hover {
    background: var(--glass);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.session-chip.has-video:hover .session-chip-icon {
    transform: scale(1.1);
}

.session-chip-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
}

.session-chip-icon {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.session-chip-time {
    font-size: 0.7rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.3;
}

/* Session chip states */
.session-chip.fp1 { border-top: 3px solid #22c55e; }
.session-chip.fp2 { border-top: 3px solid #3b82f6; }
.session-chip.fp3 { border-top: 3px solid #0ea5e9; }
.session-chip.sprint-quali { border-top: 3px solid #a855f7; }
.session-chip.sprint { border-top: 3px solid #ec4899; }
.session-chip.qualifying { border-top: 3px solid #eab308; }
.session-chip.race { border-top: 3px solid #ef4444; }

.session-chip.upcoming {
    opacity: 0.7;
}

.session-chip.live {
    border-color: var(--accent);
    animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225, 6, 0, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(225, 6, 0, 0); }
}

.session-chip .live-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Active chip state */
.session-chip.active {
    background: var(--accent);
    border-color: var(--accent);
}

.session-chip.active .session-chip-label,
.session-chip.active .session-chip-time {
    color: white;
}

/* Inline Video Expansion */
.inline-video-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
    opacity: 0;
    background: var(--card-contrast);
    border-top: 0 solid var(--stroke);
}

.inline-video-expand.show {
    max-height: 280px;
    opacity: 1;
    border-top-width: 1px;
    padding: 1rem 1.25rem;
}

.inline-video-content {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.inline-video-thumb {
    flex: 0 0 320px;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: block;
    text-decoration: none;
}

.inline-video-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease;
}

.inline-video-thumb:hover .play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.inline-video-thumb:hover .play-overlay svg {
    transform: scale(1.1);
}

.inline-video-thumb .play-overlay svg {
    transition: transform 0.2s ease;
}

.inline-video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.inline-video-session {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.inline-video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin: 0;
}

.inline-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.65rem 1.25rem;
    background: var(--accent);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.15s ease;
    width: fit-content;
}

.inline-watch-btn:hover {
    background: #c00500;
    transform: translateY(-1px);
}

/* Responsive inline video */
@media (max-width: 640px) {
    .inline-video-expand.show {
        max-height: 420px;
    }
    
    .inline-video-content {
        flex-direction: column;
    }
    
    .inline-video-thumb {
        flex: none;
        width: 100%;
    }

    .session-timeline {
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        grid-auto-columns: auto;
        overflow-x: hidden;
        scroll-snap-type: none;
    }

    .session-strip {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        overflow-x: hidden;
        scroll-snap-type: none;
    }

    .session-chip {
        width: 100%;
        min-width: 0;
    }

    .gp-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gp-card-badges {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .gp-card-meta {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

/* Expanded Video Preview in GP Card */
.gp-card-video-preview {
    display: none;
    padding: 0 1.25rem 1rem;
    border-top: 1px solid var(--stroke);
    background: var(--card-contrast);
}

.gp-card-video-preview.show {
    display: block;
}

.gp-card-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* Mini Video Card */
.mini-video-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.mini-video-card:hover {
    border-color: var(--muted);
}

.mini-video-thumb {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.mini-video-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mini-video-thumb:hover .play-overlay {
    opacity: 1;
}

.mini-video-info {
    padding: 0.6rem 0.75rem;
}

.mini-video-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Off-Season State */
.off-season-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

.off-season-content {
    max-width: 500px;
    margin: 0 auto;
}

.off-season-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.off-season-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
}

.off-season-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin: 0 0 1.5rem;
}

.off-season-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.off-season-features li {
    font-size: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.off-season-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.off-season-actions .watch-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.off-season-archive {
    padding-top: 1.5rem;
    border-top: 1px solid var(--stroke);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.archive-link {
    color: var(--accent-text);
    font-weight: 600;
    text-decoration: none;
}

.archive-link:hover {
    text-decoration: underline;
}

/* Sidebar Calendar Updates */
.sidebar-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--stroke);
}

.sidebar-calendar-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.ics-download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    background: var(--glass);
    border: 1px solid var(--stroke);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ics-download-link:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.sidebar-calendar-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.sidebar-calendar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    transition: background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.sidebar-calendar-item:hover {
    background: var(--glass);
}

.sidebar-calendar-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.sidebar-calendar-item.completed .sidebar-cal-status {
    color: #22c55e;
}

.sidebar-calendar-item.next .sidebar-cal-status {
    color: var(--accent);
}

.sidebar-calendar-item.upcoming .sidebar-cal-status {
    color: var(--muted);
}

.sidebar-cal-status {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.sidebar-cal-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-cal-date {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}

/* Dark mode adjustments for new components */
[data-theme="dark"] .session-chip {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .session-chip .session-chip-label {
    color: #f5f5f5;
}

[data-theme="dark"] .session-chip .session-chip-time {
    color: #a3a3a3;
}

[data-theme="dark"] .session-chip.has-video:hover {
    background: #262626;
}

[data-theme="dark"] .session-chip.active {
    background: var(--accent);
    border-color: var(--accent);
}

[data-theme="dark"] .session-chip.upcoming {
    opacity: 0.6;
}

/* Dark mode for inline video expansion */
[data-theme="dark"] .inline-video-expand {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .inline-video-title {
    color: #f5f5f5;
}

[data-theme="dark"] .inline-video-session {
    color: #f87171;
}

[data-theme="dark"] .gp-card {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .gp-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.gp-card.highlight {
    animation: highlight-pulse 1.5s ease;
}

@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(225, 6, 0, 0.4); }
    30% { box-shadow: 0 0 0 8px rgba(225, 6, 0, 0.2); }
    100% { box-shadow: 0 0 0 0 rgba(225, 6, 0, 0); }
}

[data-theme="dark"] .gp-card-name {
    color: #f5f5f5;
}

[data-theme="dark"] .gp-card-meta {
    color: #a3a3a3;
}

[data-theme="dark"] .gp-card-dates,
[data-theme="dark"] .gp-card-location {
    color: #a3a3a3;
}

[data-theme="dark"] .gp-status-badge.completed {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .gp-status-badge.upcoming {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .gp-video-count {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.1);
    color: #a3a3a3;
}

[data-theme="dark"] .sprint-badge {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.35);
    color: #f472b6;
}

[data-theme="dark"] .gp-card-video-preview {
    background: #0d0d0d;
}

[data-theme="dark"] .mini-video-card {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .mini-video-title {
    color: #f5f5f5;
}

[data-theme="dark"] .gp-section-title {
    color: #f5f5f5;
}

[data-theme="dark"] .gp-section-link {
    color: #f87171;
}

[data-theme="dark"] .off-season-title {
    color: #f5f5f5;
}

[data-theme="dark"] .off-season-subtitle {
    color: #a3a3a3;
}

[data-theme="dark"] .off-season-features li {
    color: #e5e5e5;
}

[data-theme="dark"] .off-season-archive {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #a3a3a3;
}

[data-theme="dark"] .archive-link {
    color: #f87171;
}

[data-theme="dark"] .sidebar-calendar-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .sidebar-calendar-header h3 {
    color: #f5f5f5;
}

[data-theme="dark"] .sidebar-calendar-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .sidebar-cal-name {
    color: #e5e5e5;
}

[data-theme="dark"] .sidebar-cal-date {
    color: #a3a3a3;
}

[data-theme="dark"] .sidebar-calendar-item.completed .sidebar-cal-status {
    color: #4ade80;
}

[data-theme="dark"] .sidebar-calendar-item.next .sidebar-cal-status {
    color: #f87171;
}

[data-theme="dark"] .ics-download-link {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.12);
    color: #a3a3a3;
}

[data-theme="dark"] .ics-download-link:hover {
    color: white;
}

[data-theme="dark"] .season-progress-bar {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .season-progress-label {
    color: #a3a3a3;
}

[data-theme="dark"] .season-progress-marker {
    border-color: #141414;
}

[data-theme="dark"] .countdown-unit {
    color: #e5e5e5;
}

[data-theme="dark"] .countdown-unit strong {
    color: #f87171;
}

[data-theme="dark"] .countdown-session {
    color: #a3a3a3;
}

[data-theme="dark"] .countdown-live {
    color: #f87171;
}

[data-theme="dark"] .info-card h3 {
    color: #f5f5f5;
}

[data-theme="dark"] .info-card p {
    color: #a3a3a3;
}

/* Hero Countdown Styles */
.hero-countdown {
    margin-top: 0.6rem;
}

.countdown-units {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.countdown-unit {
    font-size: 1rem;
    color: var(--text);
}

.countdown-unit strong {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-text);
}

.countdown-session {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.countdown-live {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    animation: blink 1s ease-in-out infinite;
}

/* Responsive adjustments for unified layout */
@media (max-width: 1024px) {
    .unified-layout {
        flex-direction: column;
    }

    .unified-layout .info-panel {
        width: 100%;
        order: 0;
    }

    .sidebar-calendar-list {
        max-height: 250px;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    right: calc(2rem + env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(225, 6, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
    z-index: 100;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.scroll-to-top:active {
    transform: translateY(0);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
}

[data-theme="dark"] .scroll-to-top {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .scroll-to-top:hover {
    background: #f87171;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
        right: calc(1.5rem + env(safe-area-inset-right, 0px));
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 768px) {
    .gp-card-header {
        padding: 0.85rem 1rem;
    }

    .gp-card-name {
        font-size: 1.1rem;
    }

    .session-strip {
        padding: 0.6rem 1rem 0.85rem;
    }

    .session-chip {
        min-width: 80px;
        padding: 0.5rem 0.6rem;
    }

    .gp-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .off-season-icon {
        font-size: 3rem;
    }

    .off-season-title {
        font-size: 1.4rem;
    }

    .off-season-subtitle {
        font-size: 1rem;
    }
}
