* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top, #e9f7ff, #f8f4ff 55%, #fff);
    color: #20243a;
    min-height: 100vh;
}

.topbar {
    background: white;
    padding: 18px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 15px rgba(0,0,0,.08);
}

.logo {
    font-weight: 900;
    font-size: 22px;
}

.logout {
    color: #555;
    text-decoration: none;
}

.container {
    width: min(1100px, 92%);
    margin: 35px auto;
}

.hero {
    text-align: center;
    padding: 45px 20px;
}

.hero-icon,
.character,
.exercise-character,
.avatar {
    font-size: 80px;
}

.hero h1 {
    font-size: clamp(38px, 7vw, 70px);
    margin: 10px 0;
}

.hero p {
    font-size: 20px;
    color: #60657a;
}

.big-button {
    display: inline-block;
    border: 0;
    border-radius: 18px;
    padding: 17px 30px;
    background: #6c5ce7;
    color: white;
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 7px 0 #5143b9;
    margin-top: 15px;
}

.big-button:active {
    transform: translateY(4px);
    box-shadow: 0 3px 0 #5143b9;
}

.features,
.missions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.features > div {
    background: white;
    border-radius: 22px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    font-size: 38px;
}

.features strong,
.features span {
    display: block;
}

.features strong {
    font-size: 20px;
    margin-top: 8px;
}

.features span {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
}

.card,
.login-card,
.exercise-card {
    background: white;
    border-radius: 28px;
    padding: 35px;
    box-shadow: 0 12px 35px rgba(0,0,0,.10);
}

.login-card {
    max-width: 480px;
    margin: 60px auto;
    text-align: center;
}

label {
    display: block;
    text-align: left;
    margin-top: 18px;
    font-weight: 800;
}

input {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: 2px solid #ddd;
    font-size: 18px;
    margin-top: 7px;
}

.hint {
    margin-top: 25px;
    color: #777;
    font-size: 13px;
}

.flash {
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 18px;
    font-weight: 700;
}

.flash.success {
    background: #dff8e8;
}

.flash.error {
    background: #ffe1e1;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
}

.score-box {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    font-weight: 900;
    line-height: 2;
}

.mission {
    min-height: 190px;
    border-radius: 25px;
    padding: 25px;
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 9px 0 rgba(0,0,0,.16);
    transition: transform .15s;
}

.mission:hover {
    transform: translateY(-5px);
}

.mission span {
    font-size: 45px;
}

.mission strong {
    font-size: 22px;
    margin-top: 10px;
}

.mission small {
    margin-top: 7px;
    opacity: .9;
}

.blue { background: #3498db; }
.green { background: #20bf6b; }
.orange { background: #f39c12; }
.purple { background: #8e44ad; }
.red { background: #e74c3c; }
.yellow { background: #f1c40f; }

.exercise-card {
    max-width: 700px;
    margin: 50px auto;
    text-align: center;
}

.category {
    font-weight: 900;
    color: #6c5ce7;
    text-transform: uppercase;
}

.exercise-card h1 {
    font-size: 38px;
    margin: 30px 0;
}

.answer {
    font-size: 30px;
    text-align: center;
}

.back,
.parent-link {
    display: inline-block;
    margin: 25px 10px;
    color: #5143b9;
    font-weight: 800;
    text-decoration: none;
}

.child-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.child-row p {
    margin-bottom: 0;
    color: #777;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

@media (max-width: 700px) {

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .exercise-card h1 {
        font-size: 28px;
    }

    .child-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
