:root { color-scheme: dark; --panel: #141e2b; --line: #2e4054; --muted: #a4b5c8; --accent: #a5ed73; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.account-panel { padding: 18px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 14px; background: #101b28; }
.account-form { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 10px; align-items: end; }
.account-form > div { min-width: 0; }
.account-form label { display: block; color: var(--muted); font-size: 11px; margin: 0 0 6px; }
.account-stats { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 12px 0; font-size: 13px; }
#account-username, #account-coins { color: var(--accent); }
#account-logout { margin-left: auto; }
#account-xp-bar { display: block; width: 100%; height: 9px; accent-color: var(--accent); border: 0; border-radius: 9px; overflow: hidden; background: #293b50; }
#account-xp-bar::-webkit-progress-bar { background: #293b50; }
#account-xp-bar::-webkit-progress-value { background: var(--accent); }
#account-xp { display: block; color: var(--muted); font-size: 11px; margin-top: 7px; }
#account-message { color: #dce6f3; font-size: 12px; margin: 8px 0 0; min-height: 16px; }
.progress-help { color: var(--muted); font-size: 11px; margin-top: 10px; line-height: 1.6; }
.progress-help summary { cursor: pointer; }
.progress-help p { margin: 8px 0 0; }
#account-hud { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; background: #101822dd; color: var(--accent); border: 1px solid var(--line); border-radius: 18px; padding: 7px 14px; font-size: 12px; pointer-events: none; }
#team-hud { position: fixed; top: 48px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); background: #101822ed; color: #dce6f3; border: 1px solid var(--line); border-radius: 14px; padding: 7px 12px; font-size: 12px; }
#team-name { color: var(--accent); }
#team-leave { background: transparent; color: #dce6f3; border: 1px solid #52677f; border-radius: 7px; padding: 5px 8px; }
.team-help { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 18px; }
.team-help strong { color: #dce6f3; }
.team-help p { margin-top: 8px; }
@media (max-width: 850px) { .account-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .account-form { grid-template-columns: 1fr; } .account-stats { gap: 9px; } }
body { font-family: "Segoe UI", system-ui, sans-serif; color: #eef4fc; background: #101822; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
#overlays { overflow: auto; padding: 32px 20px; background: rgba(7, 13, 21, .76); backdrop-filter: blur(10px); }
#helloDialog { position: relative; inset: auto; transform: none; width: min(920px, 100%); margin: max(0px, calc((100vh - 810px) / 2)) auto 0; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: 0 24px 100px #0008; }
.arena-header { display: flex; align-items: center; gap: 16px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 700; color: var(--muted); }
#title { margin: 0; padding: 0; font-size: 40px; letter-spacing: -2px; font-weight: 800; line-height: 1.1; }
#title span { color: var(--accent); }
.arena-mark { position: relative; width: 48px; height: 48px; }
.arena-mark i { position: absolute; display: block; border-radius: 50%; background: var(--accent); width: 32px; height: 32px; bottom: 0; }
.arena-mark i:nth-child(2) { width: 17px; height: 17px; right: 0; top: 0; background: #72d4d9; }
.arena-mark i:nth-child(3) { width: 10px; height: 10px; right: 0; bottom: 1px; background: #c0a1f3; }
.mode-badge { margin-left: auto; color: var(--accent); border: 1px solid #465e40; border-radius: 20px; padding: 6px 12px; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.arena-intro { margin: 14px 0 26px; font-size: 15px; color: var(--muted); }
.arena-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; }
.join-panel { padding-right: 28px; border-right: 1px solid var(--line); }
#helloDialog h2 { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 650; }
.section-copy { color: var(--muted); font-size: 12px; margin: 6px 0 20px; }
.field-label { display: block; font-size: 12px; color: #d3dfed; margin: 16px 0 7px; font-weight: 600; }
#helloDialog .form-control { display: block; width: 100%; float: none; height: 44px; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: #eef4fc; background: #0f1823; box-shadow: none; font-size: 13px; }
#helloDialog .form-control::placeholder { color: #92a4ba; }
#helloDialog .form-control:focus { border-color: var(--accent); }
#helloDialog .btn { border-radius: 10px; border: 1px solid transparent; padding: 12px; min-height: 44px; font-size: 13px; font-weight: 650; transition: background .15s; }
#helloDialog .secondary { color: #d3dfed; background: #202e40; border-color: var(--line); }
#helloDialog .secondary:hover { background: #2b3e53; }
#gallery-btn { margin: 9px 0 0; text-align: left; }
#gallery-btn span, #play-btn span { float: right; }
.play-actions { display: grid; gap: 8px; margin-top: 24px; }
#play-btn { width: 100%; margin: 0; background: var(--accent); color: #172614; }
#play-btn:hover { background: #b9fa8b; }
#spectate-btn { width: 100%; float: none; }
#instructions { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; }
#instructions > div { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; font-size: 11px; color: var(--muted); }
kbd { font: 11px "Segoe UI", sans-serif; border: 1px solid #40536b; border-radius: 5px; background: #202e40; color: #edf5ff; padding: 3px 6px; box-shadow: 0 2px #0b121d; white-space: nowrap; }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.text-button { color: var(--accent); background: none; border: 0; padding: 8px 0 8px 8px; font-size: 11px; }
.text-button:hover { text-decoration: underline; }
#settings { margin: 0; }
#settings fieldset { border: 0; padding: 0; margin: 0 0 17px; min-width: 0; }
#settings legend { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 7px; padding: 0 0 6px; border: 0; width: 100%; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#settings .setting { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 10px; min-height: 43px; border: 1px solid #293b50; border-radius: 9px; background: #192638; cursor: pointer; font-size: 11px; font-weight: 400; color: #dce6f3; }
#settings .setting:hover { border-color: #65815b; background: #223348; }
#settings .setting:has(input:checked) { border-color: #41543e; background: #202f2b; }
#settings .setting input { appearance: none; position: relative; flex: 0 0 28px; width: 28px; height: 16px; margin: 0; border-radius: 20px; border: 1px solid #71829b; background: #334256; cursor: pointer; }
#settings .setting input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #c2cede; transition: transform .15s; }
#settings .setting input:checked { background: var(--accent); border-color: var(--accent); }
#settings .setting input:checked::after { transform: translateX(12px); background: #23361c; }
.volume-control { align-self: center; padding: 0 8px; }
.volume-control label { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); font-weight: 400; }
#volume-value { display: inline; padding: 0; color: inherit; font-size: inherit; }
#soundsVolume { display: block; width: 100%; height: 17px; accent-color: var(--accent); }
#soundsVolume:disabled { opacity: .35; }
#settings-status { color: var(--muted); margin: 0; font-size: 10px; min-height: 15px; }
#footer { display: flex; justify-content: space-between; gap: 12px; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; font-size: 10px; color: var(--muted); }
#footer span:last-child { font-size: 9px; letter-spacing: 1.5px; }
#chat_textbox { max-width: calc(100vw - 20px); border: 1px solid #40536b; border-radius: 9px; height: 36px; background: #101822cc; font-family: inherit; }
#connecting-content { width: min(420px, calc(100% - 32px)); background: var(--panel); color: #eef4fc; border: 1px solid var(--line); padding: 24px; }
#connecting-content h2 { font-size: 20px; }
#connecting-content p { color: var(--muted); }
#gallery-content { background: var(--panel); border: 1px solid var(--line); max-width: min(1000px, 94%); }
#gallery-header { background: #202e40; font-size: 20px; padding: 14px; }
.gallery-close { float: right; border: 0; background: transparent; color: white; font-size: 26px; line-height: 24px; padding: 0 6px; }
#gallery-content a { color: var(--accent); }
.skinName { font-size: 11px; max-width: 150px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
    #overlays { padding: 12px; }
    #helloDialog { padding: 22px; border-radius: 18px; margin: 0 auto; }
    .arena-layout { grid-template-columns: 1fr; gap: 26px; }
    .join-panel { padding: 0 0 24px; border-right: 0; border-bottom: 1px solid var(--line); }
    .play-actions { grid-template-columns: 1fr 1fr; }
    #instructions { display: none; }
    #footer { flex-direction: column; }
}
@media (max-width: 380px) { .settings-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::after { transition: none !important; } }
