html {
    background-color: black;
    background-size: cover;
    background-attachment: fixed;
    font-size: 100%;
}

body {
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 2px solid black;
    max-width: 1000px;
    box-shadow: 5px 5px 10px black;
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.mainmotogptitle {
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 200%;
    flex-grow: 1;
    text-align: center;
}

.motogplogotop, .fimlogotop {
    height: 50px;
    width: auto;
}

.solid-line {
    border: none;
    border-top: 2px solid black;
    width: 100%;
    margin: 10px auto;
}

h2 {
    font-size: 125%;
}

.history  {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.rulechanges-title{
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    text-align: center;
}

.history-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.text-container {
    flex: 1;
    text-align: justify;
}

.history-pre-2024 {
    font-size: 1rem;
    line-height: 1.5;
}

.yamaha2014-2024 {
    max-width: 40%;
    height: auto;
    flex-shrink: 0;
    border-radius: 5px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
}

.problems, .rules-2027 {
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 10px;
}

.highlight {
    font-weight: bold;
}

.tooltip {
    position: relative;
    cursor: pointer;
    color: red;
    font-weight: bold;
    
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 120%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.9em;
    z-index: 10;
}

details {
    margin-bottom: 20px;
}

summary {
    font-size: 1.125rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #ddd;
    padding: 10px;
    border-radius: 5px;
    display: inline-block;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: white;

}

th, td {
    border: 1px solid black;
    padding: 8px;
    text-align: left;
}

.bold{
    font-weight: bold;
}

.motor-header, .chassis-header{
    font-weight: bold;
    font-size: 125%;
    text-align: center;
}

.rulechanges-minititle{
    font-weight: bold;
}

.gallery-section {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
}

.gallery-section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
}

.gallery-item {
    width: 30%;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-bottom: 2px solid #ddd;
}

.gallery-item p {
    font-size: 1em;
    padding: 10px;
    background-color: #f9f9f9;
    margin: 0;
}

@media screen and (max-width: 768px) {
    .gallery-item {
        width: 45%;
    }
}

@media screen and (max-width: 480px) {
    .gallery-item {
        width: 100%;
    }
}

.rulechanges-image-27{
    display: flex;
    justify-content: center;
    margin: 20px 0;
    max-width: 80%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-left: 100px;
}

.rulechanges-explained {
    margin: 40px 0;  
    text-align: center;  
}

.rulechanges-explained video {
    max-width: 100%;  
    height: auto;  
    border-radius: 10px;  
}

.rulechanges-explained figcaption {
    margin-top: 10px;  
    font-size: 1.2em;  
    color: #333;
    font-weight: bold;
}

.motogpnavbar {
    background-color: gainsboro;
    padding: 10px 20px;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbarlist {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

a {
    text-decoration: underline !important;
}

.navbaritem {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    
}

.navbaritem:visited {
    color: gray;
}

.sources-section {
    margin-top: 30px;
    padding: 15px;
    background-color: #f1f1f1;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sources-section h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
}

.sources-list {
    list-style-type: none;
    padding: 0;
}

.sources-list li {
    margin: 5px 0;
}

.sources-list a {
    text-decoration: none;
    color: #0073e6;
    font-weight: bold;
}

.sources-list a:hover {
    text-decoration: underline;
    color: #005bb5;
}

a {
    text-decoration: underline;
}

.nav-menu a, 
.link-list a {
    text-decoration: none;
}


a:visited {
    color: #5a5a5a; 
}

a:link {
    color: #0073e6; 
}

.music{
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}


.music-button {
    padding: 10px 20px;
    font-size: 0.9rem;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.music-button:hover {
    background-color: #0056b3;
}

#backgroundVideo {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: -1; 
}

.disclaimer{
    color: red;
    margin-top: 10px;
    font-weight: bold;
    text-align: center;
}

@media print {

    .motogpnavbar, .top-header, .navbarlist, .sources {
        display: none;
    }


    video {
        display: none;
    }


    img {
        max-width: 70%;
        height: auto;
    }


    body {
        font-size: 12pt; 
        line-height: 1.5; 
        color: black; 
        background-color: white; 
        margin: 0; 
        padding: 0;
    }


    table {
        border-collapse: collapse;
        width: 100%;
    }

    th, td {
        padding: 5px;
        text-align: left;
        border: 1px solid #000;
    }
}

body.accessibility-mode {
    background-color: black !important;
    color: white !important;
    font-size: 1.5em !important;
}

body.accessibility-mode a {
    color: yellow !important;
    background-color: black !important;
}

body.accessibility-mode .top-header,
body.accessibility-mode .motogpnavbar,
body.accessibility-mode .sources-section,
body.accessibility-mode .gallery-item p,
body.accessibility-mode summary {
    background-color: black !important;
    color: white !important;
    border: 2px solid white !important;
}

body.accessibility-mode h1,
body.accessibility-mode h2,
body.accessibility-mode h3,
body.accessibility-mode th,
body.accessibility-mode td {
    font-size: 2em !important;
    color: white !important;
}

body.accessibility-mode .tooltip::after {
    background-color: yellow !important;
    color: black !important;
}
