:root { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #143b36; }
* { box-sizing: border-box; }
body { background: #f4f8f5; font-family: inherit; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
button { transition: background .15s, transform .15s; }
button:hover { filter: brightness(.95); }
button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #32bb8e; outline-offset: 3px; }
#overlays { background: rgba(228, 238, 232, .64); backdrop-filter: blur(7px); }
#menu-layout { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; width: min(900px, calc(100% - 32px)); max-height: calc(100dvh - 32px); }
#helloDialog, #servers-panel { min-width: 0; min-height: 0; padding: 30px; border-radius: 26px; background: #fffefa; box-shadow: 0 22px 90px #123d3624; border: 1px solid #fff; max-height: calc(100dvh - 32px); overflow-y: auto; }
#helloDialog { position: static; transform: none; width: auto; margin: 0; }
#servers-panel h2 { margin: 0 0 24px; font-size: 24px; letter-spacing: -.6px; }
#server-list { display: grid; gap: 10px; }
.server-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px; text-align: left; background: #f5f7f2; border: 1px solid #dde5dd; border-radius: 13px; color: #143b36; }
.server-row[aria-pressed="true"] { background: #edf7ee; border-color: #84b99d; box-shadow: inset 3px 0 #32bb8e; }
.server-row:disabled { opacity: .55; cursor: default; }
.server-row strong { display: block; font-size: 14px; font-weight: 650; }
.server-row small { display: block; margin-top: 6px; color: #657d70; font-size: 11px; }
.server-population { flex-shrink: 0; padding: 6px 9px; border-radius: 7px; background: #fffefa; color: #208f6b; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 650; }
#servers-status { margin: 14px 0 0; color: #657d70; font-size: 12px; line-height: 1.6; }
#title { font-size: clamp(48px, 14vw, 66px); letter-spacing: -5px; line-height: 1.1; margin: 0 0 24px; padding: 0; font-weight: 900; }
.letter-o { color: #32bb8e; }
.title-dot { color: #e3a342; }
.form-group { margin-bottom: 12px; }
.form-control { border: 1px solid #dde5dd; color: #143b36; background: #f5f7f2; border-radius: 11px; padding: 12px; height: 46px; outline: none; min-width: 0; }
.form-control::placeholder { color: #8b978e; }
#nick { width: calc(74% - 5px); }
#skin { width: 26%; }
#gamemode { margin-top: 9px; appearance: auto; font-size: 13px; }
.btn { border: 0; border-radius: 11px; padding: 13px 16px; font-size: 14px; font-weight: 650; }
#play-btn { width: calc(100% - 62px); margin: 4px 0 10px; background: #143b36; color: #fff; text-align: left; }
#play-btn span { float: right; color: #80e7bd; }
#spectate-btn { float: right; width: 52px; margin-top: 4px; background: #e5eee4; color: #143b36; }
#gallery-btn { margin: 0; background: transparent; color: #537369; border: 1px solid #e4e9df; padding: 9px; font-size: 12px; }
.preferences { margin-top: 21px; border-top: 1px solid #e8ebe2; border-bottom: 1px solid #e8ebe2; }
.preferences summary { padding: 15px 0; list-style: none; font-size: 12px; color: #657d70; }
.preferences summary::-webkit-details-marker { display: none; }
.preferences summary span { float: right; }
#settings > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 4px; padding: 0 0 16px; font-size: 11px; color: #53675b; }
#settings label { display: flex; align-items: center; gap: 6px; margin: 0; }
input[type="checkbox"] { accent-color: #208f6b; }
#soundsVolume { width: 60px; }
#connection-status { margin: 16px 0 0; color: #657d70; font-size: 12px; line-height: 1.6; }
#client-version { margin: 18px 0 0; color: #8a9386; font-size: 11px; text-align: center; }
#connecting { background: #f4f8f5d9; backdrop-filter: blur(7px); }
#connecting-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; width: min(360px, calc(100% - 36px)); padding: 30px; text-align: center; border-radius: 22px; box-shadow: 0 16px 70px #123d3615; }
#connecting h2 { font-size: 20px; }
#connecting p { font-size: 13px; color: #718077; line-height: 1.6; }
.connection-orb { display: inline-block; width: 28px; height: 28px; border-radius: 50%; background: #32bb8e; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.75); opacity: .5; } }
#chat_textbox { font-family: inherit; border-radius: 8px; max-width: calc(100% - 20px); }
#gallery { z-index: 300; background: #143b3677; }
#gallery-content { max-width: calc(100% - 24px); border-radius: 18px; }
#gallery-header { font-size: 18px; }
.close-gallery { float: right; background: transparent; border: 0; font-size: 24px; }
#splitBtn, #ejectBtn { width: max(52px, 8vw); height: max(52px, 8vw); }
@media (max-width: 400px), (max-height: 720px) { #helloDialog, #servers-panel { padding: 22px; } #title { font-size: 53px; } .preferences { margin-top: 14px; } }
@media (max-width: 760px) { #menu-layout { top: 0; left: 0; transform: none; display: flex; flex-direction: column; gap: 16px; width: 100%; height: 100%; max-height: 100dvh; padding: 16px; overflow-y: auto; } #helloDialog, #servers-panel { flex-shrink: 0; max-height: none; } #servers-panel h2 { margin-bottom: 14px; font-size: 20px; } #servers-panel { padding: 20px 24px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.controls-panel { margin-top: 0; border-top: 0; }
.controls-help, #keybind-status { font-size: 11px; color: #657d70; line-height: 1.6; margin: 0 0 12px; }
.keybind-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 12px; border-top: 1px solid #eef0e9; }
.keybind-row small { display: block; margin-top: 3px; font-size: 10px; color: #839084; }
.keybind-button { flex: 0 0 auto; min-width: 66px; max-width: 150px; padding: 8px 10px; color: #143b36; border: 1px solid #dce5da; border-radius: 8px; background: #f2f6ee; font-size: 12px; font-weight: 650; }
.keybind-button[aria-pressed="true"] { background: #d9f7e9; border-color: #32bb8e; }
#keybind-status { min-height: 35px; padding-top: 10px; margin-bottom: 4px; }
#reset-controls { padding: 8px 0 14px; border: 0; background: transparent; color: #537369; font-size: 11px; text-decoration: underline; }
