* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #102033;
    background: linear-gradient(180deg, #87ceeb, #dff7ff 35%, #f5fbff);
    overflow-x: hidden;
}

.sky-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(circle at 12% 16%, rgba(255,255,255,.9), transparent 9%),
        radial-gradient(circle at 88% 10%, rgba(255,242,145,.85), transparent 10%),
        linear-gradient(135deg, #6ecbff, #dff7ff, #ffffff);
}

.cloud {
    position: fixed;
    background: rgba(255,255,255,.75);
    border-radius: 999px;
    z-index: -1;
    animation: cloudMove 18s infinite alternate ease-in-out;
}

.cloud::before,
.cloud::after {
    content: "";
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud1 {
    width: 210px;
    height: 62px;
    top: 110px;
    left: 4%;
}

.cloud1::before {
    width: 86px;
    height: 86px;
    top: -42px;
    left: 35px;
}

.cloud1::after {
    width: 110px;
    height: 110px;
    top: -62px;
    right: 25px;
}

.cloud2 {
    width: 260px;
    height: 72px;
    top: 230px;
    right: 5%;
    animation-delay: 1s;
}

.cloud2::before {
    width: 95px;
    height: 95px;
    top: -45px;
    left: 45px;
}

.cloud2::after {
    width: 125px;
    height: 125px;
    top: -70px;
    right: 30px;
}

.cloud3 {
    width: 170px;
    height: 50px;
    bottom: 90px;
    left: 8%;
    animation-delay: 2s;
}

.cloud3::before {
    width: 72px;
    height: 72px;
    top: -34px;
    left: 25px;
}

.cloud3::after {
    width: 88px;
    height: 88px;
    top: -48px;
    right: 18px;
}

@keyframes cloudMove {
    from { transform: translateX(-25px); }
    to { transform: translateX(55px); }
}

.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: min(1160px, calc(100% - 30px));
    padding: 14px 20px;
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    border: 1px solid rgba(255,255,255,.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 38px rgba(20,80,120,.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    font-weight: 900;
    color: #0f5c8c;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: #0f5c8c;
    font-weight: 900;
    padding: 8px 12px;
    border-radius: 999px;
}

.nav-links a:hover {
    background: #0f5c8c;
    color: white;
}

.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 120px 20px 70px;
    text-align: center;
}

.hero-card {
    width: min(1050px, 100%);
    padding: clamp(32px, 6vw, 70px);
    border-radius: 42px;
    background: rgba(255,255,255,.65);
    border: 3px solid rgba(255,255,255,.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px rgba(20,80,120,.22);
}

.badge {
    display: inline-block;
    margin-bottom: 20px;
    padding: 12px 22px;
    border-radius: 999px;
    background: #e0f7ff;
    color: #0f5c8c;
    font-weight: 900;
    border: 2px dashed #2aa7d8;
}

.hero h1 {
    font-size: clamp(3rem, 9vw, 7.8rem);
    line-height: .95;
    color: #0f5c8c;
    text-shadow: 4px 4px 0 #ffffff;
    margin-bottom: 22px;
}

.subtitle {
    max-width: 860px;
    margin: 0 auto 30px;
    font-size: clamp(1.15rem, 2.6vw, 1.55rem);
    line-height: 1.6;
    font-weight: 800;
    color: #24465f;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-block;
    text-decoration: none;
    padding: 15px 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: .25s;
    box-shadow: 0 12px 25px rgba(20,80,120,.18);
}

.btn:hover {
    transform: translateY(-5px) scale(1.03);
}

.primary {
    background: linear-gradient(135deg, #0f8cc8, #2bd4a7);
    color: white;
}

.secondary {
    background: white;
    color: #0f5c8c;
}

main {
    width: min(1200px, calc(100% - 32px));
    margin: auto;
}

.author-card,
.overview,
.lesson,
.final-quiz,
.signature {
    margin: 38px auto;
    padding: clamp(26px, 4vw, 46px);
    border-radius: 36px;
    background: rgba(255,255,255,.78);
    border: 3px solid rgba(255,255,255,.9);
    box-shadow: 0 22px 50px rgba(20,80,120,.15);
    backdrop-filter: blur(12px);
}

.author-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 22px;
    align-items: center;
}

.earth {
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #55d6ff, #3edc8b);
    font-size: 3rem;
    box-shadow: 0 12px 25px rgba(20,80,120,.22);
}

.author-card h2,
.overview h2,
.final-quiz h2,
.signature h2 {
    color: #0f5c8c;
    margin-bottom: 10px;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.overview-grid div {
    padding: 24px;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, #e7f9ff);
    border: 2px solid #d2f0ff;
    text-align: center;
}

.overview-grid span {
    display: block;
    font-size: 3rem;
    margin-bottom: 10px;
}

.overview-grid h3 {
    color: #0f5c8c;
    margin-bottom: 8px;
}

.lesson-title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
}

.lesson-title span {
    min-width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f8cc8, #2bd4a7);
    color: white;
    font-size: 2.2rem;
    font-weight: 900;
}

.lesson-title p {
    color: #2a86a8;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.lesson-title h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    color: #0f5c8c;
}

.info-box {
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
    border-left: 8px solid #0f8cc8;
    margin-bottom: 24px;
}

.info-box h3,
.composition h3,
.layers h3,
.weather-grid h3,
.diagram h3,
.climate-section h3,
.remember h3,
.quiz-card h3 {
    color: #0f5c8c;
    margin-bottom: 12px;
}

.info-box p,
.layer p,
.weather-grid p,
.climate-grid p,
.mountain-box p,
.remember li {
    line-height: 1.72;
    font-weight: 700;
    color: #24465f;
}

.composition,
.layers,
.diagram,
.remember,
.quiz-card,
.climate-section {
    margin-top: 24px;
    padding: 26px;
    border-radius: 30px;
    background: rgba(255,255,255,.82);
    border: 2px solid rgba(15,140,200,.12);
}

.bar-item {
    margin: 16px 0;
}

.bar-item label {
    display: block;
    font-weight: 900;
    margin-bottom: 8px;
    color: #24465f;
}

.bar {
    height: 18px;
    border-radius: 999px;
    background: #d9eef8;
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f8cc8, #2bd4a7);
    min-width: 8px;
}

.layer {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    margin: 16px 0;
    padding: 20px;
    border-radius: 24px;
    color: white;
}

.layer h4 {
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.layer p {
    color: white;
}

.layer-alt {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.22);
    font-weight: 900;
    display: grid;
    place-items: center;
    text-align: center;
}

.troposfera { background: linear-gradient(135deg, #2bd4a7, #0f8cc8); }
.stratosfera { background: linear-gradient(135deg, #3489eb, #845ec2); }
.mezosfera { background: linear-gradient(135deg, #5b4fc7, #2b2d8f); }
.termosfera { background: linear-gradient(135deg, #3a1c71, #d76d77); }
.exosfera { background: linear-gradient(135deg, #111827, #4b5563); }

.remember ul {
    padding-left: 20px;
}

.remember li {
    margin: 8px 0;
}

.weather-grid,
.climate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.weather-grid article,
.climate-grid article {
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, #eaf9ff);
    border: 2px solid #d2f0ff;
    transition: .25s;
}

.weather-grid article:hover,
.climate-grid article:hover,
.overview-grid div:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 32px rgba(20,80,120,.14);
}

.weather-grid span,
.climate-grid span {
    display: block;
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.diagram {
    text-align: center;
}

.flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 18px 0;
}

.flow div {
    padding: 20px 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f8cc8, #2bd4a7);
    color: white;
    font-weight: 900;
}

.flow span {
    font-size: 2rem;
}

.climate-map {
    display: grid;
    gap: 12px;
    margin: 24px 0;
    text-align: center;
    font-weight: 900;
    color: white;
}

.zone {
    padding: 20px;
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(20,80,120,.12);
}

.hot { background: linear-gradient(90deg, #ff7b00, #ffd166); }
.temperate { background: linear-gradient(90deg, #3edc8b, #0f8cc8); }
.cold { background: linear-gradient(90deg, #68d8ff, #3b82f6); }
.mountain { background: linear-gradient(90deg, #64748b, #111827); }

.climate-section h3 {
    font-size: 1.7rem;
}

.mountain-box {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, #eaf9ff);
}

.mountain-box span {
    font-size: 4rem;
}

.quiz-card {
    background: #f9fdff;
}

.question {
    margin: 20px 0;
    padding: 20px;
    border-radius: 22px;
    background: white;
    border: 2px solid #d2f0ff;
}

.question p {
    font-weight: 900;
    color: #24465f;
    margin-bottom: 12px;
}

.question button {
    margin: 6px;
    padding: 12px 16px;
    border: none;
    border-radius: 999px;
    background: #e0f7ff;
    color: #0f5c8c;
    font-weight: 900;
    cursor: pointer;
    transition: .2s;
}

.question button:hover {
    transform: translateY(-3px);
    background: #beeefe;
}

.question button.correct {
    background: #22c55e;
    color: white;
}

.question button.wrong {
    background: #ef4444;
    color: white;
}

.quiz-result,
#totalScore {
    margin-top: 14px;
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f5c8c;
}

#totalScoreBtn {
    margin-top: 16px;
    padding: 15px 24px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f8cc8, #2bd4a7);
    color: white;
    font-weight: 900;
    cursor: pointer;
    font-size: 1rem;
}

.signature {
    text-align: center;
}

.signature p {
    font-size: 1.2rem;
    margin: 8px 0;
    color: #24465f;
}

footer {
    text-align: center;
    padding: 35px 20px 50px;
    color: #0f5c8c;
    font-weight: 900;
}

@media (max-width: 980px) {
    .overview-grid,
    .weather-grid,
    .climate-grid {
        grid-template-columns: 1fr;
    }

    .author-card,
    .mountain-box,
    .layer {
        grid-template-columns: 1fr;
    }

    .earth {
        margin: auto;
    }

    .navbar {
        border-radius: 26px;
        flex-direction: column;
    }
}
