/* 1. Global resets & dark background */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background-color: #0E0F14;
    color: #E0E0E0;
    line-height: 1.6;
}

/* 2. Hero header */
.header {
    width: 100%;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1F1F2E 0%, #15151F 100%);
    text-align: center;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.header h3 {
    font-size: 1.25rem;
    font-weight: 400;
    color: #A0A0A0;
}

/* 3. Card container for tables & forms */
.table,
.sim-selector,
#driverComparison {
    width: 90%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #1F1F2E;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* 4. Section titles */
.table h2,
.sim-selector h3,
#driverComparison h2 {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.table p {
    color: #A0A0A0;
    margin-bottom: 1.5rem;
}

/* 5. Tables */
.table table,
.race-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 64px;
}

.table th,
.table td,
.race-table th,
.race-table td {
    padding: 0.75rem 1rem;
    text-align: left;
}

.table thead tr,
.race-table thead tr {
    background-color: #2A2A3F;
}

.table thead th,
.race-table thead th {
    color: #FFFFFF;
    font-weight: 500;
}

.table tbody tr:nth-child(even),
.race-table tbody tr:nth-child(even) {
    background-color: #1A1A2A;
}

.table tbody tr:nth-child(odd),
.race-table tbody tr:nth-child(odd) {
    background-color: #15151F;
}

/* narrow first column, wide second */
.table th:first-child,
.table td:first-child {
    width: 60px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    min-width: 200px;
}

/* 6. Inputs & selects */
input,
select {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    color: #E0E0E0;
    background-color: #1A1A2A;
    border: 1px solid #3A3A4F;
    border-radius: 8px;
    margin-right: 0.5rem;
    outline: none;
}

input::placeholder {
    color: #6A6A78;
}

/* 7. Buttons */
button {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    color: white;
    background: linear-gradient(90deg, #7950F2 0%, #4C6EF5 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.2s ease;
}

button:hover {
    filter: brightness(1.1);
}

/* 8. Utility spacing */
.sim-selector input,
.sim-selector select,
.sim-selector button,
#driverComparison select,
#driverComparison button {
    margin-bottom: 1rem;
}

/* 9. Race‐table tweaks */
.race-table {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.race-table th:first-child,
.race-table td:first-child {
    width: 80px;
}

/* 10. Responsive tweaks */
@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }

    .header h3 {
        font-size: 1rem;
    }

    .table,
    .sim-selector,
    #driverComparison {
        padding: 1rem;
    }

    button {
        width: 100%;
    }

    input,
    select {
        width: 100%;
        margin-bottom: 0.75rem;
    }
}

.table button {
    margin-top: 10px;
}

/* wrap the table so it can scroll if it overflows */
#finishGraph {
  overflow-x: auto;
  padding-bottom: 1rem;
}

/* make the distribution table use fixed layout and 100% width */
#positionDistTable {
  table-layout: fixed;
  width: 100%;
  font-size: 0.5rem;           /* smaller font */
  border-collapse: collapse;
}

/* tighten up cells */
#positionDistTable th,
#positionDistTable td {
  padding: 2px 4px;
  text-align: right;
  white-space: nowrap;
}

#positionDistTable tbody text {
      mix-blend-mode: difference;
}

/* make the driver name column a little wider */
#positionDistTable th:first-child,
#positionDistTable td:first-child {
  text-align: left;
  width: 9em;                  /* driver name column width */
}

 #finishGraph,
    #positionDistTable,
    #positionDistTable th,
    #positionDistTable td {
        border: none !important;
        outline: none !important;
    }

#standings {
    margin-top: 50px;
    padding: 20px;
}

#standings h2 {
    margin-bottom: 10px;
}

#standings-list {
    list-style: none;
    padding: 0;
}

#standings-list li {
    padding: 5px 0;
    font-size: 16px;
}

#standingsTable {
    width: 90%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #1F1F2E;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
