/* The front menus. Looks and sizes follow the old game's menu. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #050505; }
body { display: flex; align-items: center; justify-content: center; font-family: Arial, Helvetica, sans-serif;
       color: #eee; padding: clamp(6px, 2vw, 18px); overflow: auto; }

.menu-stage {
  position: relative; width: min(94vw, 72vh, 620px); aspect-ratio: 583 / 693; overflow: hidden;
  background: #111; box-shadow: 0 0 30px rgba(0,0,0,.75); border: 3px solid #c62828; border-radius: 10px;
}
.menu-rink { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; pointer-events: none; }
.menu-jack { position: absolute; z-index: 2; left: -6.5%; bottom: 1%; width: 67%; height: auto; pointer-events: none; }
.menu-logo { position: absolute; z-index: 3; right: 2.5%; top: 3%; width: 55%; height: auto; pointer-events: none; }
.menu-buttons {
  position: absolute; z-index: 4; right: 6%; top: 38%; width: 44%; height: 50%;
  display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(5px, .9vh, 9px);
}
.menu-buttons button {
  flex: 0 0 auto; width: 100%; padding: clamp(7px, 1.15vh, 10px) 5px; border: 2px solid #c62828; border-radius: 7px;
  background: rgba(24,24,24,.94); color: #eee; font: 800 clamp(11px, 1.85vh, 16px) Arial, Helvetica, sans-serif;
  letter-spacing: .04em; cursor: pointer; box-shadow: 0 2px 7px rgba(0,0,0,.55); touch-action: manipulation;
}
.menu-buttons button:hover, .menu-buttons button:focus { background: #3a3a3a; outline: none; border-color: #ef5350; }
.menu-buttons button:active { transform: translateY(1px); }
.menu-buttons .who { text-align: center; font-weight: 700; color: #111; font-size: clamp(10px, 1.5vh, 13px); padding: 2px 0; }
.menu-buttons .link {
  background: transparent; border: 0; box-shadow: none; color: #111; text-decoration: underline;
  font: 700 clamp(10px, 1.4vw, 13px) Arial, Helvetica, sans-serif; padding: 2px 0; letter-spacing: 0;
}
.menu-buttons .link:hover, .menu-buttons .link:focus { background: transparent; border: 0; color: #111; }

@media (max-width: 650px) { .menu-buttons { top: 41%; right: 5%; width: 47%; } }
@media (max-width: 480px) {
  body { padding: 0; }
  .menu-stage { width: 100vw; max-width: none; height: min(100vh, 118.9vw); aspect-ratio: auto; border-width: 2px; border-radius: 8px; }
  .menu-buttons { right: 4%; width: 50%; top: 38%; gap: 7px; }
  .menu-jack { left: -9%; width: 60%; }
  .menu-logo { right: 1%; width: 62%; }
}

/* dialogs */
.overlay { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.8); display: flex;
           align-items: center; justify-content: center; padding: 14px; }
.overlay[hidden] { display: none; }
.dialog { width: min(92vw, 520px); max-height: 88vh; overflow: auto; background: #191919; border: 2px solid #c62828;
          border-radius: 10px; padding: 20px; text-align: center; line-height: 1.45; }
.dialog h2 { margin: 4px 0 12px; letter-spacing: .04em; }
.dialog p { margin: 8px 0; }
.dialog .note { color: #bbb; font-size: 14px; }
.dialog button, .dialog a.btn {
  display: inline-block; background: #404040; color: #fff; border: 2px solid #df2020; border-radius: 7px;
  padding: 10px 18px; margin: 6px 4px 0; font: 700 15px Arial, Helvetica, sans-serif; cursor: pointer; text-decoration: none;
  touch-action: manipulation;
}
.dialog button:hover, .dialog a.btn:hover { background: #b02020; }
.dialog button:active { background: #b02020; }
.dialog button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.dialog button.plain { background: transparent; border: 0; text-decoration: underline; color: #ddd; padding: 6px; }
.dialog button.plain:hover { background: transparent; color: #fff; }

.form { display: flex; flex-direction: column; gap: 7px; text-align: left; font-size: 15px; }
.form label { font-weight: 700; margin-top: 6px; }
.form input { width: 100%; padding: 11px; border: 1px solid #777; border-radius: 6px; background: #171717; color: #fff; font: inherit; }
.form input:focus-visible { outline: 2px solid #e02028; outline-offset: 1px; border-color: #e02028; }
.form small { color: #bbb; line-height: 1.35; }
.form .status { min-height: 18px; font-size: 14px; color: #ffb7a9; }
.form .status.ok { color: #a8f0b0; }
.dialog .form button.submit { width: 100%; margin: 8px 0 0; background: #101010; border-radius: 9px; border-color: #d71920; }
.dialog .form button.submit:hover { background: #292929; }

.rules { text-align: left; max-height: 58vh; overflow: auto; font-size: 14px; padding-right: 6px; }
.rules h3 { font-size: 16px; margin: 16px 0 4px; color: #fff; letter-spacing: .03em; }
.rules p { margin: 0 0 10px; color: #ddd; }

.list { text-align: left; margin: 10px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #444; }
.row button { margin: 0; padding: 7px 14px; }
.tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.tabs button { margin: 0; padding: 7px 12px; font-size: 13px; }
.tabs button.on { background: #b02020; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; margin: 8px 0; }
.grid div { background: #101010; border: 1px solid #444; border-radius: 7px; padding: 8px 10px; }
.grid b { display: block; font-size: 22px; }
.grid span { font-size: 11px; letter-spacing: .06em; color: #aaa; }
.leaders { text-align: left; margin-top: 10px; }
.leaders .row img { width: 34px; height: auto; flex: none; border-radius: 3px; }
.leaders .row span:first-child { flex: 1; }
.account { text-align: left; }
.account .big { font-size: 22px; font-weight: 700; }

.ask { font-size: 1.15em; text-align: center; margin: 14px 4px; }
.two { display: flex; gap: 10px; justify-content: center; }
.row button.busy { background: #555; color: #aaa; cursor: default; }
.row button[data-to] { background: #2a7a2a; }
.row button[data-to]:hover { background: #38a038; }
#lobbyBody > button { display: block; margin: 12px auto; }
.warn { font-size: .9em; color: #f0c040; margin: 12px 0 4px; line-height: 1.35; }

/* small links along the bottom of the menus */
.menu-foot { position: absolute; z-index: 4; right: 2.5%; bottom: 1.6%; width: 40%; display: flex; flex-wrap: wrap;
             justify-content: center; gap: 2px 14px; }
.menu-foot button { background: transparent; border: 0; color: #111; font-weight: 700; letter-spacing: .04em; cursor: pointer;
                    font-size: clamp(10px, 1.5vh, 13px); text-decoration: underline; padding: 3px 2px; }
.menu-foot button:hover, .menu-foot button:focus { color: #b02020; outline: none; }
@media (max-width: 650px) { .menu-foot { right: 5%; width: 44%; } }
@media (max-width: 480px) { .menu-foot { right: 4%; width: 47%; } }
/* links inside dialogs (the contact address): light enough to read on the dark panel */
.dialog a:not(.btn), .dialog a:not(.btn):visited { color: #ff8a80; text-decoration: underline; }
.dialog a:not(.btn):hover, .dialog a:not(.btn):focus { color: #fff; }

/* statistics */
.dialog.wide { width: min(94vw, 720px); }
table.st { width: 100%; border-collapse: collapse; font-size: 15px; text-align: right; }
table.st th { font-size: 12px; color: #bbb; padding: 4px 6px; border-bottom: 1px solid #555; letter-spacing: .04em; }
table.st td { padding: 7px 6px; border-bottom: 1px solid #333; }
table.st th:first-child, table.st td:first-child { text-align: left; }
table.st tr.head td { text-align: left; color: #ff8a80; font-weight: 800; letter-spacing: .06em; font-size: 12px; padding-top: 14px; border-bottom: 1px solid #555; }
table.st td.n { width: 46px; color: #bbb; }
table.st td.p { text-align: left; }
table.st td.v { font-weight: 800; white-space: nowrap; }
table.st tr.mine td { background: #3a1616; font-weight: 700; }
table.st tr.gap td { text-align: center; color: #888; border: 0; padding: 2px; }
table.st tr.lb { cursor: pointer; }
table.st tr.more td { background: #242424; color: #ccc; font-size: 13px; text-align: left; }
table.st .vs { color: #999; font-size: 12px; font-weight: 400; }
table.st img.cardimg { height: 42px; vertical-align: middle; border-radius: 3px; margin-right: 8px; }
.dialog h3 { font-size: 14px; letter-spacing: .06em; margin: 16px 0 6px; text-align: left; }
.dialog .sub { color: #bbb; font-size: 14px; margin: 0 0 8px; }
.dialog .sub.you { margin-top: 10px; color: #ddd; }
.dialog .pick { margin: 6px 0 10px; }
.dialog .pick select { font: 700 14px Arial; color: #fff; background: #404040; border: 2px solid #df2020; border-radius: 7px; padding: 8px 12px; max-width: 100%; }
table.st.lbt th:nth-child(2) { text-align: left; }
.form .status a.sug { color: #fff; font-weight: bold; text-decoration: underline; }
#nstatus { color: #ffb7a9; }

/* tier medals: a plain coloured disk with the level number (1 bronze, 2 silver, 3 gold, 4 platinum) */
.medal { display: inline-block; width: 1.25em; height: 1.25em; line-height: 1.25em; border-radius: 50%; text-align: center;
  font-size: .8em; font-weight: 700; font-style: normal; vertical-align: .05em; margin-left: .25em; color: #222; letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.25); text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.medal.m1 { background: radial-gradient(circle at 35% 30%, #f3bd8c, #b8692c 68%, #80441a); }
.medal.m2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c8cdd3 65%, #8a919a); }
.medal.m3 { background: radial-gradient(circle at 35% 30%, #fff4b3, #f3c432 65%, #b98b0b); }
.medal.m4 { background: radial-gradient(circle at 35% 30%, #c9d0da, #7d8794 62%, #454c57); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); }

.menu-foot .copy { flex-basis: 100%; text-align: center; font-size: .72em; color: #333; letter-spacing: .03em; margin-top: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* read by search engines and screen readers, not shown */

/* trophy room */
.trophies { max-height: 62vh; overflow: auto; padding-right: 4px; }
.tshelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tcase { background: #101010; border: 1px solid #444; border-radius: 9px; padding: 8px 4px 9px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tcase img { width: 100%; max-width: 104px; height: 100px; object-fit: contain; object-position: center bottom; }
.tcase.none img { filter: grayscale(1) brightness(.45); opacity: .7; }
.tcase b { font-size: 12px; letter-spacing: .05em; }
.tcase .prog { font-size: 11px; color: #bbb; letter-spacing: .04em; text-align: center; }
.tcase .dots { display: flex; gap: 5px; margin-top: 2px; }
.tcase .dots i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a3a; box-shadow: inset 0 0 0 1px #555; }
.tcase .dots i.m1 { background: #b8692c; } .tcase .dots i.m2 { background: #c8cdd3; }
.tcase .dots i.m3 { background: #f3c432; } .tcase .dots i.m4 { background: #8fa0b8; box-shadow: 0 0 0 1px #fff; }
@media (min-width: 900px) { .tshelf { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 420px) { .tshelf { gap: 6px; } .tcase b { font-size: 11px; } }

/* phones: the footer links run along the bottom under Jack, so the longer registered menu (six buttons) has room */
@media (max-width: 480px) {
  .menu-jack { bottom: 8%; }
  .menu-buttons { top: 37%; gap: 6px; }
  .menu-buttons button { padding-top: 6px; padding-bottom: 6px; }
  .menu-foot { left: 0; right: 0; width: 100%; bottom: 0.8%; gap: 0 16px; }
}
