:root {
  --panel: rgba(0, 0, 0, 0.72);
  --edge: rgba(255, 176, 0, 0.55);
  --text: #ffb000;
  --text-dim: #c8a050;
  --hi: #ffd860;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text); font-family: Verdana, Tahoma, sans-serif; font-size: 13px; user-select: none; }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { pointer-events: none; }
body.ingame, body.ingame canvas { cursor: none; }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.hidden { display: none !important; }
.panel { position: absolute; background: var(--panel); border: 1px solid var(--edge); padding: 16px; z-index: 10; }
.center { left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; }
h1 { margin: 6px 0; font-size: 26px; letter-spacing: 1px; }
h2 { margin: 4px 0 12px; font-size: 18px; }
.sub { color: var(--text-dim); margin: 4px 0 12px; }
.logo { max-width: 220px; display: block; margin: 0 auto; }
input { background: rgba(0, 0, 0, 0.6); color: var(--hi); border: 1px solid var(--edge); padding: 8px; font: inherit; width: 240px; }
button { background: rgba(60, 40, 0, 0.6); color: var(--text); border: 1px solid var(--edge); padding: 8px 14px; font: inherit; cursor: pointer; margin: 4px; }
button:hover { background: rgba(120, 80, 0, 0.7); color: var(--hi); }
button:disabled { opacity: 0.4; cursor: default; }
.row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.team { display: flex; flex-direction: column; align-items: center; width: 180px; }
.team img { width: 160px; height: auto; margin-bottom: 6px; }
.row.small .team { width: auto; }
#models button { width: 120px; }
#models img { width: 100px; display: block; margin: 0 auto 4px; }

#buymenu { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(820px, 96vw); }
.buyhead { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 10px; }
.buycols { display: grid; grid-template-columns: 180px 1fr 240px; gap: 10px; min-height: 300px; }
#buycats button, #buyitems button { display: block; width: 100%; text-align: left; margin: 2px 0; }
#buyitems button span { float: right; }
#buypreview img { width: 100%; image-rendering: pixelated; }
#buyinfo { color: var(--text-dim); margin-top: 8px; line-height: 1.5; white-space: pre-line; }

#scores { left: 50%; top: 12%; transform: translateX(-50%); width: min(760px, 96vw); }
#scores table { width: 100%; border-collapse: collapse; }
#scores td, #scores th { padding: 3px 6px; text-align: left; }
#scores th { color: var(--hi); border-bottom: 1px solid var(--edge); }
#scores .T { color: #ff4040; }
#scores .CT { color: #99ccff; }
#scores .dead { opacity: 0.55; }

#chatbox { position: absolute; left: 16px; bottom: 120px; width: min(520px, 70vw); pointer-events: none; }
#chatlog div { text-shadow: 1px 1px 0 #000; margin: 2px 0; color: #fff; }
#chatlog .sys { color: var(--text); }
#chatlog .T { color: #ff4040; }
#chatlog .CT { color: #99ccff; }
#chatin { pointer-events: auto; width: 100%; }
#radiomenu { position: absolute; left: 16px; top: 30%; background: var(--panel); border: 1px solid var(--edge); padding: 10px 14px; line-height: 1.6; white-space: pre; }
#center { position: absolute; left: 50%; top: 28%; transform: translateX(-50%); text-align: center; font-size: 16px; text-shadow: 1px 1px 0 #000; pointer-events: none; max-width: 90vw; }
#help { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); color: var(--text-dim); text-shadow: 1px 1px 0 #000; font-size: 12px; text-align: center; padding: 0 16px; }

/* GameUI (Steam dönemi CS 1.6): ana menü arka planda, sol altta metin öğeler; pencereler yeşilimsi gri */
:root { --vg-bg: #4c5844; --vg-dark: #3e4637; --vg-light: #8c9284; --vg-text: #d8ded3; --vg-hi: #c4b550; --vg-sel: #958831; }
body.menubg { background: #000 url('/assets/gfx/background.png') center / cover no-repeat; }
body.menubg #gl, body.menubg #hud { visibility: hidden; }
#mainmenu { position: absolute; left: 5%; bottom: 8%; z-index: 20; }
#mainmenu .gametitle { font: bold 34px Tahoma, Verdana, sans-serif; color: #fff; letter-spacing: 2px; margin-bottom: 26px; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6); }
#mainitems button { display: block; background: none; border: none; color: #fff; font: 15px Tahoma, Verdana, sans-serif; text-align: left; padding: 3px 0; margin: 2px 0; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.7); }
#mainitems button:hover { color: var(--vg-hi); background: none; }
#mainitems br { display: block; content: ''; margin: 10px 0; }
.vdialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--vg-bg); border: 1px solid var(--vg-light); box-shadow: 0 0 0 1px #2a2f25, 4px 4px 16px rgba(0, 0, 0, 0.6); color: var(--vg-text); font: 13px Tahoma, Verdana, sans-serif; z-index: 40; max-height: 92vh; display: flex; flex-direction: column; }
.vdialog.static { position: relative; left: auto; top: auto; transform: none; width: min(420px, 90vw); }
.vtitle { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-weight: bold; color: #fff; }
.vclose { background: none; border: none; color: var(--vg-text); padding: 0 4px; margin: 0; }
.vbody { padding: 6px 12px 12px; overflow-y: auto; }
.vdialog button, #options button, #teammenu button { background: var(--vg-bg); color: var(--vg-text); border: 1px solid; border-color: var(--vg-light) var(--vg-dark) var(--vg-dark) var(--vg-light); padding: 5px 14px; font: 13px Tahoma, Verdana, sans-serif; }
.vdialog button:hover, #options button:hover { color: #fff; background: #57634e; }
.vdialog button:disabled { color: #8a9282; }
.vdialog input, .vdialog select { background: var(--vg-dark); color: var(--vg-text); border: 1px solid; border-color: var(--vg-dark) var(--vg-light) var(--vg-light) var(--vg-dark); padding: 4px 6px; font: 13px Tahoma, Verdana, sans-serif; width: 100%; }
.vdialog input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--vg-sel); }
.vbuttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.vtabs { display: flex; gap: 2px; margin-bottom: 8px; }
.vtabs button.active, #opttabs button.active { background: var(--vg-dark); color: #fff; }
table.vlist { width: 100%; border-collapse: collapse; background: var(--vg-dark); }
table.vlist th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--vg-light); color: #fff; font-weight: normal; }
table.vlist td { padding: 4px 6px; cursor: default; }
table.vlist tr.sel td { background: var(--vg-sel); color: #fff; }
table.vlist tbody tr:hover td { background: #4a5342; }
.vbar { height: 14px; border: 1px solid var(--vg-light); background: var(--vg-dark); margin-top: 8px; }
#loadbar { height: 100%; width: 0; background: var(--vg-sel); }
#loading { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12vh; z-index: 35; background: #000 url('/assets/gfx/background.png') center / cover no-repeat; }
#options { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(860px, 96vw); height: min(640px, 92vh); display: flex; flex-direction: column; z-index: 20; background: var(--vg-bg); border-color: var(--vg-light); color: var(--vg-text); font: 13px Tahoma, Verdana, sans-serif; }
#options h3 { color: #fff !important; }
#options input, #options select { background: var(--vg-dark) !important; color: var(--vg-text) !important; border-color: var(--vg-light) !important; }
#options table.keys th, #options table.keys tr.sect td { color: #fff; }
#options .dim { color: #b5bdae; }
#opttabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--edge); padding-bottom: 8px; }
#opttabs button.active { background: rgba(160, 110, 0, 0.8); color: var(--hi); }
#optclose { margin-left: auto !important; }
#optbody { overflow-y: auto; flex: 1; padding-top: 8px; }
#optbody h3 { margin: 12px 0 6px; font-size: 14px; color: var(--hi); }
#optbody .row { justify-content: flex-start; }
.dim { color: var(--text-dim); opacity: 0.8; }
table.keys { width: 100%; border-collapse: collapse; }
table.keys td, table.keys th { padding: 4px 8px; text-align: left; border-bottom: 1px solid rgba(255, 176, 0, 0.12); }
table.keys tr[data-cmd] { cursor: pointer; }
table.keys tr[data-cmd]:hover { background: rgba(255, 176, 0, 0.12); }
table.keys tr.capturing { background: rgba(255, 176, 0, 0.3); }
table.keys tr.sect td { color: var(--hi); padding-top: 12px; font-weight: bold; cursor: default; }
label.opt { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(120px, 2fr) 60px; gap: 10px; align-items: center; margin: 8px 0; }
label.opt input[type=range] { width: 100%; accent-color: #ffb000; }
label.opt input[type=checkbox] { justify-self: start; width: 18px; height: 18px; accent-color: #ffb000; }
label.opt input[type=text], label.opt select { width: 100%; background: rgba(0, 0, 0, 0.6); color: var(--hi); border: 1px solid var(--edge); padding: 6px; font: inherit; }
#console { position: absolute; left: 0; right: 0; top: 0; height: 50%; background: rgba(20, 16, 8, 0.92); border-bottom: 2px solid var(--edge); display: flex; flex-direction: column; z-index: 30; font-family: Consolas, 'Courier New', monospace; font-size: 13px; }
#conlog { flex: 1; overflow-y: auto; padding: 8px 12px; color: #ffb41e; white-space: pre-wrap; user-select: text; }
#coninput { width: 100%; border: none; border-top: 1px solid var(--edge); background: rgba(0, 0, 0, 0.6); font-family: inherit; }
#fps { position: absolute; left: 12px; top: 8px; color: #fff; text-shadow: 1px 1px 0 #000; font-family: Consolas, monospace; pointer-events: none; z-index: 5; }
.meter { height: 14px; background: var(--vg-dark); border: 1px solid var(--vg-light); margin: 8px 0; }
#o_meter { height: 100%; width: 0; background: #7ab04a; transition: width 60ms linear; }
label.opt.inline { display: inline-flex; grid-template-columns: none; gap: 6px; margin: 0 0 0 10px; }
#voicelist { position: absolute; right: 16px; top: 34%; text-align: right; pointer-events: none; z-index: 5; font-size: 13px; }
#voicelist div { color: #fff; text-shadow: 1px 1px 0 #000; margin: 2px 0; }
#voicelist .T { color: #ff6060; }
#voicelist .CT { color: #99ccff; }
#nv { position: absolute; inset: 0; background: rgba(0, 255, 0, 0.18); mix-blend-mode: screen; pointer-events: none; }

@media (max-width: 700px) {
  label.opt { grid-template-columns: 1fr; }
  .buycols { grid-template-columns: 1fr; }
  #buypreview { display: none; }
  .team { width: 140px; }
  .team img { width: 120px; }
}
