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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 10px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

.main-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    margin: 20px 0;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.filter-container {
    max-width: 800px;
    margin: 15px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.filter-label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.filter-input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 18px;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

.filter-input:focus {
    border-color: #ADD8E6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(173, 216, 230, 0.2);
}

.jump-section {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.jump-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.jump-input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 18px;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
}

.jump-input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.jump-button {
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
}

.jump-button:hover {
    background: #45a049;
}

.jump-button:active {
    background: #3d8b40;
}

.clear-button {
    padding: 12px 24px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
}

.clear-button:hover {
    background: #d32f2f;
}

.clear-button:active {
    background: #c62828;
}

.results-summary {
    text-align: center;
    margin: 15px 0;
    font-size: 16px;
    color: #666;
}

.no-matches {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 18px;
}

.error-view {
    background: #ffebee;
    border: 3px solid #f44336;
    border-radius: 8px;
    padding: 40px 20px;
    margin: 40px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.error-icon {
    font-size: 48px;
    color: #f44336;
    margin-bottom: 20px;
    display: block;
}

.error-message {
    font-size: 20px;
    color: #d32f2f;
    font-weight: bold;
    line-height: 1.4;
}

.race-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.race-table th,
.race-table td {
    border: 2px solid black;
    padding: 8px;
    text-align: center;
    font-size: 16px;
}

.race-header {
    background: #ADD8E6;
    font-weight: bold;
    font-size: 18px;
}

.race-title {
    background: white;
    font-weight: bold;
    font-size: 18px;
}

.color-indicator {
    background: #ADD8E6;
    font-weight: bold;
    font-size: 18px;
    width: 60px;
}

.subheader {
    background: white;
    font-weight: bold;
    font-size: 14px;
}

.lane-col {
    width: 60px;
}

.place-col {
    width: 80px;
}

.team-col {
    text-align: left;
    padding-left: 12px;
}

.time-col {
    width: 100px;
}

.advancement-row {
    background: white;
    text-align: center;
    font-size: 14px;
}

.advancement-row td {
    padding: 12px;
}

.penalty-row {
    text-align: center;
    font-size: 14px;
}

.penalty-row td {
    padding: 12px;
}

.updated-time-row {
    background: #e6ffe6;
    color: #006600;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

.updated-time-row td,
.results-pending-row td {
    padding: 8px;
}

.results-pending-row {
    background: #ffe5e5;
    color: #cc0000;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.race-number-cell {
    background: #ADD8E6;
    font-weight: bold;
    width: 60px;
}

/* Day Content */
.day-content {
    display: none;
}

.day-content.active {
    display: block;
}

@media (max-width: 700px) {
    .filter-container {
        margin: 10px auto;
        padding: 15px;
    }

    .filter-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .jump-section {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .jump-group {
        margin-bottom: 10px;
    }

    .main-title {
        font-size: 24px;
        margin: 15px 0;
    }

    .day-tabs {
        margin: 0 10px 20px 10px;
    }

    .day-tab {
        font-size: 16px;
        padding: 12px 15px;
    }

    .error-view {
        margin: 20px 10px;
        padding: 30px 15px;
    }

    .error-icon {
        font-size: 36px;
    }

    .error-message {
        font-size: 16px;
    }

    .race-table th,
    .race-table td {
        font-size: 12px;
        padding: 4px 2px;
    }

    .race-header,
    .race-title {
        font-size: 14px;
    }

    .team-col {
        padding-left: 6px;
    }

    .lane-col,
    .place-col,
    .time-col {
        width: auto;
    }
}