/* STREAMING_CHUNK:Defining design tokens and root variables... */
:root {
--bg: #0b0f0e;
--panel: #16221f;
--line: #223832;
--text: #f0fdf4;
--text-dim: #94a3b8;
--gold: #fde047;
--emerald: #10b981;
--btn-bg: #10b981;
--btn-text: #0b0f0e;
--btn-hover: #34d399;
--radius: 14px;
}

{ box-sizing: border-box; }

html, body {
height: 100%;
width: 100%;
margin: 0;
background-color: var(--bg);
color: var(--text);
font-family: 'Google Sans', 'Roboto', system-ui, sans-serif;
overflow-x: hidden;
}

body {
display: flex;
flex-direction: column;
align-items: center;
}

/* STREAMING_CHUNK:Styling layout wrappers... */
.main-wrapper {
width: 100%;
max-width: 960px;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding: 16px;
gap: 20px;
}

.game-container {
width: 100%;
display: grid;
grid-template-columns: minmax(0, 1fr) 300px;
gap: 20px;
align-items: start;
}

@media (max-width: 880px) {
.game-container {
grid-template-columns: 1fr;
max-width: 600px;
justify-items: center;
}
.side-panel { display: none; }
}

/* STREAMING_CHUNK:Styling game viewport and canvas card... */
.viewport-card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 16px;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
max-width: 600px;
box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
}

.top-bar {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
margin-bottom: 12px;
background: var(--bg);
border-radius: 8px;
border: 1px solid var(--line);
}

.score-wrap {
display: flex;
align-items: center;
gap: 16px;
}

.score-pill {
display: flex;
align-items: center;
gap: 8px;
font-size: 22px;
font-weight: 700;
font-family: 'Roboto', sans-serif;
}
.score-pill span.icon { font-size: 20px; }

.controls-wrap {
display: flex;
gap: 8px;
}

.icon-btn {
background: transparent;
border: 1px solid var(--line);
color: var(--text);
width: 38px;
height: 38px;
border-radius: 50%;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s, transform 0.1s, border-color 0.2s;
}
.icon-btn:hover { background: rgba(16, 185, 129, 0.15); border-color: var(--emerald); }
.icon-btn:active { transform: scale(0.92); }

.stage-frame {
position: relative;
border-radius: 10px;
overflow: hidden;
background: #000;
width: 100%;
aspect-ratio: 1 / 1;
box-shadow: inset 0 0 25px rgba(0,0,0,0.9);
touch-action: none;
}
canvas { display: block; width: 100%; height: 100%; }

/* STREAMING_CHUNK:Styling HUD overlays and notifications... */
.hud-extra {
position: absolute;
top: 12px;
left: 12px;
right: 12px;
display: flex;
justify-content: center;
pointer-events: none;
z-index: 5;
}
.combo-wrap {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
opacity: 0;
transform: translateY(-10px);
transition: opacity 0.2s ease, transform 0.2s ease;
background: rgba(11, 15, 14, 0.85);
padding: 6px 14px;
border-radius: 20px;
backdrop-filter: blur(4px);
border: 1px solid rgba(16, 185, 129, 0.4);
}
.combo-wrap.show { opacity: 1; transform: translateY(0); }
.combo-label { font-size: 11px; color: var(--emerald); letter-spacing: 1px; font-weight: 700; font-family: 'Roboto', sans-serif;}
.combo-bar { width: 100px; height: 5px; border-radius: 3px; background: rgba(16, 185, 129, 0.2); overflow: hidden; }
.combo-fill { height: 100%; width: 20%; background: linear-gradient(90deg, var(--emerald), var(--gold)); transition: width 0.2s ease; }

.toast {
position: absolute; top: 16px; left: 50%; transform: translate(-50%, -10px);
background: var(--panel); border: 1px solid var(--emerald);
padding: 8px 16px; border-radius: 24px; font-size: 13px; font-weight: 500;
opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease;
pointer-events: none; white-space: nowrap; z-index: 10;
box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
color: var(--text);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.overlay {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
background: rgba(11, 15, 14, 0.92);
backdrop-filter: blur(6px);
text-align: center;
padding: 24px;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease;
z-index: 15;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.overlay h1, .overlay h2 { font-size: 28px; margin: 0; font-weight: 700; color: var(--text); }
.overlay p { color: var(--text-dim); font-size: 14px; max-width: 320px; line-height: 1.5; margin: 0; }
.score-big { font-size: 44px; font-weight: 700; color: var(--emerald); font-family: 'Roboto', monospace; }
.badge { font-family: 'Roboto', monospace; font-size: 12px; color: #0b0f0e; background: var(--gold); padding: 4px 10px; border-radius: 20px; font-weight: 700; }

.btn {
font-family: 'Google Sans', sans-serif; font-weight: 500; font-size: 15px;
padding: 10px 24px; border-radius: 24px; border: none; cursor: pointer;
transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3); }
.btn-primary:hover { background: var(--btn-hover); box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--emerald); }
.btn-row { display: flex; gap: 12px; margin-top: 10px; }

/* STREAMING_CHUNK:Styling sidebar info and settings drawer... */
.side-panel { display: flex; flex-direction: column; gap: 14px; width: 300px; }
.info-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.info-card h2 { margin: 0 0 12px; font-size: 14px; font-weight: 500; text-transform: uppercase; color: var(--emerald); letter-spacing: 0.5px; }
.mod-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.mod-row:last-child { border-bottom: none; }
.mod-row span.val { color: var(--emerald); font-weight: 500; }

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.7); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 40; }
.scrim.show { opacity: 1; pointer-events: auto; }

.drawer {
position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 92vw);
background: var(--bg); border-left: 1px solid var(--line);
z-index: 41; transform: translateX(100%);
transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
overflow-y: auto; padding: 24px 24px 60px;
}
.drawer.show { transform: translateX(0); }

.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.drawer-head h2 { font-size: 20px; margin: 0; font-weight: 500; color: var(--emerald); }
.close-x { background: none; border: none; color: var(--text-dim); font-size: 24px; cursor: pointer; }
.close-x:hover { color: var(--text); }

.section-title { font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--text-dim); margin: 20px 0 10px; }
.section-title:first-of-type { margin-top: 0; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
flex: 1 1 auto; text-align: center; border: 1px solid var(--line); border-radius: 6px; padding: 8px;
font-size: 12px; cursor: pointer; background: transparent; color: var(--text-dim);
transition: all 0.15s ease; font-weight: 500;
}
.seg-btn.active { border-color: var(--emerald); color: var(--emerald); background: rgba(16, 185, 129, 0.1); }
.seg-btn:hover { color: var(--text); border-color: rgba(16, 185, 129, 0.5); }

.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.theme-chip {
border: 1px solid var(--line); border-radius: 6px; padding: 10px;
cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500;
transition: all 0.15s ease; background: rgba(255,255,255,0.02);
}
.theme-chip .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.3); }
.theme-chip.active { border-color: var(--emerald); background: rgba(16, 185, 129, 0.1); color: var(--emerald); }

input[type=range] { width: 100%; accent-color: var(--emerald); cursor: pointer; margin: 10px 0; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.switch { position: relative; width: 42px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-tog { position: absolute; cursor: pointer; inset: 0; background: var(--line); border-radius: 22px; transition: .2s; }
.slider-tog:before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
input:checked + .slider-tog { background: var(--emerald); }
input:checked + .slider-tog:before { transform: translateX(20px); }

.dpad {
display: none; grid-template-columns: repeat(3, 50px); grid-template-rows: repeat(3, 50px);
gap: 6px; justify-content: center; margin-top: 16px;
}
.dpad button { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-size: 20px; cursor: pointer; }
.dpad button:active { background: rgba(16, 185, 129, 0.2); }
@media (pointer: coarse) { .dpad { display: grid; } }

/* STREAMING_CHUNK:Styling SEO article and FAQ section... */
.seo-section {
width: 100%;
max-width: 960px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 32px;
margin-top: 20px;
line-height: 1.7;
color: var(--text-dim);
}
.seo-section h2 { font-size: 22px; color: var(--text); margin-top: 0; margin-bottom: 16px; font-weight: 700; }
.seo-section h3 { font-size: 18px; color: var(--emerald); margin-top: 24px; margin-bottom: 12px; font-weight: 600; }
.seo-section p { margin-bottom: 16px; font-size: 14px; }
.seo-section ul { margin: 0 0 16px 20px; padding: 0; font-size: 14px; }
.seo-section li { margin-bottom: 8px; }
.faq-grid { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.faq-item { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.faq-item h4 { margin: 0 0 8px 0; color: var(--text); font-size: 15px; }
.faq-item p { margin: 0; font-size: 13px; }