:root {
    --bg-color: #fcfaf5;
    --text-main: #2c2825;
    --text-muted: #6b6661;
    --accent-primary: #d27154;
    --accent-hover: #b85f45;
    --border-color: #e8e4dc;
    --card-bg: #ffffff;
    --font-serif: 'Newsreader', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: ui-monospace, Menlo, Monaco, monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-primary);
}

/* Utilities */
.border-top {
    border-top: 1px solid var(--border-color);
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: #fff;
}

.section-padding {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.nav-brand {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
}

.nav-link-external {
    color: var(--accent-primary);
}

/* Hero */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4rem;
}

.hero-main {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1.2;
    max-width: 550px;
}

.hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

/* API Grid */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.api-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 4px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.5rem;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
}

.endpoint-list {
    list-style: none;
}

.endpoint-list li {
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.method {
    color: var(--accent-primary);
    font-weight: 500;
}

.endpoint {
    color: var(--text-muted);
    word-break: break-all;
}

.card-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

.base-url-info {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Roadmap Timeline */
.timeline {
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
    margin-left: 1rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--text-muted);
}

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

.timeline-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    color: var(--text-muted);
}

/* Contributors */
.contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contributor-card {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.contributor-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.role {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.social-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
}

/* Footer */
.footer {
    text-align: center;
}

.footer-content {
    padding: 4rem 2rem;
}

.disclaimer {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-main {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-visual {
        width: 100%;
        order: -1; /* Place the car at the top on mobile for visual impact */
    }
    .hero-title { font-size: 3rem; }
    .hero-actions { 
        flex-direction: column; 
        align-items: center; 
    }
    .hero-console {
        margin: 1.5rem auto 0 auto;
    }
}

.nav-links .active-link {
    color: var(--accent-primary);
    font-weight: 600;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
    color: var(--text-main);
}

.page-content {
    padding-top: 4rem;
}

.alternating-roadmap {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.road-centerline {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    transform: translateX(-50%);
    background: var(--text-main);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.road-centerline::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        var(--bg-color) 0,
        var(--bg-color) 20px,
        transparent 20px,
        transparent 40px
    );
    animation: driveVertical 1.5s linear infinite;
}

@keyframes driveVertical {
    from { background-position: 0 0; }
    to { background-position: 0 40px; }
}

.roadmap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
}

.roadmap-row .spacer {
    width: 45%;
}

.roadmap-row .roadmap-item {
    width: 45%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s ease;
}

.roadmap-row .roadmap-item:hover {
    transform: translateY(-2px);
}

.roadmap-item.left-side {
    text-align: right;
}

.roadmap-item.right-side {
    text-align: left;
}

.connector-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 4px solid var(--border-color);
    z-index: 2;
}

.connector-dot.completed {
    border-color: #4CAF50;
    background-color: #4CAF50;
}

.connector-dot.upcoming {
    border-color: var(--text-muted);
}

.roadmap-item h4 {
    font-size: 1.25rem;
    margin-top: 0.5rem;
    font-family: var(--font-serif);
    font-weight: 500;
}

.roadmap-item .status {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.status.completed {
    color: #4CAF50;
}

.status.upcoming {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .road-centerline {
        left: 20px;
        transform: none;
    }
    
    .roadmap-row {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .roadmap-row .spacer {
        display: none;
    }
    
    .roadmap-row .roadmap-item {
        width: calc(100% - 50px);
        text-align: left !important;
    }
    
    .connector-dot {
        left: 23px;
        transform: translateY(-50%);
    }
}


.mb-4 { margin-bottom: 2rem; }

/* Dotted F1 Car SVG Animations */
.hero-car-svg {
    width: 100%;
    max-width: 550px;
    height: auto;
    overflow: visible;
}

@keyframes roadDrive {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -40; }
}

@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.hero-car-svg .speed-lines line {
    animation: roadDrive 1.5s linear infinite;
}

.hero-car-svg .car-chassis {
    animation: carFloat 4s ease-in-out infinite;
    transform-origin: center;
}

.wheel-spin-rear {
    animation: wheelSpin 1.5s linear infinite;
    transform-origin: 150px 145px;
}

.wheel-spin-front {
    animation: wheelSpin 1.5s linear infinite;
    transform-origin: 480px 145px;
}

/* Interactive Code Switcher */
.code-switcher {
    width: 100%;
    max-width: 500px;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--card-bg);
    overflow: hidden;
    text-align: left;
}

.tab-headers {
    display: flex;
    background-color: #f7f5f0;
    border-bottom: 1px solid var(--border-color);
    padding: 0 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    padding: 1.25rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-bg);
}

.tab-content.active {
    display: flex;
}

.tab-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-main);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    flex-grow: 1;
}

.tab-content code {
    font-family: var(--font-mono);
}

.tab-content .copy-btn {
    flex-shrink: 0;
    margin-left: 1rem;
}

/* Open Source Highlight Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.02);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.feature-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: #f7f5f0;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.badge-new {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    background-color: #edf7ed;
    border: 1px solid #a3d9a5;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #2e7d32;
    font-weight: 600;
    vertical-align: middle;
    letter-spacing: 0.01em;
}


/* Call to Action for Contributors */
.cta-box {
    background-color: #f7f5f0;
    border: 1px solid var(--border-color);
    padding: 3.5rem 2rem;
    border-radius: 6px;
    text-align: center;
    margin-top: 4rem;
}

.cta-box h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-box p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* Data Schema styles */
.schema-section {
    margin-top: 3rem;
}

.schema-block {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.schema-header {
    background-color: #f7f5f0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.schema-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

.schema-body {
    padding: 1.5rem;
}

.schema-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.schema-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.schema-table th, .schema-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.schema-table th {
    font-weight: 600;
    color: var(--text-main);
    background-color: #fcfaf5;
}

.schema-table td code {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    background-color: #f7f5f0;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.schema-code-preview {
    background-color: #fcfaf5;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.schema-code-preview pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    overflow-x: auto;
}

/* Console Styles */
.hero-console {
    width: 100%;
    max-width: 750px;
    margin: 1.5rem auto 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--card-bg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.02);
    overflow: hidden;
    text-align: left;
}

.console-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f7f5f0;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.25rem;
    height: 45px;
}

.console-tabs {
    display: flex;
    gap: 0.5rem;
    height: 100%;
}

.console-tab-btn {
    background: transparent;
    border: none;
    padding: 0 1rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    height: 100%;
}

.console-tab-btn:hover {
    color: var(--text-main);
}

.console-tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.console-file-info {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.console-content {
    padding: 1.5rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-bg);
}

.console-content.active {
    display: flex;
}

.console-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-main);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    flex-grow: 1;
}

.console-content code {
    font-family: var(--font-mono);
}

.console-content .copy-btn {
    flex-shrink: 0;
    margin-left: 1.5rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    background-color: #f7f5f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.console-content .copy-btn:hover {
    background-color: var(--border-color);
    color: var(--text-main);
}

/* Simplified Roadmap Checklist */
.simple-roadmap-list {
    max-width: 650px;
    margin: 2rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.simple-roadmap-list::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.roadmap-step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.step-marker {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.roadmap-step.completed .step-marker {
    border-color: #4CAF50;
    color: #4CAF50;
    background-color: #e8f5e9;
}

.roadmap-step.upcoming .step-marker {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background-color: #fff3e0;
}

.step-details {
    flex-grow: 1;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.step-details:hover {
    transform: translateX(4px);
}

.step-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.step-series {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
}

.step-status {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.roadmap-step.completed .step-status {
    color: #4CAF50;
}

.roadmap-step.upcoming .step-status {
    color: var(--accent-primary);
}

.step-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Dashboard Specific Styles */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-title {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.series-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.series-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 6px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
}

.series-btn:hover {
    border-color: var(--accent-primary);
    transform: translateX(3px);
}

.series-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(210, 113, 84, 0.2);
}

.series-btn .series-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Dashboard Main Content */
.dashboard-main {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    min-height: 500px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dashboard-title-group h2 {
    font-size: 2.2rem;
    line-height: 1.2;
}

.dashboard-title-group p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.dashboard-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.selector-dropdown {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    transition: border-color 0.2s;
}

.selector-dropdown:hover {
    border-color: var(--accent-primary);
}

/* Timeline Cards */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.schedule-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    transition: all 0.2s ease;
}

.schedule-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.015);
}

.schedule-round {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.schedule-card.next-race {
    border-left: 4px solid var(--accent-primary);
    background: var(--card-bg);
}

.schedule-card.next-race .schedule-round {
    background: #fff3e0;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
}

.schedule-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.schedule-name {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-main);
}

.schedule-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.schedule-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.schedule-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Status Badges */
.badge-status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-sans);
}

.badge-status.completed {
    background: #e8f5e9;
    color: #4CAF50;
}

.badge-status.upcoming {
    background: #eceff1;
    color: #607d8b;
}

.badge-status.next {
    background: #fff3e0;
    color: var(--accent-primary);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% { opacity: 0.8; box-shadow: 0 0 0 0 rgba(210, 113, 84, 0.4); }
    70% { opacity: 1; box-shadow: 0 0 0 6px rgba(210, 113, 84, 0); }
    100% { opacity: 0.8; box-shadow: 0 0 0 0 rgba(210, 113, 84, 0); }
}

/* Modal overlay & slide-out panel */
.results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 40, 37, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: flex-end;
}

.results-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.results-panel {
    width: 100%;
    max-width: 750px;
    height: 100%;
    background: var(--bg-color);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.results-modal.active .results-panel {
    transform: translateX(0);
}

.panel-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: var(--card-bg);
}

.panel-title h3 {
    font-size: 1.8rem;
    line-height: 1.2;
}

.panel-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.panel-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    color: var(--accent-primary);
}

.panel-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Results Tables & Styling */
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th, .results-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--text-muted);
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table tbody tr {
    background: var(--card-bg);
    transition: background 0.15s;
}

.results-table tbody tr:hover {
    background: #f7f5f0;
}

.podium-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
}

.podium-1 {
    background: #fff9c4;
    color: #fbc02d;
    border: 1px solid #fbc02d;
    box-shadow: 0 0 8px rgba(253, 216, 53, 0.4);
}

.podium-2 {
    background: #eceff1;
    color: #90a4ae;
    border: 1px solid #90a4ae;
}

.podium-3 {
    background: #efebe9;
    color: #8d6e63;
    border: 1px solid #8d6e63;
}

.driver-name-cell {
    font-weight: 500;
}

.driver-code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--bg-color);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.points-cell {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-primary);
}

/* Search and Filter Inputs */
.search-container {
    margin-bottom: 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    padding-left: 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.25s;
}

.search-input:focus {
    border-color: var(--accent-primary);
}

.search-icon-svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

/* Spinner and Loaders */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    gap: 1rem;
    color: var(--text-muted);
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* Responsive Dashboard Styles */
@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .dashboard-sidebar {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .series-list {
        flex-direction: row;
        gap: 0.75rem;
        width: max-content;
    }

    .series-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .dashboard-main {
        padding: 1.5rem;
    }

    .schedule-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .schedule-round {
        margin: 0 auto;
    }

    .schedule-actions {
        justify-content: center;
    }
}

/* View switcher tabs styling */
.view-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.view-tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 0.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    outline: none;
}

.view-tab-btn:hover {
    color: var(--text-main);
}

.view-tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

/* Standings styling */
.standings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .standings-grid.dual-columns {
        grid-template-columns: 1fr 1fr;
    }
}

.standings-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.standings-section h3 {
    font-size: 1.4rem;
    font-family: var(--font-serif);
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.standings-meta-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: right;
    font-style: italic;
}

/* Championship Progression SVG Chart Styling */
.chart-container-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.chart-container-wrapper svg {
    display: block;
    width: 100%;
    height: auto;
}

.chart-point {
    transition: r 0.2s ease, stroke-width 0.2s ease;
    cursor: pointer;
}

.chart-point:hover {
    r: 6px !important;
    stroke-width: 2.5px !important;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    justify-content: center;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background-color: #f7f5f0;
    border: 1px solid var(--border-color);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.legend-item:hover {
    background-color: var(--border-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}





/* Panel Tabs */
.panel-tabs {
    display: flex;
    gap: 1rem;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.panel-tab-btn {
    background: transparent;
    border: none;
    padding: 1rem 0.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    outline: none;
    margin-bottom: -1px;
}

.panel-tab-btn:hover {
    color: var(--text-main);
}

.panel-tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

/* Session Schedule Layout */
.session-schedule-wrap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.session-day-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.session-day-label {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.session-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.session-row:hover {
    border-color: var(--accent-primary);
    background: #fdfdfc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.015);
}

.session-row.past {
    opacity: 0.7;
    background: #fcfcfc;
}

.session-row.past:hover {
    opacity: 0.9;
}

.session-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f7f5f0;
    border-radius: 50%;
}

.session-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.session-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.session-cat-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    background: #eee;
    color: #555;
    width: max-content;
}

.session-cat-motogp { background: #ffebee; color: #c62828; }
.session-cat-moto2 { background: #e3f2fd; color: #1565c0; }
.session-cat-moto3 { background: #e8f5e9; color: #2e7d32; }
.session-cat-motoe { background: #fff3e0; color: #ef6c00; }

.session-time-block {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.session-time {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.session-tz-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.session-time-na {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.session-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: #fff3e0;
    color: var(--accent-primary);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.session-status-badge.done {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Card Actions Group */
.card-actions-group {
    display: flex;
    gap: 0.5rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: #fff8f6;
}
