* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* ===================== */
/* BODY */
/* ===================== */
body {
    background: #eef6ff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===================== */
/* LOGIN SCREEN */
/* ===================== */
#loginScreen {
    position: fixed;
    inset: 0;
    background: #eef6ff;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 20px;

    z-index: 999;
}

.home-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #2470ff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    z-index: 1000;
}

.home-link:hover {
    text-decoration: underline;
}

#loginScreen h2 {
    font-size: 32px;
    color: #2470ff;
}

#loginScreen input {
    padding: 12px 18px;
    font-size: 20px;
    border-radius: 10px;
    border: 2px solid #8fbfff;
    outline: none;
}

#loginScreen button {
    padding: 12px 30px;
    font-size: 20px;
    border-radius: 12px;
    border: none;
    background: #2470ff;
    color: white;
    cursor: pointer;
    transition: .2s;
}

#loginScreen button:hover {
    transform: scale(1.05);
}

/* ===================== */
/* GAME CONTAINER */
/* ===================== */
.container {
    width: min(1000px, 95vw);
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,.15);
}

/* ===================== */
/* HEADER */
/* ===================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lives {
    font-size: 32px;
}

.stats {
    font-size: 28px;
    font-weight: bold;
    color: #2470ff;
}

/* ===================== */
/* TITLE */
/* ===================== */
h1 {
    margin-top: 40px;
    text-align: center;
    color: #2470ff;
    font-size: 48px;
}

h2 {
    margin-top: 10px;
    text-align: center;
    color: #555;
    font-weight: 400;
}

/* ===================== */
/* TASK */
/* ===================== */
.task {
    margin: 50px auto;
    font-size: 52px;
    text-align: center;
    font-weight: bold;
}

/* ===================== */
/* ANSWER BUTTONS */
/* ===================== */
.answer {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.answer button {
    font-size: 28px;
    padding: 14px 24px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    background: #d7ebff;
    transition: .25s;
}

.answer button:hover {
    background: #8cc6ff;
    transform: translateY(-4px);
}

/* ===================== */
/* RESULT AREA */
/* ===================== */
.result {
    margin: 40px auto;
    width: 80%;
    min-height: 70px;
    border: 3px dashed #8fbfff;
    border-radius: 15px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 30px;
    color: #888;
}

/* ===================== */
/* CHECK BUTTON */
/* ===================== */
.check {
    display: block;
    margin: 30px auto 0;

    font-size: 26px;
    background: #28c76f;
    color: white;

    border: none;
    padding: 18px 50px;
    border-radius: 18px;

    cursor: pointer;
    transition: .25s;
}

.check:hover {
    transform: scale(1.05);
}

/* ===================== */
/* CHIPS */
/* ===================== */
.chip {
    display: inline-block;
    padding: 10px 16px;
    margin: 6px;

    background: #d7ebff;
    border-radius: 12px;

    font-size: 22px;
    cursor: pointer;

    transition: .2s;
}

.chip:hover {
    background: #ffb3b3;
    transform: scale(1.05);
}

/* ===================== */
/* LEVEL LABEL (game screen) — shows round progress + current tier */
/* ===================== */
.level-label {
    text-align: center;
    margin-top: 6px;
    font-size: 16px;
    color: #2470ff;
    font-weight: bold;
}

/* ===================== */
/* SELECTED / USED OPTION BUTTONS */
/* ===================== */
.answer button.selected {
    background: #2470ff;
    color: white;
}

.answer button.used,
.answer button:disabled {
    opacity: .35;
    cursor: default;
    transform: none;
}

.answer button.used:hover,
.answer button:disabled:hover {
    background: #d7ebff;
    transform: none;
}

/* ===================== */
/* RESULT SCREEN (emoji reaction) */
/* ===================== */
#resultScreen {
    position: fixed;
    inset: 0;
    background: #eef6ff;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 999;
}

.result-card {
    width: min(600px, 90vw);
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,.15);
}

.result-emoji {
    font-size: 100px;
    line-height: 1;
    margin-bottom: 20px;
}

.result-message {
    font-size: 26px;
    font-weight: bold;
    color: #2470ff;
    margin-bottom: 10px;
}

.result-score {
    font-size: 20px;
    color: #888;
    margin-bottom: 30px;
}

.primary-btn {
    padding: 14px 36px;
    font-size: 22px;
    border-radius: 15px;
    border: none;
    background: #28c76f;
    color: white;
    cursor: pointer;
    transition: .2s;
}

.primary-btn:hover {
    transform: scale(1.05);
}

.secondary-btn {
    padding: 14px 36px;
    font-size: 22px;
    border-radius: 15px;
    border: 2px solid #2470ff;
    background: white;
    color: #2470ff;
    cursor: pointer;
    transition: .2s;
    margin-bottom: 15px;
}

.secondary-btn:hover {
    background: #eef6ff;
}

.review-btn {
    padding: 14px 36px;
    font-size: 22px;
    font-weight: bold;
    border-radius: 15px;
    border: none;
    background: linear-gradient(135deg, #ff9800, #ff5c5c);
    color: white;
    cursor: pointer;
    transition: .2s;
    margin-bottom: 15px;
    box-shadow: 0 6px 16px rgba(255, 92, 92, .4);
}

.review-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 92, 92, .55);
}

/* ===================== */
/* MISTAKES REVIEW SCREEN */
/* ===================== */
#mistakesScreen {
    position: fixed;
    inset: 0;
    background: #eef6ff;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 999;
    padding: 20px;
}

.mistakes-card {
    width: min(700px, 95vw);
    max-height: 90vh;

    background: white;
    border-radius: 20px;
    padding: 40px;

    display: flex;
    flex-direction: column;

    box-shadow: 0 15px 35px rgba(0,0,0,.15);
}

.mistakes-card h2 {
    text-align: center;
    color: #2470ff;
    margin-bottom: 20px;
}

.mistakes-list {
    overflow-y: auto;
    flex: 1;
    margin-bottom: 20px;
}

.mistake-item {
    border: 2px solid #ffd6d6;
    border-radius: 15px;
    padding: 18px 20px;
    margin-bottom: 15px;
    background: #fff9f9;
}

.mistake-num {
    font-weight: bold;
    color: #ff5c5c;
    margin-bottom: 8px;
}

.mistake-task {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.mistake-your {
    color: #ff5c5c;
    margin-bottom: 4px;
}

.mistake-correct {
    color: #28c76f;
    font-weight: bold;
    margin-bottom: 10px;
}

.mistake-why {
    font-size: 15px;
    color: #555;
    background: #eef6ff;
    border-radius: 10px;
    padding: 10px 14px;
}

.mistakes-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}
