body {
    font-family: 'Playfair Display', serif;
    color: #FFFFFF;
    background-image: url('formulaone.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

#container {
    max-width: 960px;
    margin: 20px auto;
    background-color: rgba(26, 26, 26, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(237, 17, 49, 0.6);
}

/* Header Styling */
header {
    background-color: #ED1131;
    color: #FFFFFF;
    text-align: center;
    padding: 20px 0;
    border-radius: 5px 5px 0 0;
}

header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Logo Styling */
.header-logo {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 10px auto 0 auto;
}

/* Navigation Styling */
nav {
    background-color: #333333;
    padding: 10px 0;
    text-align: center;
    border-radius: 0 0 5px 5px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

nav ul li a:hover {
    color: #ED1131;
    background-color: #555555;
    border-radius: 3px;
}

/* Main Content Styling */
main {
    padding: 20px 0;
}

main h2 {
    color: #ED1131;
    border-bottom: 2px solid #ED1131;
    padding-bottom: 5px;
    margin-top: 30px;
}

main h3 {
    color: #EEEEEE;
    margin-top: 20px;
}

main p {
    margin-bottom: 15px;
}

main ul {
    list-style: disc;
    margin-left: 20px;
}

main ul li {
    margin-bottom: 5px;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table, th, td {
    border: 1px solid #ED1131;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #ED1131;
    color: #FFFFFF;
    font-weight: bold;
    text-transform: uppercase;
}

tr:nth-child(even) {
    background-color: #333333;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    background-color: #ED1131;
    color: #FFFFFF;
    border-radius: 0 0 5px 5px;
    font-size: 0.9em;
}

/* ----- Car Timeline Styles ----- */
.car-timeline-container {
    margin: 40px auto;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding-bottom: 20px;
    position: relative;
    cursor: grab;
    display: flex;
    align-items: flex-end;
}

.car-timeline-container::-webkit-scrollbar {
    height: 10px;
}

.car-timeline-container::-webkit-scrollbar-track {
    background: #333333;
    border-radius: 10px;
}

.car-timeline-container::-webkit-scrollbar-thumb {
    background-color: #ED1131;
    border-radius: 10px;
    border: 2px solid #333333;
}

.timeline-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    padding: 0 10px 20px 10px;
    margin: 0 5px;
    min-width: 200px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background-color: #ED1131;
}

.timeline-item::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: #ED1131;
    border-radius: 50%;
    z-index: 1;
}

.car-image-container {
    position: relative;
    max-height: 250px;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.car-image-container:hover {
    transform: scale(1.05);
}

.car-image-container img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}

.car-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.7);
    color: #FFFFFF;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9em;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.car-image-container:hover .car-name-overlay {
    opacity: 1;
}