* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    text-align: left;
    max-width: 100%;
}

img,
video,
audio,
table {
    max-width: 100%;
    height: auto;
}

body {
    background-color: #f9f9f9;
}

.container {
    padding: 0 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #333;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 10px;
    padding: 0 10px 10px;
}

.header {
    background-color: #e10600;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    height: 50px;
    width: auto;
}

.menu-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.menu-button {
    background-color: white;
    color: #333;
    padding: 10px 15px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.menu-button:hover {
    background-color: #333;
    color: white;
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.content-table th,
.content-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.content-table th {
    background-color: #333;
    color: white;
    position: sticky;
    top: 0;
}

.content-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.content-table tr:hover {
    background-color: #f0f0f0;
}

.champion {
    background-color: #ffd700 !important;
    font-weight: bold;
}

@media screen and (max-width: 768px) {
    .content-table {
        display: block;
        overflow-x: auto;
    }

    .content-table th,
    .content-table td {
        padding: 8px;
        font-size: 14px;
    }
}

.flag {
    height: 13px;
    vertical-align: middle;
    margin-left: 5px;
}

.career-stats {
    white-space: pre-line;
}

.rookie {
    color: #e10600;
    font-weight: bold;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #e10600;
}

@media print {
    .content-table {
        font-size: 10pt !important;
    }

    .champion {
        background-color: #ffffe0 !important;
    }

    .flag {
        height: 10px !important;
    }
}

/* Footer stílus */
.footer {
    background-color: #e10600;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

/* Dark mode stílusok */
.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

.dark-mode main {
    background-color: rgba(30, 30, 30, 0.9);
    color: #e0e0e0;
}

.dark-mode .header,
.dark-mode .footer {
    background-color: #1a1a1a;
}

.dark-mode .menu-button {
    background-color: #333;
    color: #e0e0e0;
}

.dark-mode .menu-button:hover {
    background-color: #e10600;
}

.dark-mode .content-table {
    color: #1a1a1a;
}

#dark-mode-toggle {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

#dark-mode-toggle:hover {
    background-color: #555;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #e10600;
    color: white;
    padding: 8px;
    z-index: 100;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #000;
}

.driver-link:visited {
    color: grey;
}

@media screen and (max-width: 768px) {

    .content-table,
    .teams-table,
    .track-stats {
        display: block;
        overflow-x: auto;
        width: 100%;
    }

    .content-table th,
    .content-table td,
    .teams-table th,
    .teams-table td,
    .track-stats th,
    .track-stats td {
        font-size: 14px;
        padding: 10px;
    }
}