:root {
  --green: #39d866;
  --dark: #071a13;
  --panel: #07110f;
  --red: #ff3030;
  --orange: #ffb21e;
}
*{box-sizing:border-box;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;-webkit-tap-highlight-color:transparent;}
body { background:#020807; display:flex; justify-content:center; align-items:center; height:100vh; height:100dvh; margin:0; overflow:hidden; }
#app { width:100%; max-width:420px; height:100%; display:flex; flex-direction:column; background:#fff; overflow:hidden; }
.screen { display:none; flex-direction:column; height:100%; overflow:hidden; padding-bottom: 90px; }
.screen.active { display:flex;}

/* No-Footer Screens */
#sl, #sg, #sbg, #sq, #st, #sa { padding-bottom: 0; }

/* UI Screens Styles */
.hdr { background:#1a3a5c; color:#fff; text-align:center; padding:20px 50px 13px; font-size:25px; font-weight:500; flex-shrink:0; position:relative; box-shadow: 0 10px 10px rgba(0,0,100,0.15);}
.hdr small { font-size:12px; opacity:.7; display:block; margin-top:1px; }
.hdr-back, .hdr-x, .psh-top { position:absolute; top:50%; transform:translateY(-50%); background:none;  border:1px solid rgba(255,255,255,.3); color:#fff; border-radius:6px; cursor:pointer; width:34px; height:34px; display:flex; align-items:center; justify-content:center; }
.hdr-back { left:10px; font-size:24px; }
.hdr-x { right:10px; font-size:20px; }
.lang-list { flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column;  }
.lang-card { display:flex; align-items:center; padding:16px; border:1px solid #eee; border-radius:15px; margin-bottom:5px; cursor:pointer; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,0.04); transition:transform 0.1s; }
.lang-card:active { transform:scale(0.98); background:#f9f9f9; }
.lang-flag { width:50px; height:35px; border:1px solid #eee; overflow:hidden; display:flex; align-items:center; margin-right:20px; }
.lang-flag svg { width:100%; height:100%; }
.lang-name { font-size:16px; font-weight:600; color:#222; }
.lang-desc { font-size:12px; color:#888; }
.tabs { display:flex; border-bottom:1px solid #e8e8e8; flex-shrink:0; }
.tab { flex:1; padding:10px 8px; text-align:center; font-weight:500; font-size:13px; color:#777; cursor:pointer; border-bottom:2px solid transparent; }
.tab.active { color:#1a3a5c; border-bottom-color:#1a3a5c; font-weight:700; }
.dict-list {background-: #EDF6FF; flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; }
.dc { border:1px solid #e8e8e8; border-radius:12px; margin-bottom:5px; padding:12px; cursor:pointer; background:#fff; transition:border-color .15s; gap:1px; }
.dc.sel { border-color:#1a3a5c; border-width:2px; background:#eaf1f9; }
.dc-top { display:flex; align-items:center; margin-bottom:12px; }
.dc-icon { width:44px; height:44px; border-radius:10px; background:#1a3a5c; display:flex; align-items:center; justify-content:center; color:#fff; font-size:18px; font-weight:500; flex-shrink:0; }
.dc-info { flex:1; min-width:0; margin-left:12px; }
.dc-name { font-size:16px; font-weight:600; color:#222; }
.dc-meta { font-size:13px; color:#777; margin-top:3px; }
.dc-badge { font-size:10px; padding:3px 8px; border-radius:20px; font-weight:600; text-transform:uppercase; }
.pbar-row { display:flex; align-items:center; gap:10px; }
.pbar-w { flex:1; height:6px; background:#f0f0f0; border-radius:3px; margin:0 10px 0 0; overflow:hidden; }
.pbar-f { height:100%; background:#3b6d11; }
.dc-cnt { font-size:11px; color:#777; }
.custom-area { flex:1; overflow:hidden; padding:16px; display:none; flex-direction:column; }
.custom-area.on { display:flex; }
.search-box { flex-shrink:0; }
.search-box input { width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:10px; outline:none; }
.cwl { flex:1; overflow-y:auto; border:1px solid #eee; border-radius:10px; background:#fafafa; padding:4px; }
.cwi { display:flex; align-items:center; padding:10px 12px; font-size:14px; border-bottom:1px solid #f0f0f0; cursor:pointer; gap:8px; }
.cwi input { width:18px; height:18px; margin-right:4px; accent-color:#1a3a5c; flex-shrink:0; }
.cwi-en { font-weight:600; color:#1a3a5c; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cwi-ru { flex:1; color:#666; font-size:13px; }
.wcrow { padding:16px 16px 4px; display:flex; align-items:center; gap:12px; flex-shrink:0; border-top-:1px solid #ddd; box-shadow:0 -5px 5px rgba(0, 0, 0, 0.1);	}
.wcrow label { font-size:13px; color:#555; font-weight:500; }
.wcrow input { flex:1; accent-color:#1a3a5c; margin: 0 10px;}
.wcv { font-size:14px; font-weight:700; color:#1a3a5c; min-width:28px; text-align:right; }
.btn-p { margin:10px 16px; padding:15px; background:#1a3a5c; color:#fff; border:none; border-radius:12px; font-size:15px; font-weight:600; cursor:pointer; flex-shrink:0; }
.btn-p:disabled { opacity:.4; }
.btn-s { padding:13px; background:transparent; color:#1a3a5c; border:1.5px solid #1a3a5c; border-radius:12px; font-size:14px; font-weight:600; cursor:pointer; width:100%; }
.prev-list { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:8px; }
.prow { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid #eee; border-radius:12px; background:#fff; margin:0 12px; }
.pdot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.pen { font-weight:700; color:#1a3a5c; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pru { flex:1; color:#666; font-size:14px; }
.pbtn-ref { background:none; border:none; cursor:pointer; color:#999; font-size:16px; padding:4px; display:flex; align-items:center; justify-content:center; transition:color .2s; }
.pbtn-ref:active { color:#1a3a5c; }
.pdot.new { background:#ccc; } .pdot.learned { background:#3b6d11; } .pdot.due-week { background:#ba7517; } .pdot.due-month { background:#854f0b; } .pdot.due-half { background:#a32d2d; }
.legend { padding:16px; display:flex; flex-wrap:wrap; gap:12px 24px; justify-content:center; border-top:1px solid #f0f0f0; margin-top:auto; }
.li { display:flex; align-items:center; gap:10px; font-size:12px; color:#666; }
.ld { width:7px; height:7px; border-radius:50%; }
.go-btn { margin:12px; padding:15px; background:#c0392b; color:#fff; border:none; border-radius:10px; font-size:17px; font-weight:500; cursor:pointer; width:calc(100% - 24px); flex-shrink:0; letter-spacing:1px; }

/* Story Styles */
.story-card { border:1px solid #e8e8e8; border-radius:12px; margin-bottom:12px; padding:16px; cursor:pointer; background:#fff; transition:border-color .15s; }
.story-card:active { background: #f8fafc; border-color: #1a3a5c; }
.story-title { font-size:17px; font-weight:700; color:#1a3a5c; margin-bottom:6px; }
.story-preview { font-size:13px; color:#666; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.story-content { flex:1; overflow-y:auto; padding:20px; font-size:18px; color:#222; background:#fff; }
.story-content p { margin-bottom: 0.5em; }
.story-content span.w { cursor:pointer; padding: 0 2px; border-radius: 3px; }
.story-content span.w:active { background: #d4e8ff; }
.story-content span.w.sel { background: var(--green); color: #000; }
.story-content span.w.highlighted { background: #eeeeee !important; color: #000 !important; border-radius: 2px; }

.word-popup { position: fixed; bottom: 0; left: 50%; width: 100%; max-width: 420px; background: #fff; border-top: 2px solid #1a3a5c; padding: 15px 20px; box-shadow: 0 -5px 20px rgba(0,0,0,0.1); transform: translate(-50%, 100%); transition: transform 0.3s; z-index: 1000; display: flex; align-items: center; gap: 15px; }
.word-popup.on { transform: translate(-50%, 0); }
.wp-info { flex:1; }
.wp-en { font-size: 20px; font-weight: 700; color: #1a3a5c; }
.wp-tr { font-size: 14px; color: #666; margin: 2px 0; }
.wp-ru { font-size: 16px; color: #333; font-weight: 500; }
.wp-btn { background: #1a3a5c; color: #fff; border: none; border-radius: 8px; padding: 10px 15px; font-size: 13px; font-weight: 600; cursor: pointer; }
.wp-btn:active { transform: scale(0.95); }

/* NEW GAME DESIGN */
#sg, #sq, #sbg { background:linear-gradient(#061b16,#03100d); }
#sg .top, #sq .top, #sbg .top { height:80px; background:#071c2a; display:grid; grid-template-columns:1fr 1.3fr 1fr 44px; align-items:center; padding:20px 10px 5px; gap:8px; font-weight:700; flex-shrink:0; color:#fff; }
#sg .stat, #sq .stat, #sbg .stat { margin:0 auto; text-align:center; }
#sg .stat small, #sq .stat small, #sbg .stat small { display:block; color:#b8c0c5; font-size:10px; }
#sg .stat b, #sq .stat b, #sbg .stat b { color:var(--green); font-size:20px; }
#sg .center, #sq .center, #sbg .center { text-align:center; }
#sg .bar, #sq .bar, #sbg .bar { height:6px; background:#25353b; border-radius:9px; margin-top:6px; overflow:hidden; position:relative; }
#sg .bar span, #sq .bar span, #sbg .bar span { display:block; height:100%; background:var(--orange); transition:width 0.1s linear; }
#sg .close, #sq .close, #sbg .close { width:34px; height:34px; border:1px solid rgba(255,255,255,.3); border-radius:8px; display:grid; place-items:center; font-size:24px; cursor:pointer; color:#fff; background:none; }

.word, .idiom-banner { margin:8px 14px 4px; border:1px solid #1bc35b; border-radius:11px; min-height:110px; background:#050909; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow:0 0 10px #063 inset,0 0 8px #0a3; flex-shrink:0; text-align:center; padding:12px; }
.word small, .idiom-banner small { color:var(--green); letter-spacing:1px; font-size:12px; margin-bottom:4px; text-transform:uppercase; }
.word h1, .idiom-banner h1 { margin:0; font-size:24px; color:#fff; line-height:1.2; }

.quiz-area { flex:1; display:flex; flex-direction:column; justify-content:center; padding:10px 14px; gap:10px; overflow-y:auto; }
.ans-btn { width:100%; padding:14px; border:1px solid #2d7444; border-radius:10px; background:#0d321f; color:var(--green); font-size:15px; font-weight:600; text-align:left; cursor:pointer; transition:all .15s; }
.ans-btn:active { background:#154a2b; }
.ans-btn.correct { background:var(--green); border-color:var(--green); color:#04120a; }
.ans-btn.wrong { background:var(--red); border-color:var(--red); color:#fff; }
.ans-btn.dim { opacity:.45; }

/* Lifelines */
.lifelines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 5px 14px; position:relative; }
.life-btn { background: #071a13; border: 1px solid #113d29; border-radius: 8px; padding: 8px 5px; color: var(--green); font-size: 10px; font-weight: 700; text-align: center; cursor: pointer; transition: all 0.2s; position: relative; }
.life-btn.used { filter: grayscale(1); }
.life-icon { font-size: 16px; margin-bottom: 2px; display: block; }
.life-tip { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: var(--orange); color: #000; padding: 8px 12px; border-radius: 10px; font-size: 12px; width: 160px; margin-top: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 100; display: none; line-height:1.3; }
.life-tip::after { content: ""; position: absolute; bottom: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: transparent transparent var(--orange) transparent; }

.next-btn { width:100%; padding:14px; border:none; border-radius:10px; background:var(--green); color:#04120a; font-size:15px; font-weight:700; cursor:pointer; visibility:hidden; }
.next-btn.show { visibility:visible; }

.range { position:relative; flex:1; min-height:230px; margin:0; border-top:1px solid #113d29; border-bottom:1px solid #113d29; background-image:linear-gradient(rgba(57,216,102,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(57,216,102,.06) 1px,transparent 1px),radial-gradient(circle at center,#0b281d,#04110e 70%); background-size:38px 38px,38px 38px,100% 100%; overflow:hidden; }
.rail { position:absolute; top:18px; left:0; right:0; height:45px; background:linear-gradient(#101615,#2b3230 20%,#0b0e0d 45%,#3c4541 52%,#070908 80%,#1c2422); border-top:1px solid #66716b; border-bottom:1px solid #050606; box-shadow:0 4px 12px #000; }
.rail:after { content:""; position:absolute; left:0; right:0; top:24px; border-top:2px dashed #d89023; opacity:.8; }

.moving-unit { position:absolute; top:8px; left:0; width:100px; height:200px; transform-origin:top center; pointer-events:none; transform: translateX(-400px); }
.carriage { position:absolute; top:0; left:12px; width:76px; height:50px; border-radius:8px; background:linear-gradient(#303b39,#111615); border:1px solid #50625d; box-shadow:0 5px 10px #000; }
.arm { position:absolute; top:48px; left:44px; width:12px; height:60px; background:linear-gradient(90deg,#101513,#61716a,#131816); border-radius:4px; box-shadow:0 4px 8px #000; }
.target { position:absolute; top:105px; left:0; width:100px; height:100px; border-radius:50%; background:radial-gradient(circle,#111 0 5px,#ffdf35 6px 12px,#e62727 13px 28px,#1686d8 29px 40px,#111 41px 55px,#fff 56px 65px,#111 66px); box-shadow:0 0 10px rgba(0,0,0,0.5); }
.sight { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; border:2px solid var(--red); border-radius:50%; box-shadow:0 0 10px var(--red); display:block; }
.sight:before { content:""; position:absolute; background:var(--red); left:50%; top:0; transform:translateX(-50%); width:2px; height:100%; }
.sight:after { content:""; position:absolute; background:var(--red); left:0; top:50%; transform:translateY(-50%); width:100%; height:2px; }
.sight-dot { position:absolute; left:50%; top:50%; width:8px; height:8px; background:var(--green); border-radius:50%; transform:translate(-50%, -50%); box-shadow:0 0 10px var(--green); border:1px solid #fff; z-index:5; }

.controls { background:linear-gradient(#082016,#03100d); padding:8px 6px 22px; flex-shrink:0; }
.input-row { display:grid; grid-template-columns:1fr 54px 78px; gap:7px; margin-bottom:8px; padding:0 4px; }
.typedbox { height:58px; border:1px solid #25884b; border-radius:8px; background:#06120e; color:var(--green); display:flex; align-items:center; justify-content:center; font-size:28px; font-weight:600; font-family:monospace; letter-spacing:1px; position:relative; overflow:hidden; white-space:nowrap; padding:0 10px; }
.typedbox span { position:relative; display:inline-block; text-align:center; cursor:pointer; }
.stat{ margin:0 auto; text-align:center;}
.btn-main { border-radius:8px; border:1px solid #2d7444; background:#0d321f; color:var(--green); font-weight:700; cursor:pointer; }
.btn-del-main { font-size:24px; }
.btn-load { background:#2e7d32; color:#fff; border:2px solid #fff; font-size:14px; }
.btn-fire { background:#d8342d; color:#fff; border:2px solid #fff; font-size:14px; }

.kbd { display:flex; flex-direction:column; gap:6px; padding:0 4px; }
.kr { display:flex; justify-content:center; gap:5px; }
.kk {margin: 1px; width:34px; height:36px; border:1px solid #2f7844; border-radius:6px; background:#10351f; color:var(--green); font-size:18px; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.kk:active { background:var(--green); color:#000; }
.kspace { height:38px; width:225px; border:1px solid #2f7844; border-radius:6px; background:#10351f; color:var(--green); font-size:10px; opacity:.65; cursor:pointer; }

.cursor { display:inline-block; width:1.5px; height:24px; background:var(--green); box-shadow:0 0 8px var(--green); animation:blink 1s infinite; vertical-align:middle; margin-left:-5px; margin-right:1px; position:relative; z-index:10; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
@keyframes shake { 0%,100% { transform:translateX(0); } 20% { transform:translateX(-6px); } 40% { transform:translateX(6px); } 60% { transform:translateX(-4px); } 80% { transform:translateX(4px); } }
.shake { animation:shake .32s ease; }

#sr { background:#fff; }
.res-body { display:flex; flex-direction:column; align-items:center; gap:12px; padding:18px; flex:1; overflow-y:auto; }
.r-title { font-size:20px; font-weight:500; color:#222; }
.r-score { font-size:50px; font-weight:500; color:#1a3a5c; line-height:1; }
.rgrid { display:grid; grid-template-columns:1fr 1fr; gap:10px; width:100%; }
.rcard { background:#f5f7fa; border-radius:10px; padding:12px; text-align:center; }
.rcard .v { font-size:22px; font-weight:500; color:#222; }
.rcard .l { font-size:11px; color:#777; }
.rmist { width:100%; border:1px solid #eee; border-radius:10px; padding:10px; }
.slbl { font-size:11px; color:#999; margin-bottom:6px; font-weight:500; }
.mrow { display:grid; grid-template-columns:1fr 1fr 1fr; gap:4px; font-size:12px; padding:6px 2px; border-bottom:1px solid #f0f0f0; color:#222; align-items:center; }
.mrow .mwrong { color:#c00; } .mrow .mright { color:#1a3a5c; font-weight:600; }
.ract { display:flex; flex-direction:column; gap:8px; width:100%; padding:15px; background:#fff; border-top:1px solid #eee; }

/* Auth Box Style */
.auth-component { width:100%; padding:14px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; margin:15px 0; display:flex; flex-direction:column; gap:12px; }
#nav-footer { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 380px; height: 70px; background: #fff; border-radius: 40px; display: none; align-items: center; justify-content: space-around; box-shadow: 0 15px 25px rgba(0,0,0,0.22); z-index: 900; border: 1px solid #f0f0f0; padding: 0 10px; }
.nav-item { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; gap: 4px; }
.nav-item svg { width: 28px; height: 28px; fill: #cbd5e1; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.nav-item.active svg { fill: #3b82f6; transform: translateY(-2px); }
.nav-item.active::after { content: ""; position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); width: 16px; height: 3px; background: #3b82f6; border-radius: 2px; }

/* Dashboard Styles */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; flex: 1; align-content: center; background:transparent; }
.mode-card { aspect-ratio: 1/1; background:#fff; border-radius: 25px; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; cursor: pointer; transition: all 0.2s; box-shadow: 0 10px 15px rgba(0,0,0,0.1); padding: 15px; border: 1px solid #f0f0f0; }
.mode-card:active { transform: scale(0.95); border-color: #3b82f6; box-shadow: 0 0 15px rgba(59,130,246,0.3); }
.mode-icon { font-size: 40px; margin-bottom: 5px; }
.mode-name { color: #1e293b; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; text-align:center; }

/* Leaderboard Styles */
.leaderboard-box { width:100%; border:1px solid #eee; border-radius:12px; overflow:hidden; margin-top:10px; flex:1; display:flex; flex-direction:column; min-height:200px; }
.lb-header { background:#f8fafc; padding:10px; font-size:12px; font-weight:700; color:#64748b; border-bottom:1px solid #eee; text-align:center; }
.lb-list { flex:1; overflow-y:auto; background:#fff; }
.lb-row { display:grid; grid-template-columns:40px 1fr 80px; align-items:center; padding:10px; border-bottom:1px solid #f9fafb; font-size:13px; }
.lb-row.me { background: #fffbeb; border-left: 3px solid #d4af37; }
.lb-rank { font-weight:700; color:#94a3b8; text-align:center; }
.lb-name { font-weight:600; color:#1e293b; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding-right:5px; }
.lb-pts { font-weight:700; color:#1a3a5c; text-align:right; }
.lb-pts small { font-size:9px; color:#94a3b8; margin-left:2px; }

/* Morph Bubbl & Pattern Cards */
#sm { background: #fff; }
#sb { background: #f3f5f8; }
.spc-stage { flex: 1; position: relative; display: flex; align-items: center; padding: 5px 50px; background: #f3f5f8; min-height: 0; }
.card-viewport { width: 100%; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.p-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 18px; box-shadow: 0 2px 14px rgba(20,30,50,0.08); padding: 18px; touch-action: pan-y; width: 100%; flex: 1; display: flex; flex-direction: column; color: #17202a; overflow-y: auto; }
.p-tag-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.p-morph-tag { font-size: 11px; font-weight: 700; color: #2f6fed; text-transform: uppercase; letter-spacing: 0.05em; }
.p-cefr { font-size: 10px; font-weight: 800; color: #1f52c4; background: #eaf0ff; padding: 2px 8px; border-radius: 8px; }
.p-equation { font-size: 18px; font-weight: 700; line-height: 1.2; margin-bottom: 5px; display: flex; flex-wrap: wrap; align-items: baseline; }
.p-base { color: #b7bfc9; }
.p-morph { color: #d98a1a; }
.p-op { color: #8a94a3; font-size: 18px; }
.p-meta-row { display: flex; gap: 6px; align-items: center; font-size: 12px; color: #8a94a3; margin-bottom: 5px; }
.p-pos-chip { border: 1px solid #e8ecf2; padding: 1px 7px; border-radius: 6px; color: #56616f; }
.p-question { color: #d98a1a; font-weight: 700; }
.p-meaning { font-size: 14px; color: #3a4552; margin-bottom: 5px; line-height: 1.4; font-style: italic; }
.p-examples { border-top: 1px solid #e8ecf2; padding-top: 12px; }
.p-examples-label { font-size: 10px; color: #8a94a3; text-transform: uppercase; margin-bottom: 8px; font-weight: 700; }
.p-ex-grid { display: grid; grid-template-columns: 0.6fr 20px 1fr; gap: 8px; align-items: center; }
.p-ex-word .w { font-size: 14px; font-weight: 700; color: #17202a; }
.p-ex-word.is-base .w { color: #7c8794; font-weight: 500; }
.p-ex-word .tr { font-size: 11px; color: #8a94a3; }
.p-ex-arrow { color: #d98a1a; font-size: 12px; text-align: center; }

/* Pattern Sub-Header */
.p-sub-hdr { padding: 0 25px; display: flex; flex-direction: column; }
.psh-top { display: flex; align-items: center; justify-content: space-between; color: #fff; right:0px; width:70px; border:none;}
.psh-title { font-size: 17px; font-weight: 700; }
.psh-pill { background: rgba(255,255,255,0.2); padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.psh-progress { height: 3px; background: rgba(255,255,255,0.25); border-radius: 2px; overflow: hidden; margin-top:10px;}
.psh-fill { height: 100%; background: #fff; width: 0%; transition: width 0.3s; }

.arrow-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: none; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); color: #2f6fed; font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; }
.arrow-btn:active { transform: translateY(-50%) scale(0.9); }
.arrow-btn.left { left: 8px; }
.arrow-btn.right { right: 8px; }
.arrow-btn:disabled { opacity: 0.2; }

.p-setup { padding: 10px 20px 15px; background: #fff; border-top: 1px solid #eee; box-shadow:0 -5px 5px rgba(0, 0, 0, 0.1); }
.p-slider-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.p-start-btn { width: 100%; border: none; background: #1a3a5c; color: #fff; font-size: 15px; font-weight: 600; padding: 14px; border-radius: 12px; cursor: pointer; box-shadow: 0 4px 12px rgba(47,111,237,0.3); }

/* New Bubble Game (sbg) Styles */
#sbg { transition: background 0.25s ease; }
#sbg.flash-green { background: #12351f; }
#sbg.flash-red { background: #3a1414; }
.sbg-sentence-wrap { flex: 1; display: flex; align-items: center; padding: 0 26px; }
.sbg-sentence { font-size: 21px; line-height: 1.55; color: #d7e8de; text-align: center; width: 100%; }
.sbg-sentence .gap { display: inline-block; min-width: 46px; padding: 0 4px; border-bottom: 2px dashed #2f6b4c; color: #6f9a85; }
.sbg-sentence .gap.drop-hover { border-color: #4dffa0; background: rgba(77,255,160,0.08); }
.sbg-sentence .gap.filled { border-bottom: 2px solid #4dffa0; font-weight: 600; color: #4dffa0; }
.sbg-sentence .gap.filled.wrong-fill { border-bottom-color: #ff5c5c; color: #ffb238; }
.sbg-sentence.shake { animation: sbg-shake 0.4s ease; }
@keyframes sbg-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
.sbg-translation { text-align: center; font-size: 13px; color: #6f9a85; padding: 0 26px 15px; min-height: 20px; }
.sbg-tray { padding: 14px 20px 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 60px; background: rgba(0,0,0,0.2); }
.sbg-bubble { touch-action: none; background: #0c2118; border: 1px solid #2f6b4c; color: #ffb238; font-size: 16px; font-weight: 600; padding: 10px 18px; border-radius: 20px; cursor: grab; }
.sbg-bubble.dragging { position: fixed; z-index: 1000; box-shadow: 0 6px 18px rgba(0,0,0,0.4); cursor: grabbing; }
.sbg-bubble.used { visibility: hidden; }
.sbg-bottom { padding: 10px 20px 30px; }
.sbg-next-btn { width: 100%; border: none; background: #1f4a34; color: #6f9a85; font-size: 15px; font-weight: 600; padding: 14px; border-radius: 12px; transition: all 0.2s; }
.sbg-next-btn.active { background: #4dffa0; color: #05130c; cursor: pointer; }
