* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05080d; font-family: "Segoe UI", Roboto, Arial, sans-serif; color: #e8f2ff; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: #05080d; background: #3fd0ff; padding: 2px 8px; border-radius: 4px; margin: 10px 0 6px; }

#hud { position: fixed; inset: 0; pointer-events: none; }
#panel { position: absolute; left: 20px; top: 20px; width: min(380px, 40vw); background: rgba(6, 12, 22, .78); border: 1px solid rgba(63, 208, 255, .35); border-radius: 12px; padding: 14px 18px; backdrop-filter: blur(4px); }
#title { font-size: 22px; font-weight: 800; color: #7fe3ff; }
#intro { font-size: 14px; line-height: 1.4; color: #b8cde0; margin-top: 4px; }
#objective { font-size: 17px; font-weight: 700; color: #fff; }
#check { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
#check li { padding: 2px 0; color: #9fb4c8; }
#check li.ok { color: #4dff7a; }

#lesson { position: absolute; right: 20px; top: 20px; width: min(430px, 42vw); max-height: calc(100vh - 160px); overflow: hidden; background: rgba(6, 14, 28, .86); border: 2px solid #3fd0ff; border-radius: 14px; padding: 6px 20px 14px; box-shadow: 0 0 30px rgba(63, 208, 255, .25); }
#lesson:empty { display: none; }
#lesson .tag { background: #ffd84a; }
#lesson h3 { margin: 4px 0 8px; font-size: 21px; color: #fff; }
#lesson p { margin: 0 0 8px; font-size: 16px; line-height: 1.45; color: #d6e6f5; }
#lesson.pop { animation: pop .45s ease-out; }
@keyframes pop { from { transform: translateX(30px) scale(.97); opacity: .2; } to { transform: none; opacity: 1; } }

#train { position: absolute; left: 20px; bottom: 90px; width: 330px; background: rgba(6, 12, 22, .85); border: 1px solid #4dff7a; border-radius: 12px; padding: 4px 16px 12px; font-size: 16px; display: none; }
#train.on { display: block; }
#train .tag { background: #4dff7a; }
#train b.good { color: #4dff7a; } #train b.warn { color: #ffb347; }
#train .bar { height: 10px; background: rgba(255, 255, 255, .1); border-radius: 5px; margin: 6px 0; overflow: hidden; }
#train .bar i { display: block; height: 100%; background: linear-gradient(90deg, #4dff7a, #ffb347, #ff4d4d); transition: width .6s; }
#train .small { font-size: 12px; color: #9fb4c8; }

#banner { position: absolute; top: 16%; width: 100%; text-align: center; font-size: 44px; font-weight: 900; color: #fff; text-shadow: 0 3px 18px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .5s; }
#banner.on { opacity: 1; }
#prompt { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); font-size: 20px; font-weight: 800; padding: 10px 22px; border-radius: 30px; background: rgba(63, 208, 255, .92); color: #04101c; opacity: 0; transition: opacity .2s; white-space: nowrap; }
#prompt.on { opacity: 1; }
#skip { position: absolute; right: 24px; bottom: 24px; font-size: 14px; color: #fff; opacity: 0; }
#skip.on { opacity: .8; }
#help { position: absolute; left: 20px; bottom: 18px; font-size: 12px; color: rgba(255, 255, 255, .55); }
#fps { position: absolute; right: 20px; bottom: 6px; font-size: 11px; color: rgba(255, 255, 255, .4); }

#screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(3, 8, 16, .72); }
#screen .box { width: min(760px, 92vw); background: rgba(6, 14, 28, .95); border: 2px solid #3fd0ff; border-radius: 18px; padding: 26px 36px; text-align: center; box-shadow: 0 0 60px rgba(63, 208, 255, .3); }
#screen h1 { margin: 0 0 6px; font-size: 34px; color: #4dff7a; }
#screen h2 { margin: 0 0 14px; font-size: 20px; color: #7fe3ff; }
#screen p { font-size: 18px; line-height: 1.5; }
#screen ul { text-align: left; font-size: 17px; line-height: 1.6; }
#screen .key { margin-top: 16px; font-weight: 800; color: #ffd84a; font-size: 18px; }

#start { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: radial-gradient(ellipse at center, rgba(10, 30, 60, .85), rgba(2, 5, 10, .97)); text-align: center; }
#start .logo { font-size: clamp(40px, 8vw, 96px); font-weight: 900; letter-spacing: .06em; color: #7fe3ff; text-shadow: 0 0 30px rgba(63, 208, 255, .7); }
#start .sub { font-size: clamp(16px, 2.2vw, 22px); color: #d6e6f5; max-width: 760px; }
#start ol { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 900px; }
#start ol li { background: rgba(63, 208, 255, .12); border: 1px solid rgba(63, 208, 255, .4); border-radius: 20px; padding: 5px 14px; font-size: 14px; }
#start .controls { font-size: 14px; color: #9fb4c8; max-width: 760px; }
#start .small { font-size: 12px; color: #6f8296; max-width: 700px; }
#loading { font-size: 14px; color: #ffd84a; }
#play { font-size: 26px; font-weight: 900; padding: 12px 56px; border-radius: 40px; border: 0; background: #3fd0ff; color: #04101c; cursor: pointer; box-shadow: 0 0 30px rgba(63, 208, 255, .6); }
#play:disabled { opacity: .4; cursor: wait; }

#story { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .8s; }
#story.on { opacity: 1; }
#story.on .big, #story.on .small { animation: storyIn 1.2s ease-out both; }
#story.on .small { animation-delay: .7s; }
#story .big { font-size: clamp(26px, 4vw, 48px); font-weight: 900; color: #fff; max-width: 1100px; }
#story .small { font-size: clamp(17px, 2.2vw, 26px); color: #ffd84a; max-width: 1000px; }
@keyframes storyIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

#start .langs { display: flex; gap: 10px; }
#start .lang { font-size: 15px; padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(63, 208, 255, .5); background: rgba(63, 208, 255, .08); color: #d6e6f5; cursor: pointer; }
#start .lang.on { background: #3fd0ff; color: #04101c; font-weight: 800; }
#start .quality { font-size: 15px; padding: 6px 12px; border-radius: 20px; background: rgba(63, 208, 255, .08); color: #d6e6f5; border: 1px solid rgba(63, 208, 255, .5); }
#start .quality option { background: #0b1622; }
