/* Surir Web. The original ran in an 800x600 window; 1rem here is 10 of those pixels,
   so the whole interface scales with the browser window. */
html { font-size: min(1.25vw, 1.6667vh); }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body { font-family: Arial, Helvetica, sans-serif; color: #000; user-select: none; -webkit-user-select: none; }
:root { --mc: rgb(0, 0, 200); --mc-dark: rgb(0, 0, 70); --mc-mid: rgb(0, 0, 140); --mc-light: rgb(90, 90, 255); --tc: #fff; --team: #ff0; --bar: #4f9aff; }
[hidden] { display: none !important; }
button { font-family: inherit; cursor: pointer; }
#app, .layer { position: absolute; inset: 0; }

/* ---------- menus ---------- */
#menu {
  background-color: var(--mc-dark);
  background-image:
    radial-gradient(ellipse 30rem 18rem at 15% 20%, rgba(255,255,255,.10), transparent 70%),
    radial-gradient(ellipse 26rem 22rem at 80% 30%, rgba(0,0,0,.35), transparent 70%),
    radial-gradient(ellipse 34rem 20rem at 60% 85%, rgba(255,255,255,.08), transparent 70%),
    radial-gradient(ellipse 28rem 24rem at 25% 75%, rgba(0,0,0,.30), transparent 70%);
}
#menu.plain { background-color: var(--mc); }
#stage { position: absolute; left: 50%; top: 50%; width: 80rem; height: 60rem; transform: translate(-50%, -50%); }
.panel { position: absolute; background: var(--mc); border: .25rem solid var(--mc-light); box-shadow: 0 0 0 .12rem rgba(0,0,0,.45), .4rem .5rem 1rem rgba(0,0,0,.45); box-sizing: border-box; color: var(--tc); }
.title { font-weight: bold; font-size: 3.2rem; color: #000; text-align: center; text-shadow: -.12rem 0 #fff, .12rem 0 #fff, 0 -.12rem #fff, 0 .12rem #fff, .1rem .1rem #fff, -.1rem -.1rem #fff, .1rem -.1rem #fff, -.1rem .1rem #fff; }
.clock, .me-name { position: absolute; top: 1.2rem; font-size: 1.35rem; font-weight: bold; color: #000; text-shadow: 0 0 .25rem #fff, 0 0 .1rem #fff; }
.clock { left: 1.6rem; } .me-name { right: 1.6rem; }
.btn { width: 25rem; height: 7.5rem; border: 0; padding: 0 0 .7rem; background: url(../data/Images/button_relased.png) center/100% 100% no-repeat; font-weight: bold; font-size: 2rem; color: #000; }
.btn:active { background-image: url(../data/Images/button_pressed.png); padding: .3rem 0 .4rem .3rem; }
.btn:hover { filter: brightness(1.08); }
.btn.klein { width: 14.5rem; }
.btn.thin { height: 6rem; font-size: 1.8rem; }
.btn.mini { width: 8rem; height: 6rem; font-size: 1.7rem; }
.btn[disabled] { opacity: .45; cursor: default; filter: none; }
.abs { position: absolute; }
.small-note { position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center; font-size: 1.1rem; color: var(--tc); opacity: .75; }
.small-note a { color: inherit; }

/* main */
.main-logo { position: absolute; left: 27rem; top: 3.5rem; width: 26rem; height: 26rem; }
.main-title { position: absolute; left: 0; right: 0; top: 13rem; font-size: 5.2rem; }
.main-btns { position: absolute; left: 0; right: 0; top: 31rem; display: flex; flex-direction: column; align-items: center; gap: .9rem; }

/* options */
.opt-rows { position: absolute; left: 24rem; top: 17rem; display: grid; grid-template-columns: 18rem auto; white-space: nowrap; row-gap: .9rem; align-items: center; font-weight: bold; font-size: 1.9rem; color: var(--tc); }
.opt-btn { min-width: 5rem; height: 3rem; padding: 0 1rem; border: .15rem solid #666; border-right-color: #333; border-bottom-color: #333; background: linear-gradient(#d0d0d0, #9d9d9d); font-weight: bold; font-size: 1.5rem; color: #000; margin-right: .6rem; }
.opt-btn.on { background: linear-gradient(#fff, #cfcfcf); border-color: #000; }
.opt-btn:active { background: #888; }
.palette { width: 11rem; height: 8rem; cursor: crosshair; display: block; }

/* multiplayer */
.conn-btn { left: 20rem; top: 9.5rem; width: 40rem; }
.sess-box { left: 12rem; top: 19rem; width: 56rem; height: 22rem; background: var(--mc-mid); border: .15rem solid #000; overflow-y: auto; }
.sess-head { position: absolute; left: 12rem; top: 16.6rem; font-weight: bold; font-size: 1.6rem; color: var(--tc); }
.sess-row { display: flex; gap: 1rem; padding: .5rem 1rem; font-size: 1.5rem; color: #fff; cursor: pointer; border-bottom: .1rem solid rgba(0,0,0,.3); }
.sess-row:hover { background: rgba(255,255,255,.12); }
.sess-row.sel { background: var(--bar); color: #000; font-weight: bold; }
.sess-row span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-empty { padding: 1.4rem; font-size: 1.4rem; color: #fff; opacity: .8; text-align: center; }
.multi-btns { left: 5rem; right: 5rem; top: 44rem; display: flex; justify-content: space-between; }

/* session */
.slots { position: absolute; left: 1.9rem; top: 8.4rem; display: flex; flex-direction: column; gap: .5rem; }
.slot { display: flex; gap: 0; height: 2.25rem; }
.slot .bar { background: var(--bar); border: .15rem solid #000; box-sizing: border-box; height: 100%; font-weight: bold; font-size: 1.55rem; line-height: 1.95rem; padding: 0 .5rem; color: #000; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.slot .nm { width: 21rem; } .slot .lv { width: 13.2rem; font-size: 1.4rem; } .slot .tm { width: 3.6rem; padding: 0; } .slot .pl { width: 3.4rem; text-align: center; padding: 0; }
.slot .click { cursor: pointer; } .slot .click:hover { filter: brightness(1.15); }
.slot .muted { background-image: url(../data/Images/mute.png); background-repeat: no-repeat; background-position: right .3rem center; background-size: 1.6rem; }
.map-title { position: absolute; left: 0; right: 0; top: 1.6rem; text-align: center; font-size: 2.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 1rem; }
.map-prev { position: absolute; left: 6rem; top: 5.6rem; width: 17.6rem; height: 17.6rem; }
.map-info { position: absolute; left: 3rem; right: 2rem; top: 23.8rem; font-size: 1.4rem; line-height: 1.95rem; color: var(--tc); }
.map-info b { display: inline-block; width: 7rem; font-weight: normal; }
.map-info .info { font-size: 1.15rem; line-height: 1.4rem; max-height: 4.3rem; overflow: hidden; white-space: pre-line; opacity: .9; margin: .2rem 0 .3rem; }
.chatlog { position: absolute; left: .8rem; right: .8rem; top: .6rem; bottom: 3rem; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 1.3rem; line-height: 1.55rem; color: var(--tc); }
.chatlog div { flex: none; overflow-wrap: anywhere; }
.chatlog .sys { opacity: .8; font-style: italic; }
.chatline { position: absolute; left: 0; right: 0; bottom: 0; height: 2.5rem; background: rgba(120,120,120,.55); display: flex; align-items: center; padding: 0 .8rem; font-weight: bold; font-size: 1.35rem; color: #333; }
.chatline input { flex: 1; background: transparent; border: 0; outline: 0; font: inherit; color: #000; margin-left: .5rem; min-width: 0; user-select: text; -webkit-user-select: text; }
.sess-btn-col { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; }
.sess-btn-col .btn { height: 5.3rem; }
.count { position: absolute; left: 0; right: 0; top: 4.4rem; text-align: center; font-size: 1.5rem; font-weight: bold; color: #000; text-shadow: 0 0 .3rem #fff; }

/* popup menus + dialogs */
.popup { position: absolute; z-index: 60; min-width: 14.6rem; max-height: 34rem; overflow-y: auto; background: #00007a; border: .12rem solid #000; box-shadow: .3rem .4rem .8rem rgba(0,0,0,.5); }
.popup div { padding: .28rem .9rem; font-size: 1.4rem; color: #fff; text-align: center; cursor: pointer; border: .12rem solid transparent; white-space: nowrap; }
.popup div:hover { border-color: #fff; background: #000050; }
.popup .sw { display: inline-block; width: 1.4rem; height: 1.4rem; border: .1rem solid #000; vertical-align: -.25rem; margin-right: .6rem; }
.popup .cur { font-weight: bold; text-decoration: underline; }
#dialogs { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
.dlg-back { position: absolute; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(.25rem); pointer-events: auto; display: flex; align-items: center; justify-content: center; }
.dlg { position: relative; background: var(--mc); border: .25rem solid var(--mc-light); box-shadow: 0 0 0 .12rem rgba(0,0,0,.5), .6rem .8rem 2rem rgba(0,0,0,.6); padding: 2rem 2.4rem 1.6rem; min-width: 30rem; max-width: 70rem; color: var(--tc); }
.dlg h2 { margin: 0 0 1.2rem; font-size: 2.1rem; text-align: center; color: #000; text-shadow: -.1rem 0 #fff, .1rem 0 #fff, 0 -.1rem #fff, 0 .1rem #fff; }
.dlg p { margin: 0 0 1.2rem; font-size: 1.6rem; text-align: center; white-space: pre-line; font-weight: bold; }
.dlg .field { display: block; width: 100%; box-sizing: border-box; height: 2.8rem; font: bold 1.6rem Arial, sans-serif; padding: 0 .6rem; border: .15rem solid #000; background: rgba(255,255,255,.75); color: #000; margin-bottom: 1.4rem; user-select: text; -webkit-user-select: text; }
.dlg .row { display: flex; justify-content: center; gap: 1.6rem; flex-wrap: wrap; }
.dlg .list { background: rgba(255,255,255,.14); border: .15rem solid #000; max-height: 26rem; overflow-y: auto; margin-bottom: 1.2rem; }
.dlg .list div { padding: .35rem .8rem; font-size: 1.45rem; cursor: pointer; }
.dlg .list div:hover, .dlg .list div.sel { background: var(--bar); color: #000; }
.dlg pre { background: #fff; color: #000; font: 1.2rem/1.5rem Consolas, monospace; padding: 1rem; max-height: 34rem; overflow: auto; margin: 0 0 1.2rem; user-select: text; -webkit-user-select: text; text-align: left; }

/* advanced settings */
.adv-legend { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 2rem; font-size: 1.15rem; margin-bottom: .8rem; }
.dot { display: inline-block; width: 1.3rem; height: 1.3rem; background: center/100% 100% no-repeat; vertical-align: -.25rem; cursor: pointer; opacity: .35; }
.dot.on, .adv-legend .dot { opacity: 1; cursor: default; } .adv-list .dot.on { cursor: pointer; }
.dot.s0 { background-image: url(../data/Images/button_red.png); } .dot.s1 { background-image: url(../data/Images/button_green.png); }
.dot.s2 { background-image: url(../data/Images/button_orange.png); } .dot.s3 { background-image: url(../data/Images/button_yellow.png); }
.adv-list { width: 52rem; height: 25rem; overflow-y: scroll; border: .15rem solid #000; background: rgba(255,255,255,.1); margin-bottom: 1rem; }
.adv-row { display: flex; align-items: center; gap: .9rem; padding: .25rem .9rem; font-size: 1.35rem; }
.adv-row .n { width: 14rem; } .adv-row .cost { width: 5.5rem; text-align: right; font-size: 1.2rem; opacity: .85; } .adv-row .mul { width: 4.6rem; text-align: right; font-size: 1.25rem; }
.adv-row input[type=range] { width: 9rem; height: .8rem; accent-color: #d00; }
.adv-money { display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: 1.5rem; font-weight: bold; margin-bottom: 1.2rem; }
.adv-money input { width: 8rem; height: 2.4rem; font: bold 1.5rem Arial, sans-serif; text-align: center; border: .15rem solid #000; user-select: text; -webkit-user-select: text; }

/* ---------- game ---------- */
#game { display: flex; flex-direction: column; background: #000; }
#hud-top { flex: none; height: 9.4rem; background: linear-gradient(#00002c, #000036); position: relative; color: #fff; z-index: 3; }
#hud-bottom { flex: none; height: 9.4rem; background: #070707; position: relative; border-top: .15rem solid var(--team); z-index: 3; box-sizing: border-box; }
.hud-inner { position: relative; width: 80rem; height: 100%; margin: 0 auto; }
#view { flex: 1; position: relative; overflow: hidden; min-height: 0; }
#gl, #ov { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
#ov { pointer-events: none; }
#view-ui { position: absolute; inset: 0; pointer-events: none; }
#view-ui > * { position: absolute; }
.h-clock { position: absolute; left: .8rem; top: .5rem; font-size: 1.1rem; }
.h-avatar { position: absolute; left: 3.1rem; top: 2.3rem; width: 4.6rem; height: 4.6rem; }
.h-name { position: absolute; left: 0; width: 10.8rem; top: 7.1rem; text-align: center; font-size: 1.05rem; white-space: nowrap; overflow: hidden; }
.h-win { position: absolute; left: 10rem; top: 1.9rem; width: 10rem; height: 6rem; box-sizing: border-box; border: .12rem solid #9a9ab0; background: #34344a; text-align: center; font-size: 1.1rem; line-height: 1.35rem; padding-top: .45rem; }
.h-win .v { color: var(--team); margin-top: .6rem; font-size: 1.15rem; }
.h-pills { position: absolute; left: 22.4rem; top: 1.2rem; width: 46rem; display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; }
.pill { width: 7.4rem; height: 1.75rem; box-sizing: border-box; border: .16rem solid #fff; border-radius: .7rem; background: linear-gradient(#8f93a8 0%, #3a3d52 45%, #1b1d2c 100%); text-align: center; font-size: 1.15rem; line-height: 1.45rem; color: #fff; }
.pill.mine { box-shadow: 0 0 .5rem .1rem rgba(255,255,255,.6); }
.h-help { position: absolute; right: 1rem; top: .5rem; font-size: 1rem; line-height: 1.35rem; text-align: right; opacity: .5; }

.smiley { position: relative; isolation: isolate; }
.smiley i { position: absolute; left: 4%; top: 4%; width: 92%; height: 92%; border-radius: 50%; }
.smiley img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.smiley img.shade { mix-blend-mode: multiply; }

.stats { right: 1.4rem; top: 50%; transform: translateY(-50%); width: 6.2rem; border: .1rem solid #600; }
.stats div { background: var(--team); border-bottom: .16rem solid #a00; text-align: center; font-size: 1.15rem; line-height: 1.45rem; padding: .15rem 0 .1rem; color: #000; }
.stats div:last-child { border-bottom: 0; }
.cross { left: 50%; top: 50%; width: 3.2rem; height: 3.2rem; margin: -1.6rem 0 0 -1.6rem; background: var(--team); -webkit-mask: url(../data/Images/v.png) center/100% 100% no-repeat; mask: url(../data/Images/v.png) center/100% 100% no-repeat; opacity: .9; }
.cross.reload { -webkit-mask-image: url(../data/Images/vr.png); mask-image: url(../data/Images/vr.png); opacity: .6; }
.compass { left: 2rem; top: 1.4rem; width: 8rem; height: 9.6rem; }
.compass img { width: 100%; height: 100%; }
.analysis { left: 11rem; top: 1.4rem; background: rgba(0,0,0,.5); color: #fff; font: 1.1rem/1.5rem Consolas, monospace; padding: .5rem .8rem; white-space: pre; border: .1rem solid var(--team); }
.mindmap { left: 1.6rem; bottom: 1.2rem; width: 22rem; height: 22rem; opacity: .9; }
.hint { left: 0; right: 0; top: 66%; text-align: center; font-size: 1.4rem; font-weight: bold; color: #fff; text-shadow: 0 0 .4rem #000, 0 0 .2rem #000; }
.hint small { display: block; font-size: 1.05rem; font-weight: normal; margin-top: .3rem; opacity: .9; }
.fx { inset: 0; width: 100%; height: 100%; opacity: 0; }
.fx.flash { background: url(../data/Images/hit_flash.png) center/100% 100% no-repeat; transition: opacity .45s; }
.fx.frozen { background: url(../data/Images/frozen.png) center/100% 100% no-repeat; }
.fx.dead { background: radial-gradient(ellipse at center, rgba(0,0,0,.55) 0%, rgba(0,0,0,.88) 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 1.7rem; font-weight: bold; }
.fx.dead .smiley { width: 18rem; height: 18rem; margin-bottom: 1.2rem; }
.fx.dead .tongue { position: absolute; left: 44%; top: 66%; width: 16%; height: auto; }
.frozen-txt { left: 0; right: 0; top: 30%; text-align: center; font-size: 2.6rem; font-weight: bold; color: #bff; text-shadow: 0 0 .6rem #06c; }
.paused-txt { left: 0; right: 0; top: 22%; text-align: center; font-size: 2rem; font-weight: bold; color: #fff; text-shadow: 0 0 .5rem #000, 0 0 .2rem #000; }
.h-chat { left: 2rem; bottom: .9rem; width: 46rem; height: 2.4rem; background: rgba(70,70,70,.8); border: .12rem solid #111; display: flex; align-items: center; padding: 0 .6rem; box-sizing: border-box; font-size: 1.3rem; color: #ddd; pointer-events: auto; }
.h-chat input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font: inherit; color: #fff; margin-left: .5rem; user-select: text; -webkit-user-select: text; }

.b-gauge { position: absolute; top: .6rem; bottom: .6rem; width: .35rem; background: #222; }
.b-gauge i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--team); }
.b-gauge.l { left: 1rem; } .b-gauge.r { right: 1rem; }
.b-chat { position: absolute; left: 2.2rem; width: 22rem; top: .5rem; bottom: .5rem; display: flex; flex-direction: column; justify-content: flex-end; font-size: 1rem; line-height: 1.3rem; color: #aaa; overflow: hidden; }
.b-chat div, .b-msgs div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-msgs { position: absolute; right: 2.2rem; width: 22rem; top: .5rem; bottom: .5rem; display: flex; flex-direction: column; justify-content: flex-end; text-align: right; font-size: 1rem; line-height: 1.3rem; color: #eee; overflow: hidden; }
.b-msgs .c { color: #0ff; } .b-msgs .r { color: #f66; } .b-msgs .g { color: #8f8; }
.b-box { position: absolute; left: 25rem; width: 30rem; top: -.15rem; bottom: 0; border: .12rem solid var(--team); border-bottom: 0; background: #121212; box-sizing: border-box; display: grid; grid-template-columns: repeat(5, 3rem); grid-template-rows: repeat(2, 3rem); gap: .7rem 2.1rem; justify-content: center; align-content: center; }
.b-box .c10 { width: 3rem; height: 3rem; border-radius: 50%; background: #000; position: relative; }
.b-box .c10 .smiley { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.b-box .c10 .ico { position: absolute; inset: 12%; width: 76%; height: 76%; opacity: 0; transition: opacity .35s; }
.b-box .c10.show .smiley, .b-box .c10.show .ico.on { opacity: 1; transition: none; }

/* buy menu, pause menu, win event */
.overlay { inset: 0; pointer-events: auto; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.25); }
.buy { position: relative; width: 70rem; background: var(--mc); border: .25rem solid var(--mc-light); box-shadow: 0 0 0 .12rem rgba(0,0,0,.5), .6rem .8rem 2rem rgba(0,0,0,.6); padding: 1.2rem 1.6rem; box-sizing: border-box; color: var(--tc); max-height: 96%; overflow: auto; }
.buy h2 { margin: 0 0 .6rem; font-size: 2rem; text-align: center; color: #000; text-shadow: -.1rem 0 #fff, .1rem 0 #fff, 0 -.1rem #fff, 0 .1rem #fff; }
.buy .money { position: absolute; right: 1.8rem; top: 1.4rem; font-size: 1.5rem; font-weight: bold; }
.buy .legend { position: absolute; left: 1.8rem; top: 1.3rem; font-size: 1.05rem; line-height: 1.4rem; }
.buy .grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: column; grid-template-rows: repeat(12, auto); gap: .12rem 1rem; border: .15rem solid #000; background: rgba(255,255,255,.1); padding: .5rem; }
.buy .it { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; padding: .16rem .4rem; cursor: pointer; border: .1rem solid transparent; white-space: nowrap; }
.buy .it:hover { background: rgba(255,255,255,.14); } .buy .it.sel { border-color: #fff; background: rgba(0,0,0,.25); }
.buy .it .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; } .buy .it .co { opacity: .9; }
.buy .it.na { opacity: .45; } .buy .it.own .nm { font-weight: bold; }
.buy .info { display: flex; gap: 1.4rem; align-items: center; margin-top: .8rem; min-height: 6.2rem; }
.buy .info .tx { flex: 1; font-size: 1.25rem; line-height: 1.6rem; } .buy .info .tx b { font-size: 1.45rem; }
.pausebox { background: var(--mc); border: .25rem solid var(--mc-light); box-shadow: .6rem .8rem 2rem rgba(0,0,0,.6); padding: 1.6rem 2.4rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--tc); }
.pausebox .help { font-size: 1.15rem; line-height: 1.7rem; text-align: center; margin-top: .6rem; }
.win { inset: 0; overflow: hidden; pointer-events: auto; }
.win .rays { position: absolute; left: 50%; top: 50%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax; background: repeating-conic-gradient(var(--wc) 0deg 9deg, var(--wb) 9deg 18deg); animation: spin 40s linear infinite; opacity: .95; }
.win .glow { position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(255,255,255,.75) 0%, rgba(255,255,255,0) 55%); }
@keyframes spin { to { transform: rotate(360deg); } }
.win .who { position: absolute; left: 50%; top: 47%; width: 21rem; height: 21rem; margin: -10.5rem 0 0 -10.5rem; }
.win .crown { position: absolute; left: 50%; top: 47%; width: 33rem; margin: -19.5rem 0 0 -16.5rem; }
.win .txt { position: absolute; left: 0; right: 0; top: calc(47% + 11.6rem); text-align: center; }
.win .txt span { display: inline-block; background: rgba(255,255,255,.55); border: .1rem solid rgba(0,0,0,.3); padding: .25rem .9rem; font-size: 1.3rem; color: #000; }
.win .btnrow { position: absolute; left: 0; right: 0; top: calc(47% + 14.4rem); text-align: center; }
.fatal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; text-align: center; padding: 3rem; }
