* {
    font-family: "lores-12", sans-serif;
    font-weight: 700;
    font-style: normal;
    touch-action: pinch-zoom; /* Deaktiviert jegliches Zoom- und Scroll-Verhalten */
}



html, body {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0ebe4;
}

#canvas {
    border: 2px solid #77736d;
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    position: relative;
    outline: none;

}




.info-circle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.modal2 {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 200px;
    background-color: white;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.modal2.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.modal-content2 {
    padding: 10px;
    text-align: left;
    position: relative;
}

.modal-content2 h2 {
    color: #77736d;
    margin: 0 0 10px;
}

.modal-content2 ul {
    list-style-type: none;
    padding: 0;
}

.modal-content2 a {
    color: #77736d;
    text-decoration: none;
}

.modal-content2 a:hover {
    text-decoration: underline;
}



.close-button {
    z-index: 15;
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #ffab4a;
}



/* Falls auch in der Liste Anker- oder andere Inline-Elemente sind */
.leaderboard ul li a,
.leaderboard ul li span {
    font-weight: normal !important;
}


.highlight {
    background-color: #d4f4d2; 
    color: #000; 
}

/* Highlight für den eigenen Eintrag */
.leaderboard ul li.highlight {
    background-color: #becabd; /* Bestehendes Highlight */
}

.leaderboard ul li.highlight::after {
    background-color: #1ea049; /* Äußere Umrandung in grün */
}

.leaderboard ul li.highlight::before {
    background-color: #1ea049; /* Äußere horizontale Linie in grün */
}

/* Highlighted Elemente sollen fett sein - mit höherer Spezifizität */
.leaderboard ul li.highlight span {
    color: black;
    font-weight: bold !important;
}


/* Scrollbar-Styling für Webkit-Browser (Chrome, Safari) */
.leaderboard ul::-webkit-scrollbar {
    width: 10px;
}

.leaderboard ul::-webkit-scrollbar-track {
    background: #ccc; /* Farbe des Scrollbar-Tracks */
}

.leaderboard ul::-webkit-scrollbar-thumb {
    background-color: #888; /* Farbe des Scrollbalkens */
    border-radius: 5px;
    border: 2px solid #ccc; /* Abstand zur Leiste */
}

.leaderboard ul::-webkit-scrollbar-thumb:hover {
    background-color: #555; /* Scrollbalken-Farbe bei Hover */
}


/* Highlighted Elemente sollen fett sein - mit höherer Spezifizität */
.leaderboard ul li.highlight span {
    font-weight: bold !important;
}



.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #77736d;
    box-sizing: border-box;
    text-align: center;
    z-index: 25;
}

.logo {
    max-width: 40%;
    height: auto;
    margin-bottom: 20px;
}

.login-input {
    width: 100%;
    padding: 10px;
    font-size: 0.9em;
    font-weight: bold;
    border: 2px solid #77736d;
    box-sizing: border-box;
    text-align: center;
}

.login-button {
    width: 100%;
    font-size: 1em;
    background-color: #fbad50;
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.error-message {
    color: red;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
    display: none;
}

.login-input.error {
    border: 2px solid red;
}

.terms-container {
    display: flex;
    align-items: center;
    margin: 10px 0;
    text-align: left;
    font-size: 14px;
}

.terms-container input[type="checkbox"] {
    margin-right: 10px;
}

.terms-container a {
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}

.terms-container a:hover {
    color: darkblue;
}

/* Zusätzliche Klasse, wenn zwei Eingabefelder aktiv sind */
.login-form.two-fields {
    height: auto; /* Passt die Höhe dynamisch an */
}

body.modal-open #canvas,
body.modal-open .gameover,
body.modal-open .leaderboard,
body.modal-open .info-circle {
    filter: blur(5px); 
    pointer-events: none; 

}

.error {
    border: 2px solid red;
}


/* Modal Style */
.modal {
    display: none; /* Versteckt das Modal standardmäßig */
    position: fixed;
    z-index: 100; /* Über allem */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Halbdurchsichtiger Hintergrund */
    overflow: hidden; /* Verhindert das Scrollen im Hintergrund */
  }
  
  /* Modal-Inhalt */
  .modal-content {
    background-color: #fefefe;
    position: fixed; /* Fixiere das Modal */
    top: 50%; /* Positioniere 50% von oben */
    left: 50%; /* Positioniere 50% von links */
    transform: translate(-50%, -50%); /* Verschiebe das Modal, um es genau zu zentrieren */
    padding: 20px;
    border: 1px solid #888;
    width: 60%; /* Breite des Modals */
    max-width: 800px; /* Maximale Breite des Modals */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Falls der Inhalt zu groß wird, Scroll innerhalb des Modals */
    max-height: 90%; /* Maximale Höhe des Modals, falls der Inhalt zu lang ist */
  }
  
  /* Close-Button im Modal */
  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin-top: -10px; /* Abstand zum Modalrand */
  }
  
  .close:hover,
  .close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
  }
  
  /* Style für Checkbox und Label */
  .terms-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
  }
  
  .terms-container input[type="checkbox"] {
    margin-right: 10px;
  }


/* Stil für die Punktanzeige ohne Kasten */
.highlight-points {
    font-size: 1.5em; /* Größerer Text für die Punkte */
    color: rgb(30, 160, 73); /* Abhebende Farbe für die Punkte */
    font-weight: bold; /* Fettgedruckter Text */
    margin-left: 10px; /* Leichter Abstand zur Beschriftung */
}



/* Grundlegendes Styling für das Leaderboard */
.leaderboard {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: calc(90vw * (828 / 552)); /* Höhe proportional zur Breite */
    max-width: 552px;
    max-height: 828px;    
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #78736e;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    padding: 10px;
}

/* Preis-Container für das Bild und die Labels */
.price-board-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* Styling für das Preis-Bild */
.price-board-image {
    width: calc(90% - 2vmin); /* Bildbreite relativ zum Container */
    height: auto;
    display: block;
    margin: 0 15px;
}

/* Preis-Labels (OLD PRICE und NOW) */
.price-label {
    font-size: clamp(0.6em, 1.5vw + 0.8em, 1em); /* Responsive Textgröße */
    font-weight: bold;
    color: black;
    position: absolute;
    top: -20px; /* Position über dem Bild */
}

/* Linkes Label: OLD PRICE */
.old-price {
    left: 5%; /* Positioniert links vom Bild */
}

/* Rechtes Label: NOW */
.now-price {
    right: 5%; /* Positioniert rechts vom Bild */
}

/* Linkes Label: OLD PRICE */
.old-price-cash {
    font-size: clamp(0.5em, 2vw + 1em, 2em); /* Min: 0.5em, Dynamisch, Max: 2.2em */
    top: 17px; 
    left: 13%; /* Positioniert links vom Bild */
    text-decoration: line-through; /* Durchgestrichen */
}

/* Rechtes Label: NOW */
.now-price-cash {
    font-size: clamp(0.5em, 2vw + 1em, 2em); /* Min: 0.5em, Dynamisch, Max: 2.2em */
    top: 17px;
    right: 13%; /* Positioniert rechts vom Bild */
}

/* Responsive CAP PRICE-Überschrift */
.cap-price-title {
    font-size: clamp(0.5em, 5vw + 0.2em, 2.5em); /* Min: 0.5em, Dynamisch, Max: 2.2em */
    margin-bottom: 35px;
    margin-top: 5px;
    color: black;
    text-align: center;
    font-weight: bold !important;
}

/* Discount und Points Labels */
.discount-label,
.points-label {
    font-size: clamp(0.5em, 1.2vw + 0.8em, 1.5em); /* Min: 0.5em, Dynamisch, Max: 1.5em */
    font-weight: bold;
    color: black;
    margin-bottom: 10px;
    text-align: center;
}

.discount-label {
    margin-top: 10px;
}

.points-label {
    font-size: clamp(0.5em, 1.2vw + 0.7em, 1.3em); /* Min: 0.5em, Dynamisch, Max: 1.5em */
}

.discount-percentage {
    font-size: clamp(0.5em, 1.2vw + 1em, 1.8em); /* Min: 0.5em, Dynamisch, Max: 1.5em */
    display: inline-block;
}

/* Fortschrittsanzeige (Progress Bar) */
.progress-container {
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
}

.progress-percentage {
    width: 90%;
    display: flex;
    justify-content: space-between;
    font-size: clamp(0.5em, 1vw + 0.6em, 1.2em); /* Min: 0.5em, Dynamisch, Max: 1.2em */
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.progress-bar {
    width: 90%;
    background-color: #e6e6e6;
    height: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #78736e;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0; /* Dynamische Füllung kann hier gesteuert werden */
    background-color: rgb(30, 160, 73);
    transition: width 0.5s ease-in-out;
}

.progress-label {
    font-size: clamp(0.5em, 1vw + 0.3em, 1.2em); /* Min: 0.5em, Dynamisch, Max: 1.2em */
    font-weight: bold;
    color: #555;
}

/* Trennlinie */
.separator-line {
    width: 105%;
    border-top: 4px solid #77736d;
    margin-bottom: 10px;
    margin-top: 20px;
}

/* Responsive Leaderboard-Überschrift */
.leaderboard-title {
    font-size: clamp(0.5em, 5vw + 0.5em, 2.5em); /* Min: 0.5em, Dynamisch, Max: 2.2em */
    margin: 15px 0;
    color: black;
    text-align: center;
}

/* Spieler-Liste Styling */
.leaderboard ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* Spieler-Einträge */
.leaderboard li {
    font-size: clamp(0.5em, 1.2vw + 0.5em, 1.2em);
    margin: 3px 0;
    color: #333;
    display: flex;
    justify-content: space-between;
    width: 85%;
    position: relative;
    transition: transform 0.3s ease;
}

/* Leaderboard-Button Styling */
.button-image {
    cursor: pointer;
    transition: transform 0.2s;
    width: calc(80px + 1.2vmin); /* Dynamische Button-Größe */
    margin-top: 2vh;
    margin-bottom: 0.5vw;
}

.button-image2{
    width: 120px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 20px;
}


/* Media Queries */
@media (max-width: 500px) {
    .leaderboard {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 5px; /* Minimales Padding */
    }

    /* Alle Hauptkomponenten innerhalb des Leaderboards */
    .cap-price-title,
    .price-board-container,
    .discount-label,
    .progress-container,
    .points-label,
    .separator-line,
    .leaderboard-title,
    .leaderboard ul,
    .player-score {
        flex-grow: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0; /* Keine zusätzlichen Außenabstände */
        padding: 1px; /* Sehr kleiner Innenabstand */
    }

    /* Preis-Labels (OLD PRICE und NOW) */
    .price-label {
        font-size: clamp(0.5em, 1vw + 0.1em, 0.8em); /* Kleinere Textgröße für Labels */
    }

    /* Linkes Label: OLD PRICE */
    .old-price {
        left: 15%;
    }
    
    .old-price,
    .now-price {
        top: -5px;
    }

    .now-price {
        right: 15%;
    }

    .old-price-cash {
        left: 25%;
    }

    .now-price-cash {
        right: 25%;
    }

    .old-price-cash,
    .now-price-cash {
        top: 5vw;
        font-size: clamp(0.6em, 2vw + 0.5em, 1.4em); /* Größere Schriftgröße für Cash-Beträge */
    }

    .price-board-image {
        width: 70%; /* Kleinere Bildgröße */
    }

    /* Responsive CAP PRICE-Überschrift */
    .cap-price-title {
        font-size: clamp(1em, 4vw + 0.2em, 2.2em); /* Größerer Titeltext */
        margin-bottom: 0.5vw; /* Minimaler Abstand oben/unten */
    }

    /* Discount- und Points-Labels */
    .discount-label,
    .points-label {
        font-size: clamp(0.9em, 2vw + 0.2em, 1.6em); /* Größere Schriftgrößen für Labels */
    }

    /* Discount Percentage */
    .discount-percentage {
        font-size: clamp(0.8em, 2vw + 0.3em, 1.4em);
    }

    .discount-label {
        margin-top: -0.3vw;
    }

    .points-label {
        margin-top: -0.5vw;
        margin-bottom: -0.3vw; /* Weniger Abstand zwischen den Labels */
    }

    .progress-container {
        width: 75%; /* Kleinere Breite für die Progress-Bar */
    }

    /* Fortschrittsanzeige - Prozentzahl */
    .progress-percentage {
        font-size: clamp(0.8em, 1.5vw + 0.2em, 1.2em); /* Größere Schriftgröße */
        margin-bottom: 0.3vw; /* Weniger Abstand nach unten */
    }

    /* Fortschrittsbalken Label */
    .progress-label {
        font-size: clamp(0.8em, 1.5vw + 0.1em, 1.2em); /* Größere Labels */
    }

    /* Leaderboard-Überschrift */
    .leaderboard-title {
        font-size: clamp(1em, 4vw + 0.2em, 2em); /* Größerer Titeltext */
        margin: 1vw 0; /* Weniger Abstand oben und unten */
    }

    /* Spieler-Liste Styling */
    .leaderboard ul {
        padding: 0;
        margin: 0.5vw 0; /* Weniger äußere Abstände */
        width: 85%; /* Etwas kleinere Breite */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }

    /* Spieler-Einträge */
    .leaderboard li {
        font-size: clamp(0.8em, 1.5vw + 0.1em, 1.4em); /* Größere Schriftgröße */
        margin: 1px 0; /* Weniger vertikaler Abstand */
        padding: 0; /* Keine zusätzlichen Innenabstände */
    }

    /* Spieler-Score */
    .player-score {
        font-size: clamp(0.8em, 1.5vw + 0.3em, 1.4em); /* Größere Schriftgröße */
        margin-top: 0.5vw; /* Weniger Abstand zum vorherigen Element */
        margin-bottom: 0.5vw;
    }

    /* Leaderboard-Button Styling */
    .button-image {
        width: 60px; /* Kleinere Buttons */
        margin-top: 5vw; /* Weniger Abstand nach oben */
    }

    /* Separator Line */
    .separator-line {
        width: 100%;
        border-top: 2px solid #77736d; /* Dünnere Linie */
        margin-bottom: -3vw; /* Reduzierter Abstand */
        margin-top: 3vw;
    }
}

@media (max-width: 320px) {
    .old-price-cash,
    .now-price-cash {
        top: 3vw;
    }

    .button-image {
        width: 60px; /* Kleinere Buttons */
        margin-top: 0; /* Weniger Abstand nach oben */
    }
}



/* Styling für den Overlay-Bildschirm */
#rotate-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 9999;
    display: none; /* Standardmäßig ausgeblendet */
}

.rotate-message p {
    font-size: 2em;
    margin: 0;
    padding: 20px;
}
