:root {
    --background: #141d2b;
    --card-bg: #3c4488;
    --hover-bg: #5c68cd;
    --button-bg: #00000094;
    --button-text: #ffffff;
    --text-color: #ffffff;
    --highlight-color: #ffd700;
    --white: #ffffff;
    --card-shadow: rgba(4, 23, 49, 0.8); /* DeepPink with alpha */
    --progress-bg: #60dc60; /* LimeGreen */
    --progress-shadow: #163516; /* LimeGreen */
    --stopwatch-text: #67b3ff; /* DodgerBlue */
    --stopwatch-shadow: rgba(11, 49, 86, 0.8); /* DodgerBlue with alpha */
    --navbar-bg: #2a2f5f;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-bar {
    display: flex;
    justify-content: space-around;
    width: 100%;
    background-color: var(--navbar-bg);
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.menu-option {
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.menu-option:hover {
    color: var(--highlight-color);
}

#level-container {
    max-width: 600px;
    margin-top: 20px;
    padding: 20px;
}

.level-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Individuelle Farbverläufe für die einzelnen Level */
.level-1 {
    background: linear-gradient(to bottom right, #11b816, #000000);
}
.level-2 {
    background: linear-gradient(to bottom right, #6309ff, #7a1662);
}
.level-3 {
    background: linear-gradient(to bottom right, #181e23, #1565c0);
}
.level-4 {
    background: linear-gradient(to bottom right, #20B2AA, #041918);
}
.level-5 {
    background: linear-gradient(to bottom right, #fbc02d, #FFA07A);
}

.level-button:hover {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.level-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
}

.level-label {
    font-weight: bold;
    text-align: left;
    font-size: 16px;
}

.level-label-highscore {
    font-weight: bold;
    text-align: right;
    font-size: 16px;
}

.level-portrait {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 15px 0;
    border: 3px solid black;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.level-button:hover .level-portrait {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.level-info {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 90%;
    text-align: center;
    font-size: 14px;
    margin-top: 10px;
}

.level-description {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.4;
}

.enter-level {
    display: inline-block;
    padding: 8px 16px;
    margin-top: 10px;
    background-color: var(--button-bg);
    color: var(--button-text);
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.enter-level:hover {
    background-color: #e5533f;
    transform: scale(1.05);
}

@media (max-width: 600px) {
    #level-container {
        max-width: 90%;
        padding: 10px;
    }
    .level-button {
        font-size: 14px;
        padding: 15px;
    }
    .level-portrait {
        width: 70px;
        height: 70px;
    }
}


#memory-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 5px;
    max-width: 400px;
    margin-bottom: 20px;
}

.card {
    width: 100%;
    padding-bottom: 100%;
    background-color: var(--card-bg);
    cursor: pointer;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 10px var(--card-shadow);
    border-radius: 10px;
}

.carddisabled:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--card-shadow);
}

#progress-container {
    width: 100%;
    height: 20px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}




#progress-bar {
    width: 100%;
    background-color: var(--progress-bg);
    transition: width 0.5s ease;
    box-shadow: 0 0 20px var(--progress-shadow);
    color:#000000;
    height: 20px;
    position: relative;
}

#progress-text {
    position: absolute;
    left: 10px; /* Abstand nur für den Text */
    color: black;
    font-weight: bold;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 10px 15px;
    margin-top: 60px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, rgba(36, 40, 59, 0.9), rgba(60, 68, 136, 0.9));
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    gap: 30px;
}

.level-container {
    position: relative;
    text-align: center;
    flex: 0 0 auto;
    z-index: 2; /* Ensure the level text is above the image */
}

.level-portrait-details {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid black;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: -50%; /* The image will be positioned above the container */
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 1; /* Place the image behind the text */
}

#choosenLevel {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    margin-top: 50px; /* Space below the image */
    font-size: 18px;
    font-weight: bold;
    color: var(--highlight-color);
    position: relative;
    z-index: 3; /* Make sure the level text is above the image */

    width: 40px; /* Kleine Kreise */
    height: 40px;
    border-radius: 50%; /* Runde Form */
    color: var(--text-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1); /* Verblassender Schatten */
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 16px; /* Label-Größe */
    margin-bottom: 10px; /* Abstand zwischen Label und Kreis */
    color: var(--stopwatch-text);
    font-weight: bold;
}
/* Äußere und mittlere Kreise */
.stat-value {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; /* Runde Form */
    color: var(--text-color);
    font-size: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1); /* Verblassender Schatten */
}

/* Vergrößerter äußerer Kreis für Time */
.stat-value.big {
    width: 80px; /* Große Kreise */
    height: 80px;
    background-color: rgba(33, 150, 243, 0.2); /* Blau mit Transparenz */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2), 0 0 35px rgba(0, 0, 0, 0.1);
}

/* Mittlere Kreise */
.stat-value.mid {
    width: 70px; /* Mittlere Kreise */
    height: 70px;
    background-color: rgba(33, 150, 243, 0.5); /* Intensiveres Blau mit Transparenz */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2), 0 0 35px rgba(0, 0, 0, 0.1);
}

/* Kleine Kreise */
.stat-value.small {
    width: 60px; /* Kleine Kreise */
    height: 60px;
    background-color: #2196F3; /* Reinblau */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2), 0 0 35px rgba(0, 0, 0, 0.1);
}










#progress-container {
    background-color: #2e7d32;
    border-radius: 15px;
}

.center{
    text-align: center;
}

#new-game-btn {
    display: flex; /* Make it a flex container */
    align-items: center; /* Center the content vertically */
    background-color: rgba(220, 20, 60, 0.37); /* Background color */
    color: #ffffff; /* White text color */
    padding: 10px 20px; /* Add padding for better button size */
    border: none; /* Remove default border */
    border-radius: 5px; /* Add rounded corners */
    cursor: pointer; /* Change cursor to a pointer */
    justify-content: space-around;
    width: 100%;
    transition: transform 0.2s ease-in-out; /* Smooth transform on hover */
    animation: pulse 1.5s infinite;
}

/* Pulse effect on hover */
#new-game-btn:hover {
    background-color: #444444; /* Slightly lighter black when hovered */
   /* Trigger the pulse animation */
}

/* Define the pulse animation */
@keyframes pulse {
    0% {
        transform: scale(0.9); /* Normal size */
    }
    50% {
        transform: scale(1.0); /* Scale up to 110% */
    }
    100% {
        transform: scale(0.9); /* Return to original size */
    }
}




.score-stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.score-stars img {
    width: 30px;
    height: 30px;
}

.star-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}


/* Hintergrund für den Spinner (Overlay) */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Halbtransparenter schwarzer Hintergrund */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Sicherstellen, dass der Spinner über allem anderen liegt */
    visibility: visible; /* Spinner sichtbar */
    opacity: 1;
    transition: opacity 0.3s ease-out;
  }
  
  /* Spinner-Stil */
  .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3); /* Heller Rand */
    border-top: 4px solid #fff; /* Dunkelgrauer Rand oben */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite; /* Dreh-Animation */
  }
  
  /* Drehende Animation */
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Optionale Klasse zum Ausblenden des Spinners */
  .spinner-hidden {

    visibility: hidden;
    opacity: 0;
  }
  


