body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #121212;
    color: #ffffff;
}

.top-banner {
    background: #E10600;
    color: white;
    text-align: center;
    padding: 15px;
    font-weight: bold;
    font-size: 1.4em;
    letter-spacing: 2px;
}

.official-link {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    text-decoration: underline;
    font-size: 1em;
    transition: color 0.3s ease;
}

.official-link:hover {
    color: #E10600;
}

header {
    background: #202020;
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    margin: 0;
    flex: 1 100%;
}

.timer {
    position: absolute;
    right: 1.5rem;
    font-size: 1.2em;
    background: #E10600;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.timer-text {
    margin-right: 10px;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1,
h2 {
    color: #E10600;
    text-align: center;
    text-transform: uppercase;
}

h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.standing-link {
    position: absolute;
    right: 0;
    font-size: 1em;
    color: #E10600;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    background: #1E1E1E;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.standing-link:hover {
    transform: translateY(-5px);
}

ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

li {
    background: #1E1E1E;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

li:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

li.next {
    border: 2px solid #007BFF;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

li .status-box.next {
    background: #007BFF !important;
    color: white !important;
}

.race-info {
    padding: 15px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

header nav ul {
    list-style: none;
    padding: 0;
}

header nav ul li {
    display: inline;
    margin-right: 10px;
}

header nav ul li a {
    text-decoration: none;
    color: #000;
}

header nav ul li a:hover {
    text-decoration: underline;
}
.race-name {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.race-date,
.race-location {
    font-size: 0.9em;
    color: #bbb;
}

.flag {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    margin-left: 10px;
}

.status-box {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-box.finished {
    background: #E10600;
    color: white;
}

.status-box.next {
    background: #007BFF;
    color: white;
}

.status-box.yet {
    background: #FFD700;
    color: black;
}

.contact-email {
    font-size: 0.8em;
    color: #ccc;
    text-align: center;
    margin-top: 10px;
}
.contact-email a {
    color: #ccc;
    text-decoration: none;
}
.contact-email a:hover {
    color: #E10600;
    text-decoration: underline;
}


#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1E1E1E;
    border: 1px solid #E10600;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    padding: 20px;
}

#popup img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 20px;
}

#popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #E10600;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

.driver-info {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.driver-box {
    background-color: #555;
    border-radius: 4px;
    padding: 5px;
    text-align: left;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.driver-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.driver-name {
    margin: 0;
    font-size: 1.4em;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-align: left;
    flex: 1;
}

.driver-box .team-logo {
    width: 60px !important;
    height: 60px !important;
    border-radius: 4px;
    text-align: right;
}

.driver-record {
    margin-top: 2px;
    font-size: 1.2em;
    color: #ddd;
    text-align: center;
    font-weight: bold;
    flex: 1;
}

.first-place {
    border: 2px solid gold;
}

.second-place {
    border: 2px solid silver;
}

.third-place {
    border: 2px solid #cd7f32;
}

.red-bull-racing strong {
    color: #002147;
}

.ferrari strong {
    color: #DC0000;
}

.mclaren strong {
    color: #FF8700;
}

.mercedes strong {
    color: #00D2BE;
}

.alpine strong {
    color: #0090FF
}

.haas strong {
    color: #FFFFFF;
}

.williams strong {
    color: #005AFF;
}

.kick-sauber strong {
    color: #00AC28
}

.rb strong {
    color: #1C33C3
}

.aston-martin strong {
    color: #5f9d89;
}

.placeholder strong {
    color: #AAAAAA;
}

.popup-content-wrapper {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.popup-section {
    width: 45%;
    flex: 1 1 45%;
}

.popup-section h3 {
    text-align: center;
    color: #E10600;
    font-size: 2em;
}

.popup-section .driver-box {
    height: auto;
    margin-bottom: 10px;
}

/* Team-specific driver number styles */
.driver-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 10px;
    padding: 2px 5px;
    border-radius: 3px;
}

.red-bull-racing .driver-number {
    background-color: #E10600;
    color: white;
}

.mclaren .driver-number {
    background-color: #FF8700;
    color: white;
}

.ferrari .driver-number {
    background-color: #DC0000;
    color: white;
}

.mercedes .driver-number {
    background-color: #00D2BE;
    color: white;
}

.alpine .driver-number {
    background-color: #0090FF;
    color: white;
}

.haas .driver-number {
    background-color: #FFFFFF;
    color: black;
}

.williams .driver-number {
    background-color: #005AFF;
    color: white;
}

.kick-sauber .driver-number {
    background-color: #00AC28;
    color: white;
}

.rb .driver-number {
    background-color: #1C33C3;
    color: white;
}

.aston-martin .driver-number {
    background-color: #5f9d89;
    color: white;
}

.banner-link {
    color: white !important;
    text-decoration: none !important;
}
.banner-link:hover {
    text-decoration: none !important;
    color: #ffffff !important;
}

/* feedback section */
#feedback {
    display: none;w
    background-color: #202020;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    width: 50%;
}

#feedback h2 {
    color: #E10600;
    text-align: center;
}

#feedback-input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    resize: none;
}

#submit-feedback {
    display: block;
    width: 100%;
    background-color: #E10600;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

#submit-feedback:hover {
    background-color: #ff3b3b;
}

/* admin feedback list */
#feedback-list {
    background-color: #202020;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    width: 50%;
}

#feedback-list h2 {
    color: #E10600;
    text-align: center;
}

#feedback-container {
    list-style-type: none;
    padding: 0;
}

#feedback-container li {
    background-color: #333;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    color: #ffffff;
}

.footer-content {
    background-color: #202020;
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    width: 50%;
    text-align: center;
}

.footer-content p {
    margin: 0;
}

/* Media Queries */
@media (max-width: 768px) {
    .timer, .standing-link {
        position: static;
        transform: none;
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }

    header {
        flex-direction: column;
    }

    h2 {
        flex-direction: column;
    }

    .driver-info {
        flex-direction: column;
    }

    .popup-content-wrapper {
        flex-direction: column;
    }

    .popup-section {
        width: 100%;
    }
    
    /* feedback section */
    #feedback, #feedback-list, .footer-content {
        width: 100%;
    }
}
