/* ========================================================================
   GRID GUIDE RACING CALENDAR - MAIN STYLES
   ======================================================================== */

/* ========== GLOBAL RESETS & BASE STYLES ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    color: #ffffff;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== HEADER SECTION ========== */

header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 25px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-bottom: 3px solid #e10600;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffd700 50%, transparent);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-branding {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-grid {
    font-size: 2.5em;
    color: #e10600;
    text-shadow: 0 0 10px rgba(225, 6, 0, 0.5);
    animation: gridPulse 3s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(225, 6, 0, 0.5), 0 0 20px rgba(225, 6, 0, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(225, 6, 0, 0.8), 0 0 30px rgba(225, 6, 0, 0.5), 0 0 40px rgba(225, 6, 0, 0.3);
    }
}

.logo h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    position: relative;
}

.logo h1::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e10600, #ffd700);
    border-radius: 2px;
}

/* BETA Badge - Remove this section when ready to launch */
.beta-badge {
    display: inline-block;
    font-size: 0.35em;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 4px 12px;
    margin-left: 12px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%) !important;
    color: #ffffff !important;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 0 20px rgba(255, 107, 0, 0.6),
        0 0 40px rgba(255, 107, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: betaPulse 2s ease-in-out infinite;
    position: relative;
    top: -8px;
    /* Override parent h1 text transparency */
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #ffffff !important;
}

.beta-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: betaShine 3s ease-in-out infinite;
}

@keyframes betaPulse {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(255, 107, 0, 0.6),
            0 0 40px rgba(255, 107, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 0 30px rgba(255, 107, 0, 0.8),
            0 0 60px rgba(255, 107, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

@keyframes betaShine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 200%;
    }
}
/* End BETA Badge section */

.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-settings {
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.btn-settings::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-settings:hover::before {
    left: 100%;
}

.btn-settings:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.btn-donate {
    white-space: nowrap;
    background: linear-gradient(135deg, #e10600 0%, #c70000 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.btn-donate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-donate:hover::before {
    left: 100%;
}

.btn-donate:hover {
    background: linear-gradient(135deg, #ff0800 0%, #e10600 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(225, 6, 0, 0.5);
    transform: translateY(-2px);
}

.subtitle {
    font-size: 0.95em;
    color: #b0b0b0;
    letter-spacing: 1px;
    font-weight: 300;
    margin-left: 60px;
}

.btn-notification {
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.btn-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.5s;
}

.btn-notification:hover::before {
    left: 100%;
}

.btn-notification:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.15) 100%);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* ========== CALENDAR SECTION ========== */

/* Calendar Month Navigation Controls */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 10px;
    border: 1px solid rgba(225, 6, 0, 0.2);
    position: relative;
}

.calendar-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e10600 50%, transparent);
    border-radius: 10px 10px 0 0;
}

.calendar-controls h2 {
    font-size: 1.8em;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 1px;
    flex: 1;
    text-align: center;
}

/* Calendar Series Filter Section */
.calendar-filter-section {
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(225, 6, 0, 0.1) 0%, rgba(225, 6, 0, 0.05) 100%);
    border-radius: 8px;
    border: 2px solid rgba(225, 6, 0, 0.3);
    position: relative;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.filter-header label {
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #ffd700;
    font-size: 0.95em;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
}

#filterToggleArrow {
    transition: transform 0.3s ease;
}

#filterToggleArrow.open {
    transform: rotate(180deg);
}

#filterCollapse {
    margin-top: 15px;
}

.filter-controls-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85em;
    letter-spacing: 1px;
}

.calendar-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.filter-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #e10600;
}

.filter-checkbox-text {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.filter-checkbox-label input[type="checkbox"]:checked + .filter-checkbox-text {
    color: #ffd700;
}

/* ========== BUTTONS ========== */

/* Base Button Styles */
.btn {
    background: linear-gradient(135deg, #e10600 0%, #c70000 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    font-size: 1em;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.btn-text-mobile {
    display: inline;
}

.btn-text-desktop {
    display: none;
}

.calendar-controls .btn {
    min-width: 60px;
    height: 60px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    cursor: pointer;
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(225, 6, 0, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(225, 6, 0, 0.9));
    }
}

.calendar-controls .btn::before {
    content: '';
    position: absolute;
    width: 32px;
    height: 32px;
    border-top: 5px solid #e10600;
    border-right: 5px solid #e10600;
    border-radius: 2px;
    transition: all 0.3s ease;
    animation: pulse-glow 3s ease-in-out infinite;
}

#prevMonth::before {
    transform: rotate(-135deg);
}

#nextMonth::before {
    transform: rotate(45deg);
}

.calendar-controls .btn::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-top: 3px solid #e10600;
    border-right: 3px solid #e10600;
    opacity: 0.4;
    transition: all 0.3s ease;
}

#prevMonth::after {
    transform: rotate(-135deg);
    left: 7px;
}

#nextMonth::after {
    transform: rotate(45deg);
    right: 7px;
}

.calendar-controls .btn:hover::before {
    border-color: #ffd700;
    filter: drop-shadow(0 0 20px rgba(225, 6, 0, 1))
            drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
    animation: none;
}

.calendar-controls .btn:hover::after {
    opacity: 0.7;
    border-color: #ffd700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

#prevMonth:hover::before {
    transform: rotate(-135deg) translateX(-6px);
}

#nextMonth:hover::before {
    transform: rotate(45deg) translateX(6px);
}

#prevMonth:hover::after {
    transform: rotate(-135deg) translateX(-3px);
}

#nextMonth:hover::after {
    transform: rotate(45deg) translateX(3px);
}

.calendar-controls .btn-text-mobile {
    display: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(225, 6, 0, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* ========== CALENDAR GRID ========== */

/* Main Calendar Grid Layout */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}

.calendar-day-header {
    background: rgba(225, 6, 0, 0.3);
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border-radius: 5px;
    font-size: 0.9em;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px;
    min-height: 100px;
    border-radius: 5px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(225, 6, 0, 0.5);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.day-number {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.day-events-labels {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 5px;
    width: 100%;
}

.event-label {
    font-size: 0.65em;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

/* Event Label Colors by Series Type */
.event-label.f1 { background-color: #e10600; }
.event-label.f2 { background-color: #ff4444; }
.event-label.f3 { background-color: #ff8888; }
.event-label.nascar { background-color: #ffd700; color: #000; text-shadow: none; }
.event-label.xfinity { background-color: #ffaa00; }
.event-label.trucks { background-color: #ff6633; }
.event-label.indycar { background-color: #0066cc; }
.event-label.wec { background-color: #ff6600; }
.event-label.imsa { background-color: #0099ff; }
.event-label.rally { background-color: #00cc66; }
.event-label.btcc { background-color: #cc0066; }
.event-label.supercars { background-color: #ff00ff; }
.event-label.dtm { background-color: #00cccc; }
.event-label.gt { background-color: #9900cc; }
.event-label.gt4 { background-color: #cc6600; }
.event-label.elms { background-color: #ffaa00; }
.event-label.porsche { background-color: #cccc00; color: #000; text-shadow: none; }
.event-label.carreracup { background-color: #999900; }
.event-label.supertrofeo { background-color: #ffdd00; color: #000; text-shadow: none; }
.event-label.ferrari { background-color: #cc0000; }
.event-label.mx5 { background-color: #3399ff; }
.event-label.mustang { background-color: #0055aa; }
.event-label.motogp { background-color: #ff0066; }
.event-label.gridlife { background-color: #39ff14; color: #000; text-shadow: none; }

/* ========== EVENTS SECTION ========== */

/* Upcoming Events List Section */
.events-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.events-section h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #ffd700;
    position: relative;
    padding-left: 25px;
}

.events-section h3::before {
    content: '▦';
    position: absolute;
    left: 0;
    color: #e10600;
    font-size: 1.1em;
    top: 2px;
}

.events-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 2;
    min-width: 200px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-size: 1em;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
    border-color: #e10600;
    background: rgba(255, 255, 255, 0.15);
}

.category-filter,
.region-filter,
.day-filter {
    flex: 1;
    min-width: 180px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-filter option,
.region-filter option,
.day-filter option {
    background: #2d2d44;
    color: white;
    padding: 10px;
}

.category-filter:focus,
.region-filter:focus,
.day-filter:focus {
    outline: none;
    border-color: #e10600;
}

.events-list {
    display: grid;
    gap: 15px;
}

.event-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

/* Event Card Hover Effects */
.event-card:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.12);
}

.event-card.f1 {
    border-left-color: #e10600;
}

.event-card.f2 {
    border-left-color: #ff4444;
}

.event-card.f3 {
    border-left-color: #ff8888;
}

.event-card.nascar {
    border-left-color: #ffd700;
}

.event-card.indycar {
    border-left-color: #0066cc;
}

.event-card.wec {
    border-left-color: #ff6600;
}

.event-card.imsa {
    border-left-color: #0099ff;
}

.event-card.rally {
    border-left-color: #00cc66;
}

.event-card.btcc {
    border-left-color: #cc0066;
}

.event-card.supercars {
    border-left-color: #ff00ff;
}

.event-card.dtm {
    border-left-color: #00cccc;
}

.event-card.gt {
    border-left-color: #9900cc;
}

.event-card.elms {
    border-left-color: #ffaa00;
}

.event-card.porsche {
    border-left-color: #cccc00;
}

.event-card.motogp {
    border-left-color: #ff0066;
}

.event-card.xfinity {
    border-left-color: #ffaa00;
}

.event-card.trucks {
    border-left-color: #ff6633;
}

.event-card.supertrofeo {
    border-left-color: #ffdd00;
}

.event-card.mx5 {
    border-left-color: #3399ff;
}

.event-card.ferrari {
    border-left-color: #cc0000;
}

.event-card.carreracup {
    border-left-color: #999900;
}

.event-card.mustang {
    border-left-color: #0055aa;
}

.event-card.gt4 {
    border-left-color: #cc6600;
}

.event-card.gridlife {
    border-left-color: #39ff14;
}

/* Event Card Content Styles */
.event-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 8px;
}

.event-date {
    color: #ffd700;
    font-size: 1em;
    margin-bottom: 5px;
}

.event-location {
    color: #cccccc;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.event-broadcast {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(102, 179, 255, 0.2);
    border: 1px solid rgba(102, 179, 255, 0.4);
    border-radius: 12px;
    font-size: 0.85em;
    color: #99ccff;
    margin-bottom: 8px;
}

.event-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-top: 8px;
    font-weight: bold;
}

/* Event Type Badge Colors */
.event-type.f1 {
    background-color: rgba(225, 6, 0, 0.3);
    color: #ff6b6b;
}

.event-type.f2 {
    background-color: rgba(255, 68, 68, 0.3);
    color: #ff8888;
}

.event-type.f3 {
    background-color: rgba(255, 136, 136, 0.3);
    color: #ffaaaa;
}

.event-type.nascar {
    background-color: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.event-type.indycar {
    background-color: rgba(0, 102, 204, 0.3);
    color: #66b3ff;
}

.event-type.wec {
    background-color: rgba(255, 102, 0, 0.3);
    color: #ff9944;
}

.event-type.imsa {
    background-color: rgba(0, 153, 255, 0.3);
    color: #66bbff;
}

.event-type.rally {
    background-color: rgba(0, 204, 102, 0.3);
    color: #66ff99;
}

.event-type.btcc {
    background-color: rgba(204, 0, 102, 0.3);
    color: #ff6699;
}

.event-type.supercars {
    background-color: rgba(255, 0, 255, 0.3);
    color: #ff66ff;
}

.event-type.dtm {
    background-color: rgba(0, 204, 204, 0.3);
    color: #66ffff;
}

.event-type.gt {
    background-color: rgba(153, 0, 204, 0.3);
    color: #cc66ff;
}

.event-type.elms {
    background-color: rgba(255, 170, 0, 0.3);
    color: #ffcc66;
}

.event-type.porsche {
    background-color: rgba(204, 204, 0, 0.3);
    color: #ffff66;
}

.event-type.motogp {
    background-color: rgba(255, 0, 102, 0.3);
    color: #ff6699;
}

.event-type.xfinity {
    background-color: rgba(255, 170, 0, 0.3);
    color: #ffcc66;
}

.event-type.trucks {
    background-color: rgba(255, 102, 51, 0.3);
    color: #ff9966;
}

.event-type.supertrofeo {
    background-color: rgba(255, 221, 0, 0.3);
    color: #ffee66;
}

.event-type.mx5 {
    background-color: rgba(51, 153, 255, 0.3);
    color: #66bbff;
}

.event-type.ferrari {
    background-color: rgba(204, 0, 0, 0.3);
    color: #ff6666;
}

.event-type.carreracup {
    background-color: rgba(153, 153, 0, 0.3);
    color: #cccc66;
}

.event-type.mustang {
    background-color: rgba(0, 85, 170, 0.3);
    color: #6699cc;
}

.event-type.gt4 {
    background-color: rgba(204, 102, 0, 0.3);
    color: #ff9966;
}

.event-type.gridlife {
    background-color: rgba(57, 255, 20, 0.3);
    color: #39ff14;
}

/* ========== LEGEND SECTION ========== */

/* Series Legend Display */
.legend {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.legend h4 {
    margin-bottom: 15px;
    font-size: 1.2em;
    position: relative;
    padding-left: 25px;
}

.legend h4::before {
    content: '▦';
    position: absolute;
    left: 0;
    color: #e10600;
    font-size: 1em;
    top: 1px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Legend Dot Colors */
.dot.f1 {
    background-color: #e10600;
}

.dot.f2 {
    background-color: #ff4444;
}

.dot.f3 {
    background-color: #ff8888;
}

.dot.nascar {
    background-color: #ffd700;
}

.dot.indycar {
    background-color: #0066cc;
}

.dot.wec {
    background-color: #ff6600;
}

.dot.imsa {
    background-color: #0099ff;
}

.dot.rally {
    background-color: #00cc66;
}

.dot.btcc {
    background-color: #cc0066;
}

.dot.supercars {
    background-color: #ff00ff;
}

.dot.dtm {
    background-color: #00cccc;
}

.dot.gt {
    background-color: #9900cc;
}

.dot.elms {
    background-color: #ffaa00;
}

.dot.porsche {
    background-color: #cccc00;
}

.dot.motogp {
    background-color: #ff0066;
}

.dot.xfinity {
    background-color: #ffaa00;
}

.dot.trucks {
    background-color: #ff6633;
}

.dot.supertrofeo {
    background-color: #ffdd00;
}

.dot.mx5 {
    background-color: #3399ff;
}

.dot.ferrari {
    background-color: #cc0000;
}

.dot.carreracup {
    background-color: #999900;
}

.dot.mustang {
    background-color: #0055aa;
}

.dot.gt4 {
    background-color: #cc6600;
}

.dot.gridlife {
    background-color: #39ff14;
}

.dot.nhra {
    background-color: #ff3300;
}

.dot.michelinpc {
    background-color: #0088ff;
}

.dot.f1academy {
    background-color: #ff1493;
}

.dot.indynxt {
    background-color: #00aaff;
}

.dot.vpscc {
    background-color: #ff6600;
}

.dot.igtc {
    background-color: #9933ff;
}

.dot.w2rc {
    background-color: #00dd88;
}

.dot.nls {
    background-color: #66cc00;
}

.dot.erc {
    background-color: #00cc99;
}

.dot.iomtt {
    background-color: #ff0099;
}

/* ========== FOOTER SECTION ========== */

footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid rgba(225, 6, 0, 0.5);
}

.footer-section h4 {
    color: #ffd700;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.footer-section p {
    opacity: 0.8;
    font-size: 0.85em;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-section p:last-child {
    margin-bottom: 0;
}

/* ========== ADVERTISING (FUTURE USE) ========== */

/* Google AdSense Ad Containers */
.ad-container {
    margin: 30px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

.ad-label {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.ad-top-banner {
    margin-top: 20px;
    margin-bottom: 30px;
}

.ad-mid-content {
    margin: 40px auto;
}

.ad-bottom-content {
    margin: 30px auto 40px;
}

/* AdSense responsive sizing */
.adsbygoogle {
    display: block;
    margin: 0 auto;
}

/* ========== MODALS ========== */

/* Donation Modal Styles */
.donate-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.donate-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-content {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border: 3px solid #e10600;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 10px 40px rgba(225, 6, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.donate-header {
    background: linear-gradient(135deg, #e10600 0%, #b00500 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 13px 13px 0 0;
    position: relative;
    overflow: hidden;
}

.donate-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        90deg,
        #ffffff 0px,
        #ffffff 20px,
        #000000 20px,
        #000000 40px
    );
}

.donate-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        90deg,
        #ffffff 0px,
        #ffffff 20px,
        #000000 20px,
        #000000 40px
    );
}

.donate-header h2 {
    margin: 0;
    font-size: 1.8em;
    position: relative;
    z-index: 1;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.donate-body {
    padding: 30px;
}

.donate-message {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ffd700;
    margin-bottom: 25px;
}

.donate-message h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

.donate-message p {
    line-height: 1.6;
    margin-bottom: 10px;
}

.donate-options {
    display: grid;
    gap: 15px;
}

.donate-option {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.donate-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(
        to bottom,
        #e10600 0%,
        #ffd700 50%,
        #e10600 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.donate-option:hover {
    background: rgba(225, 6, 0, 0.15);
    border-color: #e10600;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(225, 6, 0, 0.3);
}

.donate-option:hover::before {
    opacity: 1;
}

.donate-option-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.donate-option-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.donate-option-desc {
    font-size: 0.9em;
    color: #cccccc;
}

.donate-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.donate-note {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(225, 6, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    font-size: 0.85em;
    color: #ffd700;
    font-style: italic;
    text-align: center;
    position: relative;
}

.donate-note::before {
    content: '🏁';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    font-size: 1.5em;
}

.donate-note::after {
    content: '🏁';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    font-size: 1.5em;
}

/* ========== DAY EVENTS MODAL ========== */

/* Day Events Modal Styles */
.day-events-list {
    display: grid;
    gap: 15px;
}

.day-event-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.day-event-card {
    cursor: pointer;
}

.day-event-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
}

.day-event-card.f1 { border-left-color: #e10600; }
.day-event-card.f2 { border-left-color: #ff4444; }
.day-event-card.f3 { border-left-color: #ff8888; }
.day-event-card.nascar { border-left-color: #ffd700; }
.day-event-card.xfinity { border-left-color: #ffaa00; }
.day-event-card.trucks { border-left-color: #ff6633; }
.day-event-card.indycar { border-left-color: #0066cc; }
.day-event-card.wec { border-left-color: #ff6600; }
.day-event-card.imsa { border-left-color: #0099ff; }
.day-event-card.rally { border-left-color: #00cc66; }
.day-event-card.btcc { border-left-color: #cc0066; }
.day-event-card.supercars { border-left-color: #ff00ff; }
.day-event-card.dtm { border-left-color: #00cccc; }
.day-event-card.gt { border-left-color: #9900cc; }
.day-event-card.gt4 { border-left-color: #cc6600; }
.day-event-card.elms { border-left-color: #ffaa00; }
.day-event-card.porsche { border-left-color: #cccc00; }
.day-event-card.carreracup { border-left-color: #999900; }
.day-event-card.supertrofeo { border-left-color: #ffdd00; }
.day-event-card.ferrari { border-left-color: #cc0000; }
.day-event-card.mx5 { border-left-color: #3399ff; }
.day-event-card.mustang { border-left-color: #0055aa; }
.day-event-card.motogp { border-left-color: #ff0066; }
.day-event-card.gridlife { border-left-color: #39ff14; }

.day-event-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffffff;
}

.day-event-location {
    color: #cccccc;
    font-size: 1em;
    margin-bottom: 8px;
}

.day-event-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
}

.day-event-type.f1 { background-color: rgba(225, 6, 0, 0.3); color: #ff6b6b; }
.day-event-type.f2 { background-color: rgba(255, 68, 68, 0.3); color: #ff8888; }
.day-event-type.f3 { background-color: rgba(255, 136, 136, 0.3); color: #ffaaaa; }
.day-event-type.nascar { background-color: rgba(255, 215, 0, 0.3); color: #ffd700; }
.day-event-type.xfinity { background-color: rgba(255, 170, 0, 0.3); color: #ffcc66; }
.day-event-type.trucks { background-color: rgba(255, 102, 51, 0.3); color: #ff9966; }
.day-event-type.indycar { background-color: rgba(0, 102, 204, 0.3); color: #66b3ff; }
.day-event-type.wec { background-color: rgba(255, 102, 0, 0.3); color: #ff9944; }
.day-event-type.imsa { background-color: rgba(0, 153, 255, 0.3); color: #66bbff; }
.day-event-type.rally { background-color: rgba(0, 204, 102, 0.3); color: #66ff99; }
.day-event-type.btcc { background-color: rgba(204, 0, 102, 0.3); color: #ff6699; }
.day-event-type.supercars { background-color: rgba(255, 0, 255, 0.3); color: #ff66ff; }
.day-event-type.dtm { background-color: rgba(0, 204, 204, 0.3); color: #66ffff; }
.day-event-type.gt { background-color: rgba(153, 0, 204, 0.3); color: #cc66ff; }
.day-event-type.gt4 { background-color: rgba(204, 102, 0, 0.3); color: #ff9966; }
.day-event-type.elms { background-color: rgba(255, 170, 0, 0.3); color: #ffcc66; }
.day-event-type.porsche { background-color: rgba(204, 204, 0, 0.3); color: #ffff66; }
.day-event-type.carreracup { background-color: rgba(153, 153, 0, 0.3); color: #cccc66; }
.day-event-type.supertrofeo { background-color: rgba(255, 221, 0, 0.3); color: #ffee66; }
.day-event-type.ferrari { background-color: rgba(204, 0, 0, 0.3); color: #ff6666; }
.day-event-type.mx5 { background-color: rgba(51, 153, 255, 0.3); color: #66bbff; }
.day-event-type.mustang { background-color: rgba(0, 85, 170, 0.3); color: #6699cc; }
.day-event-type.motogp { background-color: rgba(255, 0, 102, 0.3); color: #ff6699; }
.day-event-type.gridlife { background-color: rgba(57, 255, 20, 0.3); color: #39ff14; }

.no-events-message {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.7;
    font-size: 1.1em;
}

/* ========== EVENT SCHEDULE MODAL ========== */

/* Event Schedule Modal Styles */
.event-schedule-info {
    display: grid;
    gap: 20px;
}

.schedule-header {
    background: rgba(225, 6, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
    margin-bottom: 10px;
}

.schedule-event-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 8px;
}

.schedule-event-location {
    color: #cccccc;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.schedule-event-date {
    color: #ffd700;
    font-size: 1em;
}

.schedule-sessions {
    display: grid;
    gap: 12px;
}

.schedule-session {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 3px solid #ffd700;
    transition: all 0.3s ease;
}

.schedule-session:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.schedule-session.practice {
    border-left-color: #66b3ff;
}

.schedule-session.qualifying {
    border-left-color: #ffaa00;
}

.schedule-session.race {
    border-left-color: #e10600;
}

.schedule-session.sprint {
    border-left-color: #ff6699;
}

.session-time {
    font-size: 1.1em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 5px;
}

.session-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 3px;
}

.session-duration {
    color: #cccccc;
    font-size: 0.9em;
}

/* Broadcast Information */
.broadcast-info {
    background: rgba(102, 179, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #66b3ff;
    margin: 15px 0;
}

.broadcast-header {
    font-size: 1.3em;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 15px;
}

.broadcast-section {
    margin-bottom: 12px;
}

.broadcast-label {
    color: #ffaa00;
    font-weight: bold;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.broadcast-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.broadcast-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
}

.broadcast-badge.tv {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.broadcast-badge.streaming {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.broadcast-note {
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    color: #cccccc;
    font-size: 0.9em;
    font-style: italic;
}

.schedule-note {
    background: rgba(255, 215, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #ffd700;
    margin-top: 10px;
    font-style: italic;
    color: #ffee99;
}

.weather-section {
    background: rgba(0, 153, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #0099ff;
    margin-top: 10px;
}

.weather-header {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.weather-forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.weather-day {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.weather-day:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.weather-day-name {
    font-weight: bold;
    color: #66b3ff;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.weather-icon {
    font-size: 2.5em;
    margin: 10px 0;
}

.weather-temp {
    font-size: 1.4em;
    font-weight: bold;
    color: #ffffff;
    margin: 8px 0;
}

.weather-desc {
    color: #cccccc;
    font-size: 0.85em;
    margin-top: 5px;
    text-transform: capitalize;
}

.weather-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85em;
}

.weather-detail-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    color: #cccccc;
}

.weather-loading {
    text-align: center;
    padding: 20px;
    color: #66b3ff;
    font-style: italic;
}

.weather-error {
    text-align: center;
    padding: 20px;
    color: #ff6b6b;
}

.weather-historical {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.weather-historical-note {
    color: #ffee99;
    font-size: 0.9em;
    font-style: italic;
    margin-bottom: 10px;
}

.weather-avg {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.weather-avg-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 5px;
    text-align: center;
}

.weather-avg-label {
    color: #66b3ff;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.weather-avg-value {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: bold;
}

/* ========== SETTINGS MODAL ========== */

/* Settings Modal Styles */
.settings-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.settings-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.setting-item label {
    flex: 1;
    font-size: 1.1em;
    color: #ffffff;
}

.setting-select {
    flex: 2;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-select option {
    background: #2d2d44;
    color: white;
    padding: 10px;
}

.setting-select:focus {
    outline: none;
    border-color: #e10600;
}

.timezone-info {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 5px;
    border-left: 3px solid #ffd700;
    font-size: 0.9em;
    color: #ffee99;
}

.settings-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.time-zone-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 3px;
    font-size: 0.8em;
    color: #ffd700;
    margin-left: 8px;
}

/* ========== GENERAL MODAL STYLES ========== */

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border: 2px solid rgba(225, 6, 0, 0.5);
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #e10600 0%, #c70000 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: rotate(90deg);
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1em;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* ========== NOTIFICATION MODAL ========== */

/* Notification Modal Info Section */
.notification-info {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #ffd700;
}

.notification-info p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.btn-enable {
    background: linear-gradient(135deg, #00cc66 0%, #009944 100%);
    margin-bottom: 10px;
}

.btn-enable:hover {
    box-shadow: 0 4px 8px rgba(0, 204, 102, 0.4);
}

.btn-enable:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notification-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.notification-status.success {
    background: rgba(0, 204, 102, 0.2);
    color: #00ff88;
}

.notification-status.error {
    background: rgba(225, 6, 0, 0.2);
    color: #ff6b6b;
}

.notification-timing {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-timing label {
    font-weight: bold;
    font-size: 1.1em;
}

.timing-select {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-size: 1em;
    cursor: pointer;
}

.timing-select option {
    background: #2d2d44;
    color: white;
    padding: 10px;
}

.timing-select:focus {
    outline: none;
    border-color: #e10600;
}

.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.filter-select {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-size: 1em;
    cursor: pointer;
}

.filter-select option {
    background: #2d2d44;
    color: white;
    padding: 10px;
}

.filter-select:focus {
    outline: none;
    border-color: #e10600;
}

.notification-events-list {
    display: grid;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.notification-events-list::-webkit-scrollbar {
    width: 8px;
}

.notification-events-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.notification-events-list::-webkit-scrollbar-thumb {
    background: rgba(225, 6, 0, 0.5);
    border-radius: 10px;
}

.notification-events-list::-webkit-scrollbar-thumb:hover {
    background: rgba(225, 6, 0, 0.7);
}

.notification-event-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.notification-event-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.notification-event-item.f1 {
    border-left-color: #e10600;
}

.notification-event-item.f2 {
    border-left-color: #ff4444;
}

.notification-event-item.f3 {
    border-left-color: #ff8888;
}

.notification-event-item.nascar {
    border-left-color: #ffd700;
}

.notification-event-item.indycar {
    border-left-color: #0066cc;
}

.notification-event-item.wec {
    border-left-color: #ff6600;
}

.notification-event-item.imsa {
    border-left-color: #0099ff;
}

.notification-event-item.rally {
    border-left-color: #00cc66;
}

.notification-event-item.btcc {
    border-left-color: #cc0066;
}

.notification-event-item.supercars {
    border-left-color: #ff00ff;
}

.notification-event-item.dtm {
    border-left-color: #00cccc;
}

.notification-event-item.gt {
    border-left-color: #9900cc;
}

.notification-event-item.elms {
    border-left-color: #ffaa00;
}

.notification-event-item.porsche {
    border-left-color: #cccc00;
}

.notification-event-item.motogp {
    border-left-color: #ff0066;
}

.notification-event-item.xfinity {
    border-left-color: #ffaa00;
}

.notification-event-item.trucks {
    border-left-color: #ff6633;
}

.notification-event-item.supertrofeo {
    border-left-color: #ffdd00;
}

.notification-event-item.mx5 {
    border-left-color: #3399ff;
}

.notification-event-item.ferrari {
    border-left-color: #cc0000;
}

.notification-event-item.carreracup {
    border-left-color: #999900;
}

.notification-event-item.mustang {
    border-left-color: #0055aa;
}

.notification-event-item.gt4 {
    border-left-color: #cc6600;
}

.notification-event-item.gridlife {
    border-left-color: #39ff14;
}

.notification-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #e10600;
}

.notification-event-info {
    flex: 1;
}

.notification-event-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.notification-event-date {
    color: #ffd700;
    font-size: 0.9em;
}

.notification-bell {
    font-size: 1.2em;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.notification-event-item.enabled .notification-bell {
    opacity: 1;
    color: #ffd700;
}

/* ========== RESPONSIVE STYLES ========== */

/* Touch-friendly improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
    .btn, .calendar-day, .event-card, .donate-option,
    .notification-event, .day-event-card, .schedule-session {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(225, 6, 0, 0.2);
    }

    .btn:active {
        transform: scale(0.98);
    }

    .calendar-day:active {
        transform: scale(0.98);
    }

    .event-card:active,
    .day-event-card:active {
        transform: translateX(3px);
    }
}

/* Tablet Styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .header-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        width: 100%;
    }

    .header-buttons .btn {
        flex: 0 1 auto;
        min-width: 140px;
    }

    .calendar-grid {
        gap: 5px;
        padding: 10px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 8px;
        font-size: 0.85em;
    }

    .day-number {
        font-size: 1em;
    }

    .event-label {
        font-size: 0.6em;
        padding: 2px 3px;
    }

    .calendar-controls {
        gap: 15px;
    }

    .calendar-controls h2 {
        font-size: 1.4em;
        flex: 1;
        text-align: center;
    }

    .calendar-controls .btn {
        padding: 8px 14px;
        font-size: 1.4em;
    }

    .btn-text-desktop {
        display: none;
    }

    .btn-text-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2em;
        line-height: 1;
    }

    .calendar-filter-section {
        padding: 15px;
    }

    .filter-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-header label {
        font-size: 0.85em;
        text-align: center;
        margin-bottom: 10px;
    }

    .filter-controls-btns {
        width: 100%;
    }

    .filter-controls-btns .btn-small {
        flex: 1;
    }

    .calendar-filter-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .filter-checkbox-label {
        padding: 8px 12px;
    }

    .filter-checkbox-text {
        font-size: 0.85em;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .logo h1 {
        font-size: 1.6em;
        letter-spacing: 2px;
    }

    .logo-grid {
        font-size: 2em;
    }

    .subtitle {
        font-size: 0.85em;
        margin-left: 50px;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: 20px;
    }

    .donate-content {
        width: 95%;
    }

    .donate-header h2 {
        font-size: 1.4em;
    }

    .donate-body {
        padding: 20px;
    }

    .donate-option-icon {
        font-size: 2em;
    }

    .donate-option-title {
        font-size: 1em;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-select, #categoryFilter {
        width: 100%;
    }

    .notification-timing {
        flex-direction: column;
        align-items: flex-start;
    }

    .timing-select {
        width: 100%;
    }

    .events-controls {
        flex-direction: column;
        gap: 10px;
    }

    #searchEvents, #categoryFilter, #regionFilter, #dayFilter {
        width: 100%;
    }

    .event-card {
        padding: 15px;
    }

    .event-time {
        font-size: 0.85em;
    }

    .weather-forecast {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .weather-day {
        padding: 10px;
    }

    .legend-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .legend-item {
        font-size: 0.85em;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .footer-section {
        text-align: center;
    }

    .schedule-session {
        padding: 12px;
    }

    .day-event-card {
        padding: 15px;
    }
}

/* Large Phone / Small Tablet Styles */
@media (max-width: 600px) {
    .header-buttons {
        justify-content: center;
    }

    .calendar-controls {
        gap: 12px;
    }

    .calendar-controls h2 {
        font-size: 1.3em;
        flex: 1;
        text-align: center;
    }

    .calendar-controls .btn {
        padding: 8px 12px;
        font-size: 1.3em;
    }

    .btn-text-desktop {
        display: none;
    }

    .btn-text-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8em;
        line-height: 1;
    }

    .legend-items {
        grid-template-columns: 1fr;
    }

    .calendar-filter-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 98%;
    }

    .donate-content {
        width: 98%;
    }
}

/* Phone Styles */
@media (max-width: 480px) {
    header {
        padding: 15px 0;
    }

    .logo {
        display: flex;
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }

    .logo h1 {
        font-size: 1.3em;
        letter-spacing: 2px;
    }

    .logo-grid {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 0.75em;
        margin-left: 0;
    }

    .header-buttons {
        justify-content: center;
        width: 100%;
    }

    .header-buttons .btn {
        flex: 0 1 auto;
    }

    .btn-donate, .btn-notification, .btn-settings {
        padding: 10px 16px;
        font-size: 0.9em;
    }

    .calendar-grid {
        gap: 3px;
        padding: 5px;
        font-size: 0.75em;
    }

    .calendar-day {
        min-height: 60px;
        padding: 5px;
        font-size: 0.75em;
    }

    .day-number {
        font-size: 0.9em;
        margin-bottom: 3px;
    }

    .event-label {
        font-size: 0.55em;
        padding: 1px 2px;
        border-left-width: 2px;
    }

    .day-events-labels {
        gap: 2px;
        margin-top: 3px;
    }

    .calendar-controls {
        gap: 10px;
    }

    .calendar-controls h2 {
        font-size: 1em;
        flex: 1;
        text-align: center;
    }

    .calendar-controls .btn {
        padding: 8px 12px;
        font-size: 1.2em;
    }

    .btn-text-desktop {
        display: none;
    }

    .btn-text-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.6em;
        line-height: 1;
    }

    .modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-header h2 {
        font-size: 1.2em;
    }

    .modal-body {
        padding: 15px;
    }

    .donate-content {
        width: 100%;
        border-radius: 0;
    }

    .donate-header {
        padding: 15px 20px;
        border-radius: 0;
    }

    .donate-header h2 {
        font-size: 1.2em;
    }

    .donate-body {
        padding: 15px;
    }

    .donate-message {
        padding: 15px;
    }

    .donate-message h3 {
        font-size: 1.1em;
    }

    .donate-message p {
        font-size: 0.9em;
    }

    .donate-option {
        padding: 15px;
    }

    .donate-option-icon {
        font-size: 1.8em;
    }

    .donate-option-title {
        font-size: 0.95em;
    }

    .donate-option-desc {
        font-size: 0.8em;
    }

    .donate-note {
        font-size: 0.8em;
        padding: 12px;
        padding-left: 35px;
        padding-right: 35px;
    }

    .donate-note::before,
    .donate-note::after {
        font-size: 1.2em;
    }

    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 1.5em;
    }

    .events-section h3 {
        font-size: 1.3em;
    }

    .event-card {
        padding: 12px;
    }

    .event-title {
        font-size: 1em;
    }

    .event-location, .event-time {
        font-size: 0.8em;
    }

    .event-category {
        font-size: 0.75em;
        padding: 3px 8px;
    }

    .search-input {
        font-size: 16px;
        padding: 10px;
    }

    .category-filter,
    .region-filter,
    .day-filter {
        font-size: 16px;
        padding: 10px;
    }

    input, select, textarea {
        font-size: 16px !important;
    }

    .legend h4 {
        font-size: 1em;
    }

    .legend-items {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .legend-item {
        font-size: 0.8em;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .filter-controls {
        gap: 8px;
    }

    .btn-small {
        padding: 8px 12px;
        font-size: 0.8em;
    }

    .notification-event {
        padding: 12px;
    }

    .notification-event h4 {
        font-size: 0.95em;
    }

    .notification-event p {
        font-size: 0.8em;
    }

    .schedule-session {
        padding: 10px;
    }

    .session-name {
        font-size: 0.9em;
    }

    .session-time, .session-weather {
        font-size: 0.8em;
    }

    .weather-forecast {
        padding: 10px;
    }

    .weather-day {
        padding: 8px;
    }

    .weather-day-name {
        font-size: 0.8em;
    }

    .weather-temp {
        font-size: 0.9em;
    }

    .weather-icon {
        font-size: 1.5em;
    }

    .day-event-card {
        padding: 12px;
    }

    .day-event-title {
        font-size: 1em;
    }

    .day-event-time {
        font-size: 0.8em;
    }

    footer {
        font-size: 0.85em;
        padding: 20px 0;
    }

    .footer-content {
        gap: 15px;
    }

    .footer-section h4 {
        font-size: 1em;
    }

    .footer-section p {
        font-size: 0.85em;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .setting-select {
        width: 100%;
    }

    .timezone-info {
        font-size: 0.8em;
    }

    .btn-enable {
        width: 100%;
        padding: 12px;
        font-size: 0.9em;
    }

    #saveSettings {
        width: 100%;
        padding: 12px;
    }

    .back-btn {
        font-size: 0.85em;
        padding: 6px 10px;
    }
}
