/* =========================================
   RESC CALENDAR STYLES (Simracing Theme)
   ========================================= */

body { background-color: #0B101E !important; }

.hidden { display: none !important; }

/* Modal Base */
.custom_modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 9999; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
.modal_backdrop { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(5, 5, 10, 0.85); 
    backdrop-filter: blur(8px); 
}

#resc_calendar_content {
    padding: 120px 2rem 4rem 2rem; 
    max-width: 1440px; 
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 80vh;
    box-sizing: border-box;
}

/* --- Header --- */
.calendar_header {
    border-bottom: 1px solid rgba(42, 86, 255, 0.2);
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.season-select-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(21, 28, 45, 0.8);
    border: 1px solid rgba(42, 86, 255, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

.season-select-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: bold;
    text-transform: uppercase;
}

.season-dropdown {
    background: transparent;
    color: var(--text-main);
    border: none;
    font-size: 0.95rem;
    font-weight: bold;
    outline: none;
    cursor: pointer;
}

.season-dropdown option {
    background-color: #151C2D;
    color: #fff;
}

.page-title { font-family: var(--font-heading); font-size: 2.5rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.accent-blue { color: var(--accent-sim); }
.page-subtitle { color: var(--text-muted); font-size: 1.1rem; }

/* --- Calendar Cards (F1 App Style) --- */
.calendar-grid-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calendar-card {
    background-color: #151C2D;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.calendar-card:hover {
    transform: translateY(-3px);
    border-color: rgba(42, 86, 255, 0.3);
}

.calendar-card.status-next { border-left: 4px solid var(--accent-sim); }
.calendar-card.status-past {
    border-left: 4px solid rgba(255, 255, 255, 0.2);
}

/* Status Current (In Progress - No Live) */
.calendar-card.status-current.is-in-progress,
.calendar-card.status-current:not(.is-live) {
    border: 2px solid #22c55e;
    border-left: 6px solid #22c55e;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.25);
}

/* Status Current (Live Mode Enabled) */
.calendar-card.status-current.is-live {
    border: 2px solid #ef4444;
    border-left: 6px solid #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.35);
    animation: liveBorderPulse 2.5s infinite alternate;
}

@keyframes liveBorderPulse {
    0% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.25); }
    100% { box-shadow: 0 0 35px rgba(239, 68, 68, 0.55); }
}

.calendar-card.status-past .card-main-body {
    opacity: 0.75;
    filter: grayscale(60%);
}
.calendar-card.status-past .card-top-bar {
    opacity: 0.85;
}
.calendar-card.status-past .card-footer {
    opacity: 1;
    filter: none;
    background-color: rgba(0, 0, 0, 0.25);
}

/* F1 Top Bar */
.card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.round-badge { font-family: var(--font-heading); font-size: 0.85rem; color: var(--text-main); letter-spacing: 1px; }
.status-badge { font-size: 0.75rem; font-weight: bold; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 4px; }
.status-badge.next { background-color: rgba(42, 86, 255, 0.15); color: var(--accent-sim); }
.status-badge.past { background-color: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

.status-badge.in-progress-badge,
.status-badge.current:not(.live-badge) {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.5);
    font-weight: 800;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

.status-badge.live-badge {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #dc2626;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: pulseLive 1.2s infinite;
}

@keyframes pulseLive {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.4; }
    100% { transform: scale(0.9); opacity: 1; }
}

/* Twitch Live Button */
.btn-twitch-live {
    background: linear-gradient(135deg, #9146FF, #772ce8);
    border: 1px solid #a970ff;
    color: #fff !important;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(145, 70, 255, 0.45);
    transition: all 0.25s ease;
}

.btn-twitch-live:hover {
    background: linear-gradient(135deg, #772ce8, #5c16c5);
    border-color: #bf94ff;
    box-shadow: 0 0 24px rgba(145, 70, 255, 0.75);
    transform: translateY(-1px);
    color: #fff !important;
}

.twitch-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Main Body (Date, Location, Track Logo) */
.card-main-body {
    display: flex;
    justify-content: space-between;
    padding: 2rem 1.5rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.card-info-group {
    display: flex;
    align-items: center;
}

.card-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
}
.date-day { font-family: var(--font-heading); font-size: 2.5rem; line-height: 1; color: var(--text-main); }
.date-month { font-size: 1rem; font-weight: bold; color: var(--accent-sim); text-transform: uppercase; letter-spacing: 1px; margin-top: 0.3rem; }

.card-location-box {
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.location-country { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: bold; margin-bottom: 0.3rem; }
.location-gp { font-family: var(--font-heading); font-size: 1.8rem; color: var(--text-main); }

/* Track Logo Visual */
.card-track-visual {
    width: 150px;
    height: 80px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    opacity: 0.8;
}

.card-track-visual img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Optional: filter to make black logos white */
    /* filter: invert(1) brightness(2); */
}

/* Footer (Time & Buttons) */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.time-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    font-weight: bold;
    font-size: 0.9rem;
}

.time-icon { color: var(--accent-sim); }

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn-weather {
    background-color: transparent;
    border: 1px solid rgba(42, 86, 255, 0.5);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-weather:hover:not(:disabled) {
    background-color: var(--accent-sim);
    border-color: var(--accent-sim);
    box-shadow: 0 0 10px rgba(42, 86, 255, 0.4);
}

.btn-weather:disabled {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.02);
}

.btn-results {
    background: #2A56FF;
    border: 1px solid #4a72ff;
    color: #fff;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(42, 86, 255, 0.4);
}

.btn-results:hover:not(:disabled) {
    background: #1e45e0;
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(42, 86, 255, 0.75);
    transform: translateY(-1px);
}

.btn-results:disabled {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.35);
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
    transform: none;
}

/* --- SPA View Switching --- */
.spa-view-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    animation: fadeInView 0.25s ease forwards;
}

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

.results-top-nav {
    margin-bottom: 0.5rem;
}

.btn-back-calendar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(42, 86, 255, 0.3);
    color: var(--text-main);
    padding: 0.65rem 1.3rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
}

.btn-back-calendar:hover {
    background: rgba(42, 86, 255, 0.15);
    border-color: var(--accent-sim);
    color: #fff;
    transform: translateX(-3px);
}

/* --- Race Report (SPA) Header --- */
.res_report_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(42, 86, 255, 0.2);
    margin-bottom: 1.5rem;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: #151C2D;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.res_header_info { flex: 1; }

.res_header_badges {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.res-badge-tag {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(42, 86, 255, 0.15);
    color: var(--accent-sim);
    border: 1px solid rgba(42, 86, 255, 0.3);
}

.res_report_title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.res_circuit_meta {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.res_track_logo_box {
    width: 170px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.95;
}

.res_track_logo_img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.res_report_section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.res_section_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res_section_title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 1rem;
}

.res_section_title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 4px;
    background: var(--accent-sim);
    border-radius: 2px;
}

/* Category Tables */
.results-categories-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.category_result_block {
    background: #151C2D;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category_block_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.6rem;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 2px solid rgba(42, 86, 255, 0.4);
}

.category_header_title_group {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.category_pill_badge {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: #fff;
    background: linear-gradient(135deg, rgba(42, 86, 255, 0.35), rgba(42, 86, 255, 0.15));
    border: 1px solid rgba(42, 86, 255, 0.5);
    padding: 0.35rem 1.1rem;
    border-radius: 6px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 800;
}

.category_count_badge {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Results Table */
.res_table_responsive {
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
}

.res_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.res_table th {
    background-color: rgba(21, 28, 45, 0.95);
    padding: 1rem 1.2rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.res_table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.res_table tr:last-child td {
    border-bottom: none;
}

.res_table tr:hover td {
    background-color: rgba(255, 255, 255, 0.025);
}

/* Rank Badges */
.res-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    min-width: 42px;
    height: 34px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.res-rank-badge.p1 {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.res-rank-badge.p2 {
    background: rgba(203, 213, 225, 0.25);
    color: #e2e8f0;
    border: 1px solid rgba(203, 213, 225, 0.5);
}

.res-rank-badge.p3 {
    background: rgba(217, 119, 6, 0.25);
    color: #f59e0b;
    border: 1px solid rgba(217, 119, 6, 0.5);
}

.res-rank-badge.special {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Driver & Car Cell */
.res-driver-cell {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.res-car-thumb {
    width: 125px;
    height: 54px;
    object-fit: contain;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.res-driver-meta {
    display: flex;
    flex-direction: column;
}

.res-driver-name-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.res-car-num {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent-sim);
    background: rgba(42, 86, 255, 0.18);
    border: 1px solid rgba(42, 86, 255, 0.35);
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 800;
}

.res-driver-name {
    font-weight: 800;
    color: #fff;
    font-size: 1.15rem;
    letter-spacing: 0.2px;
}

.res-car-info {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 3px;
}

/* Qualif Dual Pill Badge */
.res-qualif-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.res-qualif-pos {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.res-qualif-pos.neutral {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.res-qualif-bonus {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: #38bdf8;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.5);
    padding: 2px 7px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
    text-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.res-qualif-empty {
    color: #64748b;
    font-weight: bold;
}

/* Delta Positions (Gained / Lost) */
.res-delta-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.res-delta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.res-delta-up {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.15);
}

.res-delta-down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.res-delta-same {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
}

/* Lap Time & Fastest Lap */
.res-bestlap-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.res-mt-badge {
    background-color: #8b5cf6;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
    border: 1px solid #7c3aed;
    display: inline-block;
    line-height: 1;
}

.res-pts-pill {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent-sim);
    background: rgba(42, 86, 255, 0.12);
    border: 1px solid rgba(42, 86, 255, 0.25);
    padding: 3px 10px;
    border-radius: 5px;
    display: inline-block;
}

/* Penalties Section */
.res_penalties_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1rem;
}

.res_penalty_card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.res_pen_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.res_pen_driver {
    font-weight: bold;
    color: #fff;
    font-size: 0.95rem;
}

.res_pen_affected {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 3px;
}

.res_pen_affected strong {
    color: #f1f5f9;
}

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

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

.res_pen_sanction_badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.res_pen_reason {
    font-size: 0.85rem;
    color: #d1d5db;
    font-style: italic;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
}

.weather_modal_content {
    background-color: #151C2D;
    border: 1px solid rgba(42, 86, 255, 0.3);
    border-radius: 12px;
    width: 95%;
    max-width: 850px; /* Widened to fit 3 columns */
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 2001;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.btn-close-icon { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.3s; padding: 0.5rem; }
.btn-close-icon:hover { color: #d80000; transform: scale(1.1); }

.weather_header { text-align: center; margin-bottom: 2rem; }
.weather_title { font-family: var(--font-heading); font-size: 2rem; color: var(--text-main); margin-bottom: 0.3rem; }
.weather_subtitle { color: var(--accent-sim); font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }

/* Grid for the 3 Sessions */
.weather_sessions_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.w_session_card {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.w_session_time { font-weight: bold; font-size: 0.95rem; color: var(--text-main); }
.w_session_name { font-size: 0.85rem; color: var(--accent-sim); font-weight: bold; margin-bottom: 1rem; text-transform: uppercase; }

.w_session_main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.w_session_temps { display: flex; flex-direction: column; }
.w_temp_high { font-family: var(--font-heading); font-size: 2.5rem; color: var(--text-main); line-height: 1; }
.w_temp_low { font-family: var(--font-heading); font-size: 1.6rem; color: var(--text-muted); line-height: 1; margin-top: 0.3rem; }
.w_session_icon { font-size: 3.5rem; line-height: 1; }

.w_session_details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 1.2rem;
}

.w_detail_line { font-size: 0.8rem; color: var(--text-muted); }
.w_detail_line span { color: var(--text-main); font-weight: bold; }

.weather_footer { text-align: center; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 1.5rem; }
.weather_desc_text { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; font-style: italic; }

/* --- Mobile Responsiveness --- */
@media (max-width: 899px) {
    #resc_calendar_content { padding: 100px 1rem 2rem 1rem; box-sizing: border-box; }
    
    .card-main-body { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.5rem; position: relative; }
    
    .card-info-group { flex-direction: column; align-items: flex-start; width: 100%; }
    
    .card-date-box { 
        flex-direction: row; 
        align-items: baseline; 
        gap: 0.5rem; 
        border-right: none; 
        padding-right: 0; 
        padding-bottom: 0.5rem; 
        width: 100%; 
    }
    
    .date-day { font-size: 2rem; }
    .date-month { margin-top: 0; }
    
    .card-location-box { padding-left: 0; }
    .location-gp { font-size: 1.5rem; }
    
    /* Track Logo watermark style on mobile */
    .card-track-visual {
        position: absolute;
        right: 1rem;
        bottom: 1.5rem;
        opacity: 0.15; /* Very transparent */
        width: 120px;
        height: auto;
    }
    
    .card-footer { flex-direction: column; align-items: stretch; gap: 1rem; }
    .btn-weather { width: 100%; text-align: center; }

    /* Modal Adjustments */
    .weather_modal_content { padding: 1.5rem 1rem; max-height: 90vh; overflow-y: auto; }
    .weather_sessions_grid { grid-template-columns: 1fr; gap: 1rem; } /* Stacks vertically */
    .w_session_card { padding: 1.2rem; }
    .w_session_main { margin-bottom: 1rem; }
    .w_temp_high { font-size: 2rem; }
    .w_temp_low { font-size: 1.4rem; }
    .w_session_icon { font-size: 2.5rem; }
}

/* Driver Profile Links in Race Results */
.res-driver-row-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: pointer;
}

.res-driver-row-link:hover .res-driver-name {
    color: var(--accent-sim) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.res-driver-row-link:hover .res-car-thumb {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.res_pen_link {
    color: var(--accent-sim);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.res_pen_link:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(42, 86, 255, 0.8);
}