
/* ====================== GLOBAL / LAYOUT ====================== */

#easy-text{
font-family: Arial, Helvetica, sans-serif;

color: #05c5ff;

}
#mid-text{
font-family: Arial, Helvetica, sans-serif;

color: #15ff00;

}
#hard-text{
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #ff0000;

}
html, body {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background-image: url("./Background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: Arial, sans-serif;
    color: white;
}

.Main-content {
    margin: 0;
    position: relative;
    min-height: 84vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: Arial, sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-nav {
    padding: 10px;
    background-color: #6180ca2a;
    border: 1px solid rgba(48, 59, 158, 0.116);
    height: 70px;

    display: flex;
    flex-direction: row;    
    align-items: center; 
    justify-content: space-between;
}
/* ====================== SCREEN TRANSITIONS ====================== */

.screen {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    transition: all 0.5s ease;
    position: absolute;
}

.screen.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

/* Smooth Fade Out */
.screen.fade-out {
    opacity: 0;
    transform: scale(1.05);
}

/* ====================== MAIN CONTAINERS ====================== */
#quiz-box {
    max-width: 1000px;
    width: 90%;
    min-height: 300px;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #ccc;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}
#highscore-container {
    background: #1e1e2f;
    background-color: rgba(0, 0, 0, 0.7);
    
    /* Gleiche Größe wie #end-container */
    height: 680px;
    width: 650px;
    
    padding: 20px;
    border-radius: 15px;
    margin: 20px auto;
    color: white;
    text-align: center;
    
    box-sizing: border-box;        /* wichtig! */
    overflow-y: auto;              /* Scrollbar falls die Liste zu lang wird */
    overflow-x: hidden;
}
#end-container {
    height: 680px;
    width: 650px;
    background: #1e1e2f;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0px;
    border-radius: 15px;
    margin: 0;
    color: white;
    box-sizing: border-box;  
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
#Name-Box {
    height: 330px;
    width: 100%px;
    background: #1e1e2f;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0px;
    border-radius: 15px;
    margin: 0;
    color: white;
    box-sizing: border-box;  
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#end-container .card-body {
    flex: 1;  
    gap: 10px;
    min-height: 470px;
    display: flex;
    flex-direction: column;
    justify-content: center;   /* vertikal zentrieren */
    align-items: center;       /* horizontal zentrieren */
}
#end-container .card-footer {
    margin-top: auto;
}
#highscore-container {
    overflow-y: auto;
    margin: 0 auto;
    padding: 0;                        /* Padding übernehmen wir innen */
}
#highscore-container .card-body {
    padding: 0 60px;
    margin: 0;       /* Header abziehen */
    overflow-y: auto;
}
#end-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    justify-content: center;
}
#Start-Wrap{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

}#Diff-Wrap{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#Name-Container{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow-y: hidden;
}
/* ====================== BUTTONS ====================== */
#start-button,
#Diff-Accept-Btn {
    width: 400px;
    height: 80px;
    border-radius: 20px;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #ffffff;
    background: linear-gradient(45deg, #198d44d7, #4ade80d2);
    box-shadow: 0 0 80px #0bfc6388;

    transition: all 0.3s ease;
}

#easy-button
 {
    width: 300px;
    height: 60px;
    background-color: #1ab7ccc7;
    color: #ffffff;
}
#mid-button
 {
    width: 300px;
    height: 60px;
    background-color: #45d421b4;
    color: #ffffff;
}
#hard-button
 {
    width: 300px;
    height: 60px;
    background-color: #ff3628b2;
    color: #ffffff;
}
#Game-button
 {
    width: 300px;
    height: 60px;
    background-image: url(images/GamingBtn.png);
    background-size: 300px 60px;
    background-color: #1ab7ccc7;
    color: #ffffff;
    transition: all 0.3s ease;
}
#Geschichte-button
 {
    width: 300px;
    height: 60px;
    background-image: url(images/GeschichteBtn.png);
    background-size: 300px 60px;
    background-color: #1ab7ccc7;
    color: #ffffff;
    transition: all 0.3s ease;
}

#Game-Button:active,
#Geographie-button:active,
#Allgemeinwissen-Button:active,
#Geschichte-button:active {
    transform: scale(2.);
}
#Geographie-button
 {
    width: 300px;
    height: 60px;
    background-image: url(images/GeographieBtn.png);
    background-size: 300px 60px;
    background-color: #1ab7ccc7;
    color: #ffffff;
    transition: all 0.3s ease;
}
    #Allgemeinwissen-Button
 {
    width: 300px;
    height: 60px;
    background-image: url(images/AllgemeinwissenBtn\ .png);
    background-size: 300px 60px;
    background-color: #1ab7ccc7;
    color: #ffffff;
    transition: all 0.3s ease;
}
.muteBtn{
   background: none;
   border-color: #ffffff00;

}
#player-name {
    width: 85%;
    padding: 12px 100px;
    margin: 33px 0px;
    font-size: 1.1rem;
    border: none;
    text-align: center;
    border-radius: 8px;
    background-color: #2b28315b;
    color: white;
}
.form-control::placeholder {
  color: #ffffff;
}
#answers button {
    width: 100%;
    padding: 12px 80px;
    margin: 8px 0px;
    font-size: 1.1rem;
    border: none;
    text-align: center;
    border-radius: 8px;
    background-color: #2b28315b;
    color: white;
    cursor: pointer;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.saveNameBtn {
    width: 60%;
    padding: 12px 12px;
    margin: 0px;
    font-size: 1.1rem;
    border: none;
    text-align: center;
    border-radius: 8px;
    background-color: #2b28315b;
    color: white;
    cursor: pointer;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.restartbox {
    width: 80%;
    padding: 12px 15px;
    margin: 8px 0;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    background-color: #184bab89;
    color: white;
    cursor: pointer;
    transition: background-color 0.5s ease, color 0.5s ease;
}

#start-box-1 {
    padding: 0px 0px;
    margin: 0px 0px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background-color 0.5s ease, color 0.5s ease;
}
#start-box-2 {
    width: 10%;
    display: flex;
    padding: 0px 0px;
    margin-top: 10px;
    margin-left: 20px;
    margin-bottom: 10px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* ====================== BUTTON STATES ====================== */
#answers button:hover {
    background-color: #ffffff55;
}

#restart-button:hover {
    background-color: #884a4a67;
    color: #ffffff;
}
#Diff-Accept-Btn:hover,
#start-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgb(1, 236, 87), 0 0 80px #27a80d;
}

#easy-button:hover {
    box-shadow: 0 0 40px #05cdff, 0 0 80px #05c5ff;
}
#Game-button:hover {
    box-shadow: 0 0 40px #c70dff, 0 0 80px #ff0cff;
    transform: scale(1.1)
}#Geschichte-button:hover
 {
    box-shadow: 0 0 40px #ff9f0e, 0 0 80px #ff8902;
    transform: scale(1.1)
}#Geographie-button:hover
 {
    box-shadow: 0 0 40px #126312, 0 0 80px #1bd40a;
    transform: scale(1.1)
}#Allgemeinwissen-Button:hover 
{
    box-shadow: 0 0 40px #191ca0, 0 0 80px #141c94;
    transform: scale(1.1)
}
#mid-button:hover {
    box-shadow: 0 0 40px #58ff52, 0 0 80px #29ff33;
}

#hard-button:hover {
    box-shadow: 0 0 40px #ef4444, 0 0 80px #ef4444;
}
#Zurück:hover,
#Homepage:hover {
    box-shadow: 0 0 20px #221fa0, 0 0 40px #ffffff;
}

/* ====================== NEUE BASIS FÜR BUTTONS ====================== */

.game-btn {
    position: relative;
    width: 300px;
    height: 70px;
    margin-top: 20px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.3s ease;
}

.game-btn:active {
    transform: scale(2.);
}

/* Overlay für bessere Lesbarkeit */
.game-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.123);
    z-index: 1;
}

    /* Text immer oben */
    .game-btn span {
        position: relative;
        z-index: 2;
    }

    /* Shine Effekt */
    .game-btn::after {
        content: "";
        position: absolute;
        top: 0;
        left: -120%;
        width: 50%;
        height: 100%;
        background: rgba(255,255,255,0.2);
        transform: skewX(-20deg);
    }

    /* Shine Bewegung */
    .game-btn:hover::after {
        left: 150%;
        transition: 0.6s;
    }
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, background 0.5s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
body.focus-mode-gaming::after {
    opacity: 1;
    background-image: url("images/GamingHintergrund.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.focus-mode-geschichte::after {
    opacity: 1;
    background-image: url("images/GeschichteHintergrund.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.focus-mode-geographie::after {
    opacity: 1;
    background-image: url("images/GeopgraphieHintergund.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.focus-mode-allgemeinwissen::after {
    opacity: 1;
    background-image: url("images/AllgemeinwissenHintergund.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
body.focus-hard.focus-mode-gaming::after {
    opacity: 1;
    background:
        radial-gradient(circle at center, transparent 10%, rgb(0, 0, 0) 100%),
        url("images/GamingHintergrund.png");
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

body.focus-hard.focus-mode-geschichte::after {
    opacity: 1;
    background:
        radial-gradient(circle at center, transparent 10%, rgb(0, 0, 0) 100%),
        url("images/GeschichteHintergrund.png");
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

body.focus-hard.focus-mode-geographie::after {
    opacity: 1;
    background:
        radial-gradient(circle at center, transparent 10%, rgb(0, 0, 0) 100%),
        url("images/GeopgraphieHintergund.png");
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

body.focus-hard.focus-mode-allgemeinwissen::after {
    opacity: 1;
    background:
        radial-gradient(circle at center, transparent 10%, rgb(0, 0, 0) 100%),
        url("images/AllgemeinwissenHintergund.png");
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}
/* ====================== TEXT & COLORS ====================== */
.red {
    color: red !important;
    font-weight: bold;
}

.green {
    color: rgb(72, 255, 0);
    font-weight: bold;
}

.name {
    font-weight: bold;
}

.score {
    color: #ffc107;
}
/* ====================== FEEDBACK ====================== */
.correct {
    background-color: #28a745 !important;
    color: white;
}

.wrong {
    background-color: #dc3545 !important;
    color: white;
}
/* ====================== TIMER & PROGRESS ====================== */
#timer {
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.5s ease;
    display: inline-block;
}

#progress-bar {
    height: 0%;
    background-color: rgb(72, 255, 0);
    width: 0%;
    transition: width 1s linear;
    border-radius: 5px;
    margin: 0px 0;
}
#streak {
    font-weight: bold;
    color: #ff9800;
    transition: all 0.3s ease;
}
.streak-active {
    animation: flamePulse 0.6s infinite alternate;
}

@keyframes flamePulse {
    0% {
        text-shadow: 0 0 5px #ff9800;
        transform: scale(1);
    }
    100% {
        text-shadow: 0 0 20px #ff5722, 0 0 30px #ff9800;
        transform: scale(1.2);
    }
}.streak-active::after {
    content: "|     🔥 + 1 Punkt";
    margin-left: 8px;
    animation: flameMove 0.5s infinite alternate;
}

@keyframes flameMove {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-5px); }
}s
.streak-border {
    box-shadow: 0 0 10px #ff9800, 0 0 30px #ff5722;
    animation: borderFire 1s infinite alternate;
}

@keyframes borderFire {
    0% {
        box-shadow: 0 0 10px #ff9800;
    }
    100% {
        box-shadow: 0 0 25px #ff5722, 0 0 50px #ff0000;
    }
}
#quiz-box.streak-border {
    border: 2px solid #ff5722 !important;
}
/* ====================== HIGHSCORE ====================== */
#highscore-container h2 {
    margin-bottom: 10px;
}

#highscores ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    max-height: calc(680px - 100px);   /* etwas Puffer für Überschrift + Padding */
}

#highscores li {
    display: flex;
    justify-content: space-between;
    background: #2c2c3e5b;
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 1.1rem;
}
/* Top 3 */
#highscores li:nth-child(1) {
    background: rgba(255, 217, 0, 0.425);
    color: black;
}

#highscores li:nth-child(2) {
    background: rgba(192, 192, 192, 0.411);
    color: black;
}

#highscores li:nth-child(3) {
    background: #cd80325b;
    color: black;
}
/* ====================== ANIMATIONS ====================== */
@keyframes shake {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-5px); }
    50%  { transform: translateX(5px); }
    75%  { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.3s;
}
#particles {
    position: fixed;
    pointer-events: none;
    inset: 0;
    z-index: 0; /* in der mitte */
}
@keyframes shakeLoop {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-3px); }
    50%  { transform: translateX(3px); }
    75%  { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}
.active-btn {
    color: rgb(255, 255, 255) !important;
    transform: scale(1.15);
    box-shadow: 0 0 40px #2ea0a0, 0 0 100px #279ac7;
    border: 2px solid rgba(255, 255, 255, 0.39) !important;
    }


/* Pulsierender Glow */
.active::before {
    background: rgb(0, 0, 0);
    animation: pulseGlow 1s infinite;
}

@keyframes pulseGlow {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}


.shake-loop {
    animation: shakeLoop 0.3s infinite;
}

@keyframes pulse {
    0%   { transform: scale(1); }s
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s infinite;
}

.fade {
    opacity: 0;
    transition: opacity 0.5s ease;
}
#light-effect {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;

    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Lichtstrahlen */
#light-effect::before {
    content: "";
    position: absolute;
    inset: 0;

    background: radial-gradient(circle at 50% 0%, rgba(131, 65, 65, 0.15), transparent 60%),
                radial-gradient(circle at 20% 0%, rgba(153, 2, 2, 0.15), transparent 60%),
                radial-gradient(circle at 80% 0%, rgba(255, 0, 0, 0.15), transparent 60%);

    animation: lightMove 6s linear infinite;
}

/* Aktiv */
body.light-on #light-effect {
    opacity: 1;
}

/* Bewegung */
@keyframes lightMove {
    0% {
        transform: translateY(-20px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(-20px);
    }
}
@media (max-width: 768px) {

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

    body {
    margin: 0;
    padding: 0;
    height: 100dvh;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    }

    .Main-content {
    position: relative;
    height: calc(100dvh - 120px); /* 🔥 statt 100vh */

    display: flex;
    justify-content: center;
    align-items: center;
    
}
    #highscore-container,
    #end-container {
        width: 95%;
        height: auto;
        min-height: auto;
    }
img{padding: 10px;
}
.screen {

    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.95);

    width: 100%;
    max-width: 1000px;

    opacity: 0;
    pointer-events: none;

    transition: all 0.5s ease;
}
.screen.active {
    opacity: 1;
    transform: translate(-50%, -40%) scale(1);
    pointer-events: all;
}
    body {
        background-attachment: scroll; /* wichtig! */
        height: 100dvh;
    }
    #quiz-box {
        top: 40%;
        left: 45%;
        padding: 15px;
    }

    #answers button {
        width: 100%;
        margin: 8px 0;
        font-size: 1rem;
    }

    #start-button {
        width: 400px;
    }

      #start-box-2 {
        width: 100%;
    }


    #end-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        transform: translate(-50%, -28%) scale(0.95);
        overflow-y: scroll;
        
    }
    #end-container {
        margin: 30px;
    }
    #Start-Wrap{

    justify-content: center;
    align-items: center;
    flex-direction: column;
}

    #highscore-container .card-body {
        padding: 10px;
    }
    #particles {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100dvh;

    overflow: hidden;
    z-index: 0;
}

#particles canvas {
    position: absolute;
    top: 0;
    left: 0;

    width: 100% !important;
    height: 100% !important;

    max-width: 100vw;
    max-height: 100dvh;
}
}