:root {
    --primary: #39E079;
    --primary-dark: #2ab860;
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    --surface: #ffffff;
    --text-main: #102a43;
    --text-muted: #627d98;

    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius-xl: 24px;
    --radius-md: 12px;
}


* {
    box-sizing: border-box;
}
html {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}


.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;

}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    max-width: 1000px;
}


.header {
    padding: 10px 0;
    background: transparent;
    flex: 0 0 auto;
    width: 100%;


}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.header-content-game {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}
.header-content-result {
    display: flex;
    align-items: center;
    justify-content: right;
    min-height: 70px;
}


.header-logo {
    height: 5vh;
    width: auto;
    mix-blend-mode: multiply;
    display: block;


}

.close-btn {

    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: var(--bg-gradient);
}

.close-btn:hover {
    transform: scale(1.05);
}

.header-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

h1.header-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-shadow: none;
}

.level {
    padding-bottom: 50px;

}


.main-content-index {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
    text-align: center;
}

.main-content-game {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;

}

.main-content-result {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
    text-align: center;
}


.game-stage-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.game-stack {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;


}


.game-stage {
    position: relative;
    height: 40vh;
    width: 100%;

    aspect-ratio: 4 / 5;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: transparent;
}

.stage-img {

    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: transparent;

}

#main-img {
    max-height: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    background: transparent;
    overflow: hidden;
}

/* ===========================
   UI Elements
   =========================== */

.narrow-content {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}


.progress-container {
    margin-bottom: 10px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.progress-bar-bg {
    height: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-dark);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 99px;
}

/* ===========================
   Buttons
   =========================== */

.button-row {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: white;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
}


#aiBtn {
    color: var(--primary);
    border-bottom: 4px solid;
}


#humanBtn {
    color: var(--primary);
    border-bottom: 4px solid;
}



#startBtn, #replayBtn {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(57, 224, 121, 0.4);
    width: 100%;
    font-size: 1.2rem;
}



/*.btn:active {*/
/*    background-color: var(--primary) ;*/
/*    color: white ;*/
/*    transform: scale(0.95) ;*/
/*    transition: none ;*/
/*    box-shadow: none ;*/
/*}*/

#aiBtn.correct,
#humanBtn.correct {
    background-color: var(--primary) !important;
    color: white!important;
    border-bottom-color: var(--primary) !important;
}

#aiBtn.wrong,
#humanBtn.wrong {
    background-color: #e74c3c!important;
    color: white!important;
    border-bottom-color: #e74c3c!important;
}


.can-hover #aiBtn:hover {
    background: #eff6ff;
    border-color: var(--primary);
}

.can-hover #humanBtn:hover {
    background: #f0fdf4;
    border-color: var(--primary);
}

.can-hover #startBtn:hover,
.can-hover #replayBtn:hover {
    background: var(--primary-dark);
}

.can-hover .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}


.can-hover body.dark-mode #aiBtn:hover,
.can-hover body.dark-mode #humanBtn:hover {
    background: #334155;
}


.btn:focus {
    outline: none !important;
}

/* ===========================
   Start & Result Page Styling
   =========================== */

.circle-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--primary);
}

.circle-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trophy {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

#trophyImg {
    width: 180px;
    height: auto;
    object-fit: contain;
}

#scoreText {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main)
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    text-shadow: 3px 3px var(--text-muted);
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ===========================
   Footer
   =========================== */


.footer {
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding-bottom: 10px;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.social-item span.fa {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.social-item:hover {
    color: var(--primary);
}

/* ===========================
   Feedback
   =========================== */

.feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
    font-size: 8rem;
    font-weight: 800;
    opacity: 0;

}


.feedback.show {
    opacity: 1;
}

.feedback.correct {
    color: #2ecc71;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.feedback.wrong {
    color: #e74c3c;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===========================
   Language Switcher
   =========================== */

.lang-switch {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-btn {
    background: none;
    border: 1px solid transparent;
    padding: 4px 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--primary);
    background: rgba(0, 0, 0, 0.03);
}

.lang-btn.active {
    color: var(--text-main);
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.05);
}

/* ===========================
   Media for Desktops
   =========================== */

@media (min-width: 850px) {
    .game-stack {
        max-width: 900px; /* Desktop Breite */
    }

    .game-stage {
        aspect-ratio: 16 / 9;
        border-width: 8px;
    }

    .stage-img {
        background-size: contain;

    }



    #main-img {
        max-height: 100%;
        max-width: 100%;
        height: auto;
        border-radius: var(--radius-xl);
        background: transparent;
        overflow: hidden;
    }

}

/* ===========================
   Media for Samsung Flip
   =========================== */

@media screen and (min-width: 1000px) and (min-height: 1000px) {

    html, body {
        font-size: 26px;
        height: 100%;
        overflow: hidden;
    }

    .container {
        max-width: 1800px;
        padding: 0 40px;
    }


    .header-logo {
        height: 10vh !important;
        max-height: 120px;
        width: auto;
    }

    .header-content, .header-content-game {
        min-height: 120px;
    }


    .main-content-index,
    .main-content-result {
        justify-content: flex-start !important;
        padding-top: 8vh !important;
    }


    .game-stack {
        max-width: 1600px;
        gap: 30px;
    }




    @media (orientation: portrait) {
        .header {
            padding-top: 1vh;
        }

        .main-content-index,
        .main-content-result {
            justify-content: flex-start !important;
            padding-top: 10vh !important;
        }

        .main-content-game {
            justify-content: flex-start !important;
            padding-top: 2vh !important;
        }

        .game-stage {
            height: 45vh;
            margin-bottom: 4vh;
        }
        .circle-logo {
            width: 350px;
            height: 350px;
            margin-bottom: 60px;
            border-width: 10px;
        }

        .narrow-content {
            max-width: 900px;
        }
        h1 {
            font-size: 4.5rem;
            margin-bottom: 40px;
        }

        p {
            font-size: 2rem;
            line-height: 1.4;
            margin-bottom: 60px;
        }
        #startBtn, #replayBtn {
            font-size: 2.2rem;
            padding: 50px;
            border-radius: 30px;
        }


        .trophy {
            margin-bottom: 60px;
        }

        #trophyImg {
            width: 500px;
        }
    }


    @media (orientation: landscape) {
        .main-content-game {
            justify-content: flex-start !important;
            padding-top: 1vh !important;
        }

        .game-stage {
            height: 35vh;
            margin-bottom: 2vh;
        }

        .header-logo {
            height: 8vh !important;
        }
    }


    .btn {
        padding: 35px;
        font-size: 1.4rem;
        border-radius: 20px;
    }

    .feedback {
        font-size: 12rem;
    }
    .trophy {
        margin-bottom: 60px;
    }

    #trophyImg {
        width: 300px;
    }
}

/* ===========================
   DARK MODE
   =========================== */


body.dark-mode {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --surface: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .btn {
    background: #334155;
    color: white;
}

body.dark-mode #aiBtn,
body.dark-mode #humanBtn {
    background: #1e293b;
}


body.dark-mode .lang-btn.active {
    background: #334155 !important;
    color: #ffffff !important;
}

body.dark-mode h1.header-title {
    color: #e2e8f0;
}

/* ===========================
   THEME TOGGLE
   =========================== */

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}


.theme-icon {
    width: 24px;
    height: 24px;
    display: block;
    transition: filter 0.3s ease;
    filter: invert(1);
}


body.dark-mode .theme-icon {
    filter: none;
}


body.dark-mode .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}


body.dark-mode .header-logo {
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: screen;
}
