:root {
  --water-ink: #17342c;
  --water-muted: #587067;
  --water-green: #166b51;
  --water-blue: #1f6fa8;
  --water-orange: #ed6a2d;
  --water-yellow: #f2c94c;
  --water-bg: #f4f8f6;
  --water-line: #d5e2dd;
  --water-surface: #ffffff;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--water-ink); background: var(--water-bg); font-size: 16px; line-height: 1.55; }
button, input { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #f2c94c; outline-offset: 3px; }
.water-topbar { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 20px; padding: 8px clamp(16px, 4vw, 58px); background: #ffffff; border-bottom: 1px solid var(--water-line); }
.water-brand { display: flex; align-items: center; gap: 8px; color: var(--water-ink); text-decoration: none; }
.water-brand > span { display: grid; width: 34px; height: 34px; place-items: center; color: #ffffff; background: var(--water-green); border-radius: 6px; font-weight: 900; }
.water-topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--water-muted); font-size: 0.72rem; }
.water-topbar nav a { color: inherit; }
.water-topbar nav strong { color: var(--water-ink); }
.water-hero { position: relative; min-height: min(66vh, 650px); overflow: hidden; background: #79bedd; }
.water-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 56%; }
.water-hero-shade { position: absolute; inset: 0; background: rgba(7, 39, 47, 0.34); }
.water-hero-copy { position: absolute; z-index: 1; left: clamp(18px, 7vw, 110px); bottom: clamp(60px, 10vh, 100px); max-width: 770px; color: #ffffff; text-shadow: 0 2px 14px rgba(0,0,0,.46); }
.water-hero-copy p { margin: 0 0 8px; font-size: 0.76rem; font-weight: 900; text-transform: uppercase; }
.water-hero-copy h1 { max-width: 760px; margin: 0; font-size: clamp(2.25rem, 6vw, 5.3rem); line-height: .98; letter-spacing: 0; }
.water-hero-copy span { display: block; max-width: 620px; margin-top: 15px; font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 650; }
.water-start { position: absolute; z-index: 1; right: clamp(18px, 4vw, 62px); bottom: 25px; display: flex; align-items: center; gap: 9px; color: #ffffff; font-size: 0.8rem; font-weight: 850; text-decoration: none; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.water-start span { font-size: 1.3rem; }
.water-progress { position: sticky; z-index: 100; top: 58px; display: grid; grid-template-columns: minmax(100px, 1fr) auto auto; align-items: center; gap: 15px; padding: 9px clamp(16px, 4vw, 58px); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--water-line); }
.water-progress > div:first-child { height: 6px; overflow: hidden; background: #e3ece8; border-radius: 4px; }
.water-progress > div:first-child span { display: block; width: 0; height: 100%; background: var(--water-green); transition: width .25s ease; }
.water-progress > p { margin: 0; color: var(--water-muted); font-size: 0.7rem; white-space: nowrap; }
.water-progress > p strong { color: var(--water-green); }
.water-modes { display: flex; border: 1px solid var(--water-line); border-radius: 7px; overflow: hidden; }
.water-modes button { min-height: 36px; padding: 6px 12px; color: var(--water-muted); background: #ffffff; border: 0; border-right: 1px solid var(--water-line); font-size: 0.72rem; font-weight: 850; cursor: pointer; }
.water-modes button:last-child { border-right: 0; }
.water-modes button.active { color: #ffffff; background: var(--water-green); }
.water-lab { width: min(1180px, calc(100% - 34px)); margin: 0 auto; padding: 58px 0 80px; }
.water-mode[hidden], .concept-panel[hidden] { display: none !important; }
.water-section-head { max-width: 760px; margin-bottom: 28px; }
.water-section-head > p, .water-kicker { margin: 0 0 5px; color: var(--water-green); font-size: 0.68rem; font-weight: 900; text-transform: uppercase; }
.water-section-head h2 { margin: 0; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.08; letter-spacing: 0; }
.water-section-head > span { display: block; margin-top: 9px; color: var(--water-muted); }
.concept-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--water-line); }
.concept-tabs button { min-height: 52px; padding: 8px 12px; color: var(--water-muted); background: var(--water-surface); border: 0; border-right: 1px solid var(--water-line); font-size: 0.8rem; font-weight: 850; cursor: pointer; }
.concept-tabs button:last-child { border-right: 0; }
.concept-tabs button.active { color: #ffffff; background: var(--water-blue); }
.concept-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: clamp(28px, 6vw, 82px); align-items: center; min-height: 500px; padding: 46px 0; border-bottom: 1px solid var(--water-line); }
.concept-copy h3 { margin: 0 0 12px; font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.15; }
.concept-copy > p:not(.water-kicker) { margin: 0; color: var(--water-muted); font-size: 1.02rem; line-height: 1.65; }
.concept-copy ul { display: grid; gap: 7px; margin: 18px 0; padding-left: 21px; }
.concept-copy li::marker { color: var(--water-orange); }
.water-clue { display: flex; gap: 10px; padding: 13px 15px; background: #eaf4fa; border-left: 4px solid var(--water-blue); }
.water-clue > span { font-size: 1.25rem; }
.water-clue p { margin: 0; color: #3e5c69; font-size: 0.82rem; }
.particle-demo { position: relative; min-height: 370px; overflow: hidden; background: #dff2f7; border: 1px solid #b9dce7; border-radius: 7px; }
.particle-demo > strong { position: absolute; right: 14px; bottom: 12px; color: #9b411d; font-size: 0.75rem; }
.particle { position: absolute; width: 17px; height: 17px; background: #2e91c4; border: 3px solid rgba(255,255,255,.75); border-radius: 50%; box-shadow: 0 2px 5px rgba(27,89,121,.25); }
.sun { position: absolute; top: 20px; right: 25px; font-size: 3.4rem; animation: sunPulse 2.4s ease-in-out infinite; }
.air-label { position: absolute; top: 25px; left: 20px; color: #46717c; font-size: 0.72rem; font-weight: 800; }
.water-surface { position: absolute; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, 1fr); place-items: center; height: 125px; padding: 20px 30px; background: #5bb3d8; border-top: 8px solid #9cdbec; }
.water-surface span { width: 20px; height: 20px; background: #187ead; border: 3px solid rgba(255,255,255,.7); border-radius: 50%; animation: liquidMove 2s ease-in-out infinite alternate; }
.water-surface span:nth-child(2n) { animation-delay: -.8s; }
.evaporation-demo .p1 { left: 18%; bottom: 132px; animation: rise 3.1s ease-out infinite; }
.evaporation-demo .p2 { left: 39%; bottom: 125px; animation: rise 4s ease-out .7s infinite; }
.evaporation-demo .p3 { left: 61%; bottom: 127px; animation: rise 3.5s ease-out 1.4s infinite; }
.evaporation-demo .p4 { left: 76%; bottom: 128px; animation: rise 4.4s ease-out 2.1s infinite; }
.cool-air { position: absolute; top: 20px; left: 20px; color: #266d95; font-size: 0.78rem; font-weight: 850; }
.cold-glass { position: absolute; left: 50%; bottom: 22px; width: 150px; height: 245px; transform: translateX(-50%); background: rgba(255,255,255,.45); border: 7px solid rgba(255,255,255,.8); border-top-width: 11px; border-radius: 4px 4px 25px 25px; box-shadow: inset 0 -105px 0 rgba(56,157,200,.55); }
.cold-glass > span { position: absolute; inset: -29px 35px auto; height: 23px; background: #8fd1ea; border-radius: 50% 50% 45% 45%; }
.cold-glass i { position: absolute; width: 16px; height: 23px; background: #2c96c5; border-radius: 50% 50% 55% 55%; animation: drop 2.5s ease-in infinite; }
.cold-glass i:nth-of-type(1) { left: -28px; top: 35px; }
.cold-glass i:nth-of-type(2) { right: -30px; top: 70px; animation-delay: -.8s; }
.cold-glass i:nth-of-type(3) { left: -24px; top: 130px; animation-delay: -1.5s; }
.cold-glass i:nth-of-type(4) { right: -25px; top: 168px; animation-delay: -.3s; }
.condensation-demo .vapour { animation: driftIn 3.5s ease-in-out infinite; }
.condensation-demo .p1 { left: 8%; top: 100px; }.condensation-demo .p2 { right: 8%; top: 120px; animation-delay: -.8s; }.condensation-demo .p3 { left: 16%; top: 210px; animation-delay: -1.5s; }.condensation-demo .p4 { right: 13%; top: 240px; animation-delay: -2.2s; }
.temperature-scale { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 330px; padding: 40px 28px; background: #ffffff; border: 1px solid var(--water-line); border-radius: 7px; }
.temp-point { display: grid; justify-items: center; gap: 4px; text-align: center; }
.temp-point strong { font-size: 1.45rem; }.temp-point span { color: var(--water-muted); font-size: .68rem; }
.temp-line { position: relative; height: 12px; background: #cbe4f0; border-radius: 6px; }
.temp-line::before { position: absolute; inset: -6px auto -6px 0; width: 5px; background: #2e91c4; content: ""; }
.temp-line::after { position: absolute; inset: -6px 0 -6px auto; width: 5px; background: #ed6a2d; content: ""; }
.temp-line i { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; background: var(--water-yellow); border: 4px solid #ffffff; border-radius: 50%; box-shadow: 0 0 0 2px #bd8b10; transform: translate(-50%,-50%); }
.state-labels { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; padding-top: 30px; color: var(--water-muted); font-size: .75rem; font-weight: 750; }
.freeze-demo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 340px; padding: 35px 24px; background: #eaf5f8; border: 1px solid #c7e0e7; border-radius: 7px; }
.freeze-demo > div { display: grid; justify-items: center; gap: 10px; }
.freeze-demo > span { color: var(--water-blue); font-weight: 900; }
.bottle { position: relative; display: block; width: 100px; height: 190px; background: rgba(255,255,255,.55); border: 6px solid #8eb9c5; border-radius: 15px 15px 25px 25px; }
.bottle::before { position: absolute; top: -24px; left: 26px; width: 36px; height: 24px; background: rgba(255,255,255,.7); border: 6px solid #8eb9c5; border-bottom: 0; content: ""; }
.bottle i { position: absolute; width: 17px; height: 17px; background: #328fbc; border-radius: 50%; }
.liquid-bottle { box-shadow: inset 0 -125px 0 rgba(55,163,207,.42); }
.liquid-bottle i:nth-child(1){left:15px;bottom:15px}.liquid-bottle i:nth-child(2){right:14px;bottom:22px}.liquid-bottle i:nth-child(3){left:35px;bottom:45px}.liquid-bottle i:nth-child(4){right:19px;bottom:67px}.liquid-bottle i:nth-child(5){left:16px;bottom:78px}.liquid-bottle i:nth-child(6){right:34px;bottom:98px}
.ice-bottle { width: 112px; border-color: #5aa0bd; box-shadow: inset 0 -155px 0 rgba(178,224,239,.82); }
.ice-bottle i { background: #68b8d5; }
.ice-bottle i:nth-child(1){left:12px;bottom:12px}.ice-bottle i:nth-child(2){right:12px;bottom:14px}.ice-bottle i:nth-child(3){left:37px;bottom:56px}.ice-bottle i:nth-child(4){right:12px;bottom:87px}.ice-bottle i:nth-child(5){left:10px;bottom:112px}.ice-bottle i:nth-child(6){right:38px;bottom:138px}
.water-next { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; margin: 28px 0 0 auto; padding: 9px 18px; color: #ffffff; background: var(--water-green); border: 0; border-radius: 6px; font-weight: 850; cursor: pointer; }
.quiz-shell { width: min(860px, 100%); min-height: 430px; padding: clamp(20px, 4vw, 38px); background: #ffffff; border: 1px solid var(--water-line); border-top: 5px solid var(--water-blue); border-radius: 7px; }
.quiz-status { display: flex; justify-content: space-between; gap: 15px; color: var(--water-muted); font-size: .72rem; font-weight: 800; }
.quiz-meter { height: 6px; margin: 10px 0 30px; overflow: hidden; background: #e4ece9; border-radius: 4px; }
.quiz-meter span { display: block; width: 0; height: 100%; background: var(--water-blue); transition: width .25s ease; }
.quiz-body h3 { max-width: 700px; margin: 0 0 22px; font-size: clamp(1.3rem, 3vw, 1.85rem); line-height: 1.25; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quiz-option { min-height: 54px; padding: 10px 13px; color: var(--water-ink); background: #f6f9f8; border: 1px solid var(--water-line); border-radius: 6px; text-align: left; font-weight: 750; cursor: pointer; }
.quiz-option:hover { border-color: var(--water-blue); }
.quiz-option.correct { color: #11543e; background: #e0f3ea; border-color: #60a88e; }
.quiz-option.wrong { color: #8d302c; background: #fff0ef; border-color: #d99692; }
.quiz-feedback { margin-top: 16px; padding: 13px 15px; background: #edf5f9; border-left: 4px solid var(--water-blue); }
.quiz-feedback strong { display: block; margin-bottom: 3px; }.quiz-feedback p { margin: 0; color: var(--water-muted); }
.quiz-next, .quiz-restart, .quiz-play { min-height: 44px; margin-top: 17px; padding: 8px 15px; color: #ffffff; background: var(--water-green); border: 0; border-radius: 6px; font-weight: 850; cursor: pointer; }
.quiz-result { text-align: center; }.quiz-result > span { font-size: 3rem; }.quiz-result h3 { margin: 6px auto; }.quiz-result .result-score { display: block; color: var(--water-blue); font-size: 3rem; line-height: 1; }.quiz-result p { max-width: 560px; margin: 12px auto; color: var(--water-muted); }
.quiz-result .quiz-restart { margin-right: 7px; color: var(--water-green); background: #ffffff; border: 1px solid var(--water-green); }
.particle-game { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(285px, .6fr); min-height: 560px; overflow: hidden; background: #ffffff; border: 1px solid var(--water-line); border-radius: 7px; }
.game-stage { position: relative; min-height: 560px; overflow: hidden; background: #dff2f7; }
.game-sky { position: absolute; inset: 0 0 54%; background: #bce3f0; }
.game-cloud { position: absolute; top: 30px; right: 15%; font-size: 4rem; }.game-wind { position: absolute; top: 125px; right: 10%; color: #4d99b2; font-weight: 900; opacity: 0; transition: opacity .2s; }.game-stage.fan-on .game-wind { opacity: 1; animation: windMove 1.4s linear infinite; }
.game-chamber { position: absolute; left: 50%; bottom: 55px; width: min(72%, 390px); height: 390px; overflow: hidden; background: rgba(255,255,255,.42); border: 7px solid rgba(255,255,255,.85); border-radius: 8px 8px 34px 34px; transform: translateX(-50%); box-shadow: 0 20px 35px rgba(38,102,116,.18); }
.game-state { position: absolute; z-index: 5; top: 10px; left: 10px; padding: 5px 8px; color: #24586a; background: rgba(255,255,255,.82); border-radius: 4px; font-size: .68rem; font-weight: 900; }
.game-water { position: absolute; inset: auto 0 0; height: 50%; background: rgba(42,151,197,.58); border-top: 7px solid rgba(149,218,238,.9); transition: height .35s, background .35s; }
.game-particles span { position: absolute; z-index: 3; width: 17px; height: 17px; background: #207eae; border: 3px solid rgba(255,255,255,.65); border-radius: 50%; transition: left .5s, top .5s; }
.state-solid .game-water { height: 58%; background: rgba(165,218,236,.9); border-top-color: #d6f1fa; }
.state-solid .game-particles span { background: #5eb2d1; animation: none !important; }
.state-evaporating .game-water { height: 42%; }.state-boiling .game-water { height: 38%; background: rgba(42,151,197,.7); }
.state-condensing .game-water { height: 34%; }
.state-evaporating .game-particles span:nth-child(3n), .state-boiling .game-particles span:nth-child(2n) { animation: gameRise 2.2s ease-out infinite; }
.state-condensing .game-particles span:nth-child(2n) { animation: gameDrop 2s ease-in infinite; }
.lab-guide { position: absolute; z-index: 6; left: 8px; bottom: 4px; width: min(180px, 31%); height: auto; filter: drop-shadow(0 8px 8px rgba(20,67,58,.18)); animation: guideBounce 2.8s ease-in-out infinite; }
.game-burst { position: absolute; z-index: 9; inset: 0; pointer-events: none; }.game-burst span { position: absolute; left: 50%; top: 52%; font-size: 2rem; animation: burst 1.3s ease-out forwards; }
.lesson-burst { position: fixed; z-index: 11900; left: 50%; top: 55%; font-size: 2rem; pointer-events: none; animation: burst 1.3s ease-out forwards; }
.game-controls { padding: 30px 25px; border-left: 1px solid var(--water-line); }
.game-controls h3 { margin: 0; font-size: 1.45rem; line-height: 1.2; }.game-controls > p:not(.water-kicker):not(.mission-feedback) { min-height: 68px; color: var(--water-muted); }
.game-controls > label:not(.fan-control) { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; font-size: .78rem; font-weight: 850; }
#temperatureControl { width: 100%; margin: 14px 0 4px; accent-color: var(--water-orange); }
.temperature-labels { display: flex; justify-content: space-between; color: var(--water-muted); font-size: .57rem; }
.fan-control { display: flex; align-items: center; gap: 9px; margin: 22px 0; padding: 11px; background: #eef5f8; border: 1px solid #d4e5ea; border-radius: 6px; font-size: .78rem; font-weight: 800; cursor: pointer; }.fan-control input { width: 19px; height: 19px; accent-color: var(--water-blue); }
.game-check { width: 100%; min-height: 47px; color: #ffffff; background: var(--water-orange); border: 0; border-radius: 6px; font-weight: 900; cursor: pointer; }
.mission-feedback { min-height: 66px; margin: 13px 0; padding: 10px; color: var(--water-muted); background: #f6f9f8; border-left: 3px solid var(--water-line); font-size: .74rem; line-height: 1.45; }.mission-feedback.success { color: #15533e; background: #e6f4ec; border-color: var(--water-green); }.mission-feedback.try { color: #82421e; background: #fff3e8; border-color: var(--water-orange); }
.mission-dots { display: flex; gap: 6px; justify-content: center; }.mission-dots span { width: 10px; height: 10px; background: #d4dfdb; border-radius: 50%; }.mission-dots span.done { background: var(--water-green); }.mission-dots span.current { box-shadow: 0 0 0 3px #dcefe7; }
.water-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 20px; color: var(--water-muted); background: #ffffff; border-top: 1px solid var(--water-line); font-size: .7rem; }.water-footer a { color: inherit; }
@keyframes sunPulse { 50% { transform: scale(1.08) rotate(4deg); } }
@keyframes liquidMove { to { transform: translate(7px,-5px); } }
@keyframes rise { 0% { opacity: 0; transform: translate(0,20px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(30px,-190px); } }
@keyframes driftIn { 50% { transform: translateX(35px); } }
@keyframes drop { 0% { opacity:.15; transform: translateY(-10px) scale(.7); } 35% { opacity:1; } 100% { opacity:.2; transform: translateY(45px) scale(1); } }
@keyframes windMove { 50% { transform: translateX(18px); } }
@keyframes gameRise { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: .15; transform: translateY(-210px); } }
@keyframes gameDrop { 0% { transform: translateY(-120px); } 100% { transform: translateY(95px); } }
@keyframes guideBounce { 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes burst { to { opacity: 0; transform: translate(var(--x),var(--y)) rotate(20deg) scale(.7); } }
@media (max-width: 800px) {
  .water-progress { top: 58px; grid-template-columns: 1fr auto; }.water-progress > p { display: none; }.water-modes { grid-column: 1 / -1; }.water-modes button { flex: 1; }
  .concept-tabs { grid-template-columns: 1fr 1fr; }.concept-tabs button:nth-child(2) { border-right: 0; }.concept-tabs button:nth-child(-n+2) { border-bottom: 1px solid var(--water-line); }
  .concept-panel { grid-template-columns: 1fr; min-height: 0; }.particle-demo, .temperature-scale, .freeze-demo { min-height: 330px; }
  .particle-game { grid-template-columns: 1fr; }.game-controls { border-top: 1px solid var(--water-line); border-left: 0; }
}
@media (max-width: 560px) {
  .water-topbar { align-items: flex-start; flex-direction: column; gap: 5px; }.water-topbar nav { font-size: .62rem; }
  .water-hero { min-height: 560px; }.water-hero > img { object-position: 61% center; }.water-hero-copy { right: 18px; bottom: 68px; }.water-hero-copy h1 { font-size: 2.55rem; }
  .water-progress { top: 58px; padding-inline: 10px; }.water-modes button { padding-inline: 7px; }
  .water-lab { width: min(100% - 22px, 1180px); padding-top: 40px; }.concept-tabs button { font-size: .68rem; }
  .quiz-options { grid-template-columns: 1fr; }.freeze-demo { grid-template-columns: 1fr; }.freeze-demo > span { transform: rotate(90deg); }
  .game-stage { min-height: 500px; }.game-chamber { width: 82%; height: 355px; }.lab-guide { width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
