* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    overflow-x: hidden; /*Khóa cuộn */
}
body {
    font-family: "Baloo 2", cursive;
    background: url("/IMG/ảnh\ nền.svg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    height: 100%;
}
main.game-content {
    min-height: 110vh;
    padding: 0px 0px;
    text-align: center;
    top: 0px;
}

header {
    color: #2591fd;
    padding: 22px;
    text-align: center;
    font-size: 13px;
}
.header-wrapper {
    position: relative;
    padding: 10px 0px 0px 50px;
    left: -20px;
}
header p {
    margin-top: 12px;
    font-size: 14px;
}
.breadcrumb {
    position: absolute;
    top: -8px;
    left: 220px;
    font-size: 14px;
    color: #555;
}
.breadcrumb a {
    color: #050505;
    text-decoration: none;
    font-weight: 500;
    left: 100px;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.corner-image {
    position: absolute;
    bottom: -100px;
    right: 600px;
    width: 320px;
    height: auto;
    z-index: 999;
}

.top-bar {
    display: flex;
    gap: 30px;
    padding: 10px;
    background: none;
    justify-content: center;
    position: relative;
    top: -10px;
    right: 200px;
}

.btn {
    width: 130px;
    height: 80px;
    border: none;
    border-radius: 15px;
    background-color: #c7d7f5;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 2px 2px 5px #ccc;
}

.btn.icon.home {
    background: url("/IMG/Group\ \(1\).svg") center/50% no-repeat, #01b0d6;
    width: 120px;
}
.home-icon {
    height: 76%;
}
.btn.icon.number {
    background-color: #ffffff;
}
.number-icon {
    width: auto;
    height: 58px;
    transform: translateY(2px);
}
.btn:hover {
    transform: translateY(-2px);
}
.audio:hover {
    transform: translateY(-2px);
}
.character:hover {
    transform: translateY(-2px);
}

.btn.nav {
    background: white;
    font-size: 70px;
    color: #4444aa;
    align-items: center;
    justify-items: center;
}
.arrow {
    display: inline-block;
    transform: translateY(-2px);
}

.lesson-box {
    background-color: white;
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: 10px auto;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    top: -15px;
}

.lesson-header {
    background-color: #4475d6;
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    gap: 0px;
}

.lesson-header img.touch-icon {
    position: absolute;
    width: 107px;
    height: auto;
    top: -9px;
    left: 22px;
}
.lesson-header h2 {
    position: relative;
    font-size: 24px;
    font-weight: bold;
    left: 140px;
}

.instruction {
    font-weight: bold;
    padding: 15px 10px;
    position: relative;
    left: -360px;
}

.audio-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.audio {
    width: 110px;
    height: 70px;
    background: center/60% no-repeat, #65befa;
    border: none;
    border-radius: 10px;
    box-shadow: 2px 2px 5px #ccc;
    cursor: pointer;
}
.p {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    margin-top: 10px;
}
.characters {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.character {
    width: 140px;
    text-align: center;
    border: 2px solid #000;
    padding: 10px;
    border-radius: 10px;
    background: #fff;
}

.character img {
    width: 100%;
    height: auto;
}

.character p {
    font-weight: bold;
    margin-top: 5px;
}
.character.correct {
    border-color: green;
    background-color: #d4fdd4;
    position: relative;
}
.character.correct::after {
    content: "✔";
    color: green;
    font-size: 24px;
    position: absolute;
    top: 5px;
    right: 10px;
}

.character.wrong {
    border-color: red;
    background-color: #ffd4d4;
    position: relative;
}

.character.wrong:after {
    content: "✘";
    color: red;
    font-size: 24px;
    position: absolute;
    top: 5px;
    right: 10px;
}
.icon {
    font-size: 20px;
    color: inherit;
}
.restart-container {
    margin-top: 20px;
    text-align: center;
}

#restart-button {
    padding: 12px 25px;
    font-size: 18px;
    background-color: #ffcc00;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 6px #aaa;
    transition: 0.3s;
}

#restart-button:hover {
    background-color: #e6b800;
}
.corner-image {
    position: fixed;
    top: 580px;
    right: 50px;
    width: 250px;
    z-index: 10; /* đảm bảo ảnh nằm trên background */
}

.icon-loa {
    width: auto;
    height: 50px;
    object-fit: contain;
}
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-content {
    background: white;
    padding: 30px 40px;
    border-radius: 15px;
    text-align: center;
    font-family: "Baloo 2", cursive;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.popup-content h2 {
    color: #4caf50;
    font-size: 28px;
    margin-bottom: 10px;
}

.popup-content button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ffcc00;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.popup-content button:hover {
    background-color: #e6b800;
}

.hidden {
    display: none;
}
@media (max-width: 768px) {
    .header-wrapper {
        padding: 0;
        left: 0;
    }

    .breadcrumb {
        position: static;
        text-align: center;
        margin-bottom: 10px;
    }

    .lesson-box {
        height: auto;
        width: 95%;
        margin: 20px auto;
    }

    .lesson-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 10px;
    }

    .lesson-header h2 {
        font-size: 20px;
        left: 0;
    }

    .lesson-header img.touch-icon {
        position: static;
        width: 80px;
        margin-bottom: 10px;
    }

    .instruction {
        left: 0;
        text-align: center;
        font-size: 16px;
    }

    .top-bar {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        position: static;
        margin-bottom: 15px;
    }

    .btn {
        width: 100px;
        height: 60px;
        font-size: 18px;
    }
    .btn.nav {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .arrow {
        transform: none !important;
        line-height: 1;
        font-size: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .arrow {
        margin-top: -2px;
    }

    .corner-image {
        width: 100px;
        position: absolute;
        top: 740px;
        right: 0;
        z-index: 10;
    }

    .audio-buttons {
        flex-wrap: wrap;
        gap: 15px;
    }

    .audio {
        width: 90px;
        height: 60px;
    }

    .icon-loa {
        height: 40px;
    }

    .characters {
        gap: 15px;
        justify-content: center;
    }

    .character {
        width: 120px;
    }

    #restart-button {
        width: 80%;
        max-width: 300px;
        font-size: 16px;
    }

    .popup-content {
        width: 90%;
        padding: 20px;
    }

    .popup-content h2 {
        font-size: 22px;
    }

    .popup-content p {
        font-size: 16px;
    }
}
