@charset "UTF-8";
/* FlappyVerse — giao diện. Font và giấy phép nằm trong assets.js. */
:root {
  --title-font:"Flappy Minecraft",Arial,sans-serif;
  --game-font:"Comic Lettering",Arial,"Segoe UI Symbol","Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
  --bg:#0b0b12;--fg:#f0f0f0;color-scheme:dark;
}
* {box-sizing:border-box}
html,body {margin:0;background:var(--bg);color:var(--fg);font-family:var(--game-font);-webkit-user-select:none;user-select:none;touch-action:manipulation}
body {
  min-height:100vh;min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
}
h1 {margin:0;font:400 clamp(12px,3.3vw,18px)/1.6 var(--title-font);color:#fbb025;letter-spacing:1px;text-align:center;text-shadow:2px 2px #000}
.game-stage {
  --hud-fill:#294923;--hud-accent:#b8e970;
  position:relative;flex:none;border-radius:10px;
  width:min(calc(100vw - 24px),calc((100vh - 68px) * .6));
  width:min(calc(100vw - 24px),calc((100svh - 68px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * .6));
}
#g {display:block;width:100%;height:auto;aspect-ratio:3/5;border-radius:inherit;touch-action:none;image-rendering:pixelated}
p {font-size:12px;opacity:.8;margin:6px;text-align:center;max-width:94vw}
button,input,output {font-family:var(--game-font);font-weight:700;line-height:1.45}
button {background:#192232;color:#fff;border:1px solid #52627d;border-radius:8px;padding:6px 10px;cursor:pointer;font-size:13px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .15s,border-color .15s,transform .1s}
button:hover:not(:disabled) {background:#293a54;border-color:#fbb025}
button:focus-visible,input:focus-visible {outline:3px solid #ffe08a;outline-offset:3px}
button:disabled {cursor:default}
[hidden] {display:none!important}
.hud-button {position:absolute;z-index:5;width:46px;min-height:46px;padding:0;margin:0;display:grid;place-items:center;border:2px solid var(--hud-accent);border-radius:7px;background:var(--hud-fill);color:var(--hud-accent);box-shadow:0 3px 0 #0008;transition:background-color .6s,border-color .6s,color .6s}
.hud-button:hover:not(:disabled) {background:var(--hud-fill);border-color:currentColor}
.hud-button:active:not(:disabled) {transform:translateY(2px);box-shadow:0 1px 0 #0008}
#pauseHud {top:8px;left:8px;width:30px;min-height:30px;border-radius:5px;box-shadow:0 2px 0 #0008}
.pause-glyph {display:flex;align-items:center;justify-content:center;gap:3px;width:13px;height:14px}
.pause-glyph::before,.pause-glyph::after {content:"";display:block;width:3.5px;height:12px;background:currentColor}
#pauseHud[aria-pressed=true] .pause-glyph::before {width:0;height:0;margin-left:2px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:10px solid currentColor;background:transparent}
#pauseHud[aria-pressed=true] .pause-glyph::after {display:none}
.rage-button {right:8px;bottom:9%;width:54px;min-height:54px;gap:0;padding:3px;font-size:23px;color:#ffe0a0;background:#4c251d;border-color:#ffa54e}
.rage-button:disabled {opacity:.6}
.rage-button[data-ready=true] {box-shadow:0 3px 0 #0008,0 0 12px #ff7b354d}
.hud-label {font-size:11px;line-height:1.2}
.game-modal {position:fixed;inset:0;z-index:10;background:rgba(3,8,18,.86);backdrop-filter:blur(4px);display:grid;place-items:center;padding:16px}
.modal-card {width:min(480px,100%);max-height:88vh;max-height:88svh;overflow:auto;overscroll-behavior:contain;background:linear-gradient(180deg,#132138 0%,#0d1728 100%);border:2px solid #e7bc59;border-radius:16px;padding:20px;box-shadow:0 20px 70px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,230,160,.16);font:700 14px/1.6 var(--game-font)}
.modal-card h2 {margin:0 0 12px;color:#ffe2a0}
.modal-card p {max-width:none;text-align:left;font:inherit;opacity:1}
.modal-card label {display:flex;align-items:center;gap:10px;margin:8px 0;min-height:42px}
.modal-card button {min-height:42px;padding:9px 14px;font-size:14px;margin-top:6px}
.modal-card .note {font-size:12px;color:#9db4cd;line-height:1.45}
.modal-card ul {padding-left:20px}
.modal-card li {margin:9px 0}

/* Redesigned Settings Panel */
.settings-card {width:min(500px,100%);padding:20px;display:flex;flex-direction:column;gap:12px;scrollbar-color:#536883 #101c30}
.settings-header {display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #2c405e;padding-bottom:12px}
.settings-header>div:first-child {min-width:0;flex:1}
.settings-eyebrow {font-size:10px!important;letter-spacing:1.4px;color:#8aa4c5;margin:0!important}
.settings-header h2 {margin:2px 0 0;font-size:23px;color:#ffe4a3;letter-spacing:.3px}
.settings-close {flex:none;min-width:40px;min-height:40px!important;margin:0!important;padding:0!important;font-size:24px;line-height:1;border-radius:10px;background:#182840;border-color:#445b7d;color:#d6e4f5}
.settings-close:hover:not(:disabled) {background:#263c5e;border-color:#fbb025;color:#fff}

.settings-section {background:rgba(21,36,58,.78);border:1px solid #304766;border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:4px}
.settings-section-head {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px;padding-bottom:8px;border-bottom:1px solid rgba(114,148,194,.18)}
.settings-section-title {font-size:13px;letter-spacing:.4px;color:#8ef2ff;text-transform:uppercase}

.mute-pill {min-height:32px!important;margin:0!important;padding:4px 11px!important;font-size:12px!important;border-radius:999px;display:inline-flex;align-items:center;gap:6px;background:#1f4844;border-color:#68d6c1;color:#d2fff5}
.mute-pill[aria-pressed=false] {background:#4a232b;border-color:#e06c75;color:#ffd4d8}
.mute-pill:hover:not(:disabled) {filter:brightness(1.12)}

.setting-slider {display:grid!important;grid-template-columns:minmax(115px,1.15fr) 1.35fr 46px;align-items:center;gap:10px;margin:2px 0!important;min-height:38px!important}
.slider-name {font-size:13px;color:#e3edf9}
.setting-slider input[type=range] {-webkit-appearance:none;appearance:none;width:100%;height:7px;border-radius:999px;background:#0a1322;border:1px solid #385173;outline:none;cursor:pointer;min-height:7px!important}
.setting-slider input[type=range]::-webkit-slider-thumb {-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:linear-gradient(180deg,#ffe49c,#f2a930);border:2px solid #132138;box-shadow:0 0 8px rgba(251,176,37,.45);cursor:pointer;transition:transform .12s}
.setting-slider input[type=range]::-webkit-slider-thumb:hover {transform:scale(1.12)}
.setting-slider input[type=range]::-moz-range-thumb {width:18px;height:18px;border-radius:50%;background:linear-gradient(180deg,#ffe49c,#f2a930);border:2px solid #132138;box-shadow:0 0 8px rgba(251,176,37,.45);cursor:pointer}
.slider-val {width:46px;text-align:center;font-size:12px;color:#ffe29b;background:#0c1729;border:1px solid #354c6b;border-radius:6px;padding:2px 4px}

.setting-toggle {display:flex!important;align-items:center;justify-content:space-between;gap:12px;margin:0!important;padding:7px 8px;min-height:40px!important;border-radius:9px;cursor:pointer;transition:background-color .15s}
.setting-toggle:hover {background:rgba(98,150,214,.1)}
.toggle-text {font-size:13px;color:#dde9f7;line-height:1.35;flex:1}
.toggle-switch {position:relative;width:44px;height:24px;flex:none;display:inline-block}
.toggle-switch input {position:absolute;inset:0;opacity:0;margin:0;cursor:pointer;width:100%;height:100%}
.toggle-track {position:absolute;inset:0;border-radius:999px;background:#0c1626;border:1px solid #496082;transition:background-color .18s,border-color .18s}
.toggle-track::after {content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#99aec9;transition:transform .18s,background-color .18s;box-shadow:0 1px 3px rgba(0,0,0,.45)}
.toggle-switch input:checked + .toggle-track {background:#1e6268;border-color:#6de6d5}
.toggle-switch input:checked + .toggle-track::after {transform:translateX(20px);background:#e7fffb}
.toggle-switch input:focus-visible + .toggle-track {outline:2px solid #ffe08a;outline-offset:2px}

.shortcut-chips {display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
.shortcut-chip {display:inline-flex;align-items:center;gap:4px;font-size:11px;color:#d6e7fa;background:#0f1d31;border:1px solid #354c6b;border-radius:6px;padding:3px 6px}
.shortcut-chip kbd {font:700 10px/1.2 var(--game-font);color:#ffe29b;background:#08101d;border:1px solid #4e6688;border-radius:4px;padding:1px 5px}
.help-device-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
.help-device-box {background:#122036;border:1px solid #3b5578;border-radius:10px;padding:9px 11px;display:flex;flex-direction:column;gap:5px}
.help-device-head {font-size:12.5px;color:#8ef2ff;display:flex;align-items:center;gap:6px}
.help-note-bar {font-size:11.5px!important;color:#a5bdd6;background:rgba(12,22,38,.75);border-left:3px solid #e7bc59;border-radius:8px;padding:7px 10px;margin:0 0 10px!important;line-height:1.45}
.help-footer {display:flex;gap:8px;align-items:stretch;margin-top:8px}
.help-footer button {margin:0!important;flex:1}
.help-replay-btn {background:#1c334d;border-color:#6bc9d8;color:#d8f8ff;font-size:13px!important}
.help-replay-btn:hover:not(:disabled) {background:#264669;border-color:#9af0ff}

/* Interactive Onboarding Overlay (PC + Mobile) */
.onboard-overlay {position:absolute;inset:0;z-index:7;pointer-events:none;display:flex;flex-direction:column;justify-content:flex-end;padding:10px}
.onboard-card {pointer-events:auto;background:rgba(12,22,38,.92);border:2px solid #e7bc59;border-radius:12px;padding:11px 12px;box-shadow:0 10px 30px rgba(0,0,0,.72);display:flex;flex-direction:column;gap:6px;backdrop-filter:blur(3px)}
.onboard-top {display:flex;align-items:center;justify-content:space-between;gap:8px}
.onboard-dots {display:flex;gap:5px}
.onboard-dots span {width:18px;height:5px;border-radius:999px;background:#2e425e;transition:background-color .2s}
.onboard-dots span.done {background:#6de6d5}
.onboard-dots span.active {background:#ffd54f;box-shadow:0 0 8px rgba(255,213,79,.5)}
.onboard-skip {min-height:24px!important;padding:2px 8px!important;font-size:11px!important;background:#192840;border-color:#445c7d;color:#bdd1e8;border-radius:6px}
.onboard-title {margin:0;font-size:13.5px;color:#ffe29b;line-height:1.3}
.onboard-desc {margin:0!important;font-size:11.5px!important;color:#d3e4f7;text-align:left!important;opacity:1!important;line-height:1.4}
.onboard-controls {display:flex;flex-direction:column;gap:4px}
.onboard-row {display:flex;align-items:center;gap:6px;font-size:11px;color:#e6f2ff;background:#162740;border:1px solid #354f73;border-radius:7px;padding:5px 8px;line-height:1.35}
.onboard-row strong {color:#8ef2ff;flex:none}
.onboard-progress {font-size:11.5px;color:#7ef0d6;font-weight:700;text-align:center;min-height:16px}
.onboard-start {margin:2px 0 0!important;min-height:38px!important;width:100%;font-size:13px!important;background:linear-gradient(180deg,#d7a23b,#a8741a);border:1px solid #ffe08a;color:#140e04;border-radius:8px}

.settings-footer {display:flex;flex-direction:column;gap:8px;padding-top:4px}
.settings-utils {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.settings-utils button {margin:0!important;min-height:40px!important;padding:7px 8px!important;font-size:12.5px!important;background:#17273f;border-color:#42597a;color:#dce9f8;white-space:nowrap}
.settings-utils button:hover:not(:disabled) {background:#23395a;border-color:#82e3d8;color:#fff}
.settings-primary {margin:0!important;width:100%;min-height:44px!important;font-size:15px!important;background:linear-gradient(180deg,#d7a23b,#a8741a);border:1px solid #ffe08a;color:#140e04;box-shadow:0 3px 12px rgba(215,162,59,.25)}
.settings-primary:hover:not(:disabled) {background:linear-gradient(180deg,#e7b54f,#be8624);border-color:#fff1ba}

/* Visual Help Guide Cards */
.help-card-modal {width:min(580px,100%);padding:18px}
.help-lead {font-size:13px!important;color:#d6e6f8;margin:0 0 10px!important}
.help-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:10px}
.help-box {background:#16263d;border:1px solid #3c5273;border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.help-box-head {display:flex;align-items:center;gap:8px;font-size:13.5px;color:#ffe194}
.help-badge {width:28px;height:28px;border-radius:7px;display:grid;place-items:center;font-size:16px;flex:none;background:#0d1829;border:1px solid #597399}
.help-box p {margin:0!important;font-size:12px!important;line-height:1.45;color:#c7d9ee}
.help-items-bar {background:#142236;border:1px solid #384d6b;border-radius:10px;padding:10px 12px;margin-bottom:8px}
.help-items-title {font-size:12.5px;color:#8ef6ff;margin:0 0 8px!important}
.help-chips {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}
.help-chip {display:flex;align-items:center;gap:7px;font-size:11.5px;line-height:1.35;color:#dbe9f8}
.help-chip-ico {width:24px;height:24px;border-radius:6px;background:#0c1626;border:1px solid #4d678c;display:grid;place-items:center;flex:none;font-size:13px}

#comicIntro {position:absolute;inset:0;z-index:6;overflow:hidden;border-radius:inherit;touch-action:manipulation}
#comicFrame {position:absolute;inset:0;width:100%;height:100%;border-radius:0;aspect-ratio:auto;image-rendering:auto}
#skipComic {position:absolute;right:3.2%;bottom:1.8%;margin:0;padding:4px 12px;min-height:36px;border:2px solid #211b1d;border-radius:6px;background:#f8e9c3;color:#211b1d;box-shadow:2px 2px #211b1d;font:700 clamp(11px,1.6vh,13px)/1.35 var(--game-font)}
#skipComic:hover {background:#ffcf7d;border-color:#211b1d}
#skipComic:focus-visible {outline:2px solid #fef2ce;outline-offset:3px}
.comic-preference {position:absolute;bottom:1.8%;left:3.2%;max-width:calc(100% - 110px);display:flex;align-items:center;gap:6px;min-height:36px;padding:4px 9px;background:#101c30eb;border:1px solid #c6d1e7;border-radius:6px;color:#fff;font:700 11px/1.3 var(--game-font);cursor:pointer}
.comic-preference input {width:18px;height:18px;margin:0;accent-color:#80e2ce;flex:none}
.comic-cue {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media (max-height:500px) and (orientation:landscape) {
  body {flex-direction:row;gap:14px;padding:10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left))}
  h1 {display:none}
  .game-stage {width:min(calc(100vw - 24px),calc((100vh - 20px) * .6));width:min(calc(100vw - 24px),calc((100svh - 20px) * .6))}
}
@media (prefers-reduced-motion:reduce) {.hud-button,.toggle-track,.toggle-track::after,button {transition:none}}

/* Shop: readable cards, fixed-size previews, large touch targets, 5 tabs evenly aligned on a single row. */
.shop-card {width:min(740px,100%);padding:20px;scrollbar-color:#536883 #101c30}
.shop-header {display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #35445a;padding-bottom:14px}
.shop-header>div:first-child {min-width:0;flex:1}
.shop-header .shop-close {flex:none;min-width:44px;min-height:44px;margin:0;padding:0;font-size:25px}
.shop-header h2 {margin:2px 0 0;font-size:24px}
.shop-header .shop-eyebrow {font-size:10px;letter-spacing:1.4px;color:#90a7c5;margin:0}
.shop-wallet {flex:none;display:grid;grid-template-columns:auto auto;align-items:center;gap:0 7px;border:1px solid #d09b35;background:#302617;padding:7px 13px;border-radius:10px;color:#ffe19a;min-width:85px;text-align:right}
.shop-wallet>span:first-child {font-size:22px;grid-row:1/3;color:#ffc947}
.shop-wallet strong {font-size:20px;line-height:1.2}
.shop-wallet>span:last-child {font-size:10px}
.shop-loadout {border-left:3px solid #66d9cc;padding:7px 10px;background:#16263a;font-size:12px!important;color:#d5e7f5;min-height:34px}
.shop-tabs {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:12px 0 4px}
.shop-tabs button {width:100%;min-height:42px;margin:0;padding:6px 4px;font-size:clamp(11px,2.5vw,13px);white-space:nowrap;text-align:center}
.shop-tabs button[aria-pressed=true] {background:#2d4f66;border-color:#77e1d4;color:#c0fff3}
.shop-notice {min-height:22px;margin:6px 0!important;font-size:12px!important;color:#ffe09b}
.shop-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.shop-item {display:flex;flex-direction:column;gap:7px;padding:13px;background:#162438;border:1px solid #3c4c66;border-radius:12px;min-width:0}
.shop-item[data-equipped=true] {border-color:#6edac5;box-shadow:inset 0 0 0 1px #6edac526}
.shop-item-top {display:flex;align-items:center;gap:10px}
.shop-item h3 {margin:0;font-size:15px;line-height:1.35;color:#f2f6ff}
.shop-item .shop-world {font-size:10px!important;color:#9db8d8;margin:2px 0 0}
.shop-preview {display:block;flex:none;width:76px;height:62px;border-radius:8px;background:radial-gradient(ellipse at center,#344b67,#0b1829);image-rendering:pixelated}
.shop-item .shop-description {font-size:12px!important;line-height:1.45;color:#bfd0e5;margin:0;flex:1}
.shop-perk-box {background:rgba(12,24,42,.85);border:1px solid #3c587c;border-left:3px solid #f5c352;border-radius:8px;padding:7px 9px;display:flex;flex-direction:column;gap:3px}
.shop-perk-box[data-none=true] {border-left-color:#536a87;opacity:.85}
.shop-perk-tag {font-size:10px!important;letter-spacing:.7px;text-transform:uppercase;color:#ffd978;margin:0!important;line-height:1.2}
.shop-perk-box[data-none=true] .shop-perk-tag {color:#8ea6c2}
.shop-perk-text {font-size:12px!important;line-height:1.4;color:#eef5ff;margin:0!important}
.shop-effects-box {font-size:11.5px!important;line-height:1.42;color:#a9c4e0;margin:0!important;padding:2px 2px 0}
.shop-effects-tag {color:#7ce8e0;font-weight:700}
.shop-item label {font-size:11px;display:block;min-height:0;margin:0;color:#9db8d8}
.shop-item select {width:100%;min-height:42px;margin-top:4px;padding:6px;border:1px solid #607594;border-radius:6px;background:#0c1728;color:#fff;font:700 12px var(--game-font)}
.shop-actions {display:flex;gap:7px;align-items:stretch;margin-top:auto;padding-top:2px}
.shop-actions button {flex:1;min-height:42px;margin:0;padding:8px;font-size:12px}
.shop-actions button:disabled {opacity:.48}
.shop-actions .shop-buy {background:#69501d;border-color:#d7ad51;color:#fff0c0}
.shop-actions .shop-equip {background:#224c49;border-color:#76c5b4}
.shop-price {font-size:12px;color:#ffd880;margin:0!important}
.shop-trail-preview {display:block;width:100%;height:auto;max-height:138px;object-fit:contain;background:#102338;border-radius:8px;image-rendering:pixelated}
.mission-progress {width:100%;height:9px;border:0;border-radius:8px;overflow:hidden;background:#0a1626;accent-color:#7adfc8}
.mission-progress::-webkit-progress-bar {background:#0a1626}
.mission-progress::-webkit-progress-value {background:#7adfc8}
.mission-progress::-moz-progress-bar {background:#7adfc8}
.mission-count {display:flex;justify-content:space-between;gap:8px;font-size:12px!important;color:#a9c8df;margin:0!important}
.shop-item[data-ready=true] {border-color:#e1b761}
.shop-tabs button[data-ready=true] {box-shadow:inset 0 -3px #f9d37b;color:#ffdf99}
.shop-footer {border-top:1px solid #35445a;margin-top:16px;padding-top:9px;display:flex;align-items:center;gap:12px}
.shop-footer p {flex:1;margin:0}
.shop-footer button {flex:none;margin:0}
@media (max-width:520px) {
  .shop-card,.settings-card {padding:14px}
  .shop-tabs {grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
  .shop-tabs button {padding:6px 2px;font-size:11px}
  .shop-grid,.help-grid,.help-chips,.help-device-grid {grid-template-columns:1fr}
  .help-footer {flex-direction:column}
  .shop-header h2,.settings-header h2 {font-size:21px}
  .shop-header .shop-eyebrow,.settings-eyebrow {font-size:8px;letter-spacing:.8px}
  .shop-footer {align-items:flex-end}
  .setting-slider {grid-template-columns:1fr 44px;row-gap:4px}
  .setting-slider .slider-name {grid-column:1/3}
  .settings-utils {grid-template-columns:1fr}
}
