/* PES 2013 Online -- visual language taken from the game's own menus:
   near-black backdrop, silver "chrome" capsules (the in-game status bar),
   charcoal dialog panels with a thin light bevel, bold white condensed
   type, a blue selection bar, and red/blue controller button glyphs.
   Original artwork only: no Konami logos or assets. */
:root {
  --bg: #06080c;
  --bg-2: #0d1117;
  --line: #3b424c;
  --bevel: #6b737e;
  --text: #f3f5f8;
  --muted: #9aa4b0;
  --blue: #2d8cff;
  --blue-deep: #0b4fb8;
  --blue-glow: rgba(45, 140, 255, .35);
  --red: #e5323b;
  --green: #36c96b;
  --amber: #f2b33d;
  --radius: 10px;
  --condensed: Bahnschrift, "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --panel: linear-gradient(180deg, #2a2f37 0%, #1c2027 55%, #15181e 100%);
  --chrome: linear-gradient(180deg, #fbfcfd 0%, #d9dee4 45%, #a9b1ba 50%, #c9cfd6 78%, #eef1f4 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 18% -8%, rgba(45, 140, 255, .28), transparent 70%),
    radial-gradient(700px 380px at 92% 4%, rgba(120, 170, 255, .14), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #0b0f16 0%, var(--bg) 60%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: #7db8ff; }
a:hover { color: #fff; }
code { font-family: ui-monospace, Consolas, monospace; background: #05070a; border: 1px solid #262c34; padding: .05em .4em; border-radius: 5px; }
h1, h2, h3, .brand, .btn, nav a, .tabs a, .capsule, .kicker, .stat b {
  font-family: var(--condensed);
  letter-spacing: .01em;
}
h1, h2, h3 { font-weight: 700; line-height: 1.15; }
h2 { font-size: 1.6rem; margin: 2em 0 .7em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* ---- header ---------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 3; background: linear-gradient(180deg, rgba(6, 8, 12, .96), rgba(6, 8, 12, .82)); border-bottom: 1px solid #1f252d; backdrop-filter: blur(6px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { color: var(--text); text-decoration: none; font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.brand em { font-style: normal; color: var(--blue); }
.crest { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, #cdd6e0 19% 45%, #6f7a86 46% 100%); box-shadow: 0 0 0 2px #0b0f16, 0 0 0 3px #aeb6bf, 0 0 14px var(--blue-glow); }
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; text-transform: uppercase; font-size: .95rem; }
nav a:hover, nav a.on { color: var(--blue); }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--text); cursor: pointer; font: inherit; font-family: var(--condensed); text-transform: uppercase; font-size: .95rem; padding: 0; }
button.link:hover { color: var(--blue); }

/* chrome capsule: the in-game status bar */
.capsule {
  display: inline-flex; align-items: center; gap: 12px; padding: 5px 16px; border-radius: 999px;
  background: var(--chrome); color: #1a1e24; font-weight: 700; font-size: .95rem;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8b939c, 0 0 0 1px #0a0d12, 0 0 0 2px #7d8690;
}
.capsule .sep { width: 1px; height: 16px; background: #7f8791; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i { width: 3px; background: #2a2f36; border-radius: 1px; }
.bars i:nth-child(1) { height: 5px; } .bars i:nth-child(2) { height: 8px; } .bars i:nth-child(3) { height: 11px; } .bars i:nth-child(4) { height: 14px; }
.bars.off i { background: #a1a8b0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.off { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dot.unknown { background: #8a929c; box-shadow: none; }

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em; border: 0; cursor: pointer; text-decoration: none;
  font-size: 1.05rem; font-weight: 700; text-transform: uppercase; color: #fff; padding: .65em 1.4em; border-radius: 6px;
  background: linear-gradient(180deg, #4aa0ff 0%, var(--blue) 45%, var(--blue-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 0 1px #06244f, 0 6px 18px rgba(20, 90, 200, .35);
}
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn.ghost { background: var(--panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px var(--bevel); }
.btn.small { font-size: .85rem; padding: .35em .9em; }
.btn.danger { background: linear-gradient(180deg, #ff6a70, var(--red) 50%, #9b1219); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 1px #3d0508; }
/* controller glyphs used as bullets */
.glyph { display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; border-radius: 50%; font-size: .75em; font-weight: 800; color: #fff; flex: none; font-family: var(--condensed); }
.glyph.x { background: radial-gradient(circle at 40% 35%, #6fb3ff, var(--blue-deep)); }
.glyph.o { background: radial-gradient(circle at 40% 35%, #ff8a8f, #b3141c); }

/* ---- hero ---------------------------------------------------------------- */
.hero { position: relative; padding: 64px 0 28px; }
.kicker { color: var(--blue); text-transform: uppercase; font-weight: 700; font-size: 1rem; letter-spacing: .12em; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin: 0 0 18px; text-transform: uppercase; max-width: 15ch; text-shadow: 0 2px 0 #000, 0 0 30px rgba(45, 140, 255, .25); }
.hero h1 span { color: var(--blue); }
.lead { font-size: 1.2rem; color: #c3cbd5; max-width: 640px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 22px; }
.hero-status { margin-top: 8px; }

/* pitch lines behind the hero */
.pitch { position: absolute; inset: 20px 0 auto auto; width: min(440px, 45%); aspect-ratio: 1.45; pointer-events: none; opacity: .5;
  border: 2px solid rgba(160, 200, 255, .18); border-radius: 6px;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 44px, rgba(160, 200, 255, .18) 45px 47px, transparent 48px),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(160, 200, 255, .18) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.pitch::before, .pitch::after { content: ""; position: absolute; top: 28%; width: 14%; height: 44%; border: 2px solid rgba(160, 200, 255, .18); }
.pitch::before { left: -2px; border-left: 0; }
.pitch::after { right: -2px; border-right: 0; }

/* ---- dialog panels (the in-game message box) --------------------------- */
.panel, .dialog {
  background: var(--panel); border-radius: var(--radius); padding: 26px 28px; margin: 34px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 0 0 1px #07090c, 0 0 0 2px var(--bevel), 0 18px 40px rgba(0, 0, 0, .55);
}
.panel.narrow { max-width: 500px; margin-left: auto; margin-right: auto; }
.panel h1 { margin-top: 0; text-transform: uppercase; font-size: 2rem; }

/* ---- menu list (the blue selection bar) -------------------------------- */
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu li {
  display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); border: 1px solid #242a32;
  transition: background .15s, border-color .15s;
}
.menu li:hover { background: linear-gradient(90deg, var(--blue) 0%, var(--blue-deep) 70%, rgba(11, 79, 184, .35) 100%); border-color: #62a8ff; }
.menu .num { font-family: var(--condensed); font-size: 1.9rem; font-weight: 700; color: #7db8ff; text-align: center; }
.menu li:hover .num, .menu li:hover p { color: #fff; }
.menu h3 { margin: 0; text-transform: uppercase; font-size: 1.15rem; }
.menu p { margin: 2px 0 0; color: var(--muted); }

/* ---- dashboard ---------------------------------------------------------- */
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.stat { background: var(--panel); border-radius: var(--radius); padding: 16px 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px #07090c, 0 0 0 2px #444b55; }
.stat small { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.stat b { display: block; font-size: 2.1rem; line-height: 1.1; margin-top: 4px; }
.stat b .unit { font-size: 1rem; color: var(--muted); }
.meter { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 14px; border: 0; border-radius: 999px; background: #05070a; box-shadow: inset 0 1px 3px #000, 0 0 0 1px #2c333c; overflow: hidden; margin-top: 10px; }
.meter::-webkit-progress-bar { background: #05070a; border-radius: 999px; }
.meter::-webkit-progress-value { border-radius: 999px; background: linear-gradient(180deg, #7cc0ff, var(--blue) 50%, var(--blue-deep)); }
.meter::-moz-progress-bar { border-radius: 999px; background: linear-gradient(180deg, #7cc0ff, var(--blue) 50%, var(--blue-deep)); }

.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.phase h2 { margin-top: 0; }
.phase h3 { margin: 0 0 12px; text-transform: uppercase; font-size: 1.2rem; }
.phase ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.phase li { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.phase li p { grid-column: 2; margin: 0; color: var(--muted); font-size: .92rem; }
.phase li strong { font-weight: 600; }
.badge { font-family: var(--condensed); font-size: .72rem; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; padding: .2em .6em; border-radius: 4px; white-space: nowrap; margin-top: .15em; }
.badge.done { background: rgba(54, 201, 107, .16); color: var(--green); box-shadow: inset 0 0 0 1px rgba(54, 201, 107, .5); }
.badge.active { background: rgba(45, 140, 255, .18); color: #8cc4ff; box-shadow: inset 0 0 0 1px rgba(45, 140, 255, .6); }
.badge.next { background: rgba(242, 179, 61, .15); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(242, 179, 61, .5); }
.badge.planned { background: rgba(154, 164, 176, .12); color: var(--muted); box-shadow: inset 0 0 0 1px rgba(154, 164, 176, .35); }

.notes { color: #c3cbd5; }
.notes li { margin: .35em 0; }

/* ---- forms / feedback ------------------------------------------------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form label small { font-weight: 400; color: var(--muted); }
.form input { font: inherit; padding: .65em .8em; border-radius: 6px; border: 1px solid #3a414b; background: #05070a; color: var(--text); box-shadow: inset 0 1px 3px #000; }
.form input:focus { outline: 2px solid var(--blue); border-color: transparent; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { margin-top: .3em; }
.error { background: rgba(229, 50, 59, .13); border: 1px solid var(--red); padding: .6em .9em; border-radius: 6px; }
.notice { background: rgba(242, 179, 61, .12); border: 1px solid var(--amber); padding: .6em .9em; border-radius: 6px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.tag { display: inline-block; font-size: .78rem; padding: .1em .55em; border-radius: 4px; background: #232932; color: var(--muted); }
.tag.ok { background: rgba(54, 201, 107, .15); color: var(--green); }
.tag.warn { background: rgba(242, 179, 61, .15); color: var(--amber); }
.tag.bad { background: rgba(229, 50, 59, .15); color: #ff7b81; }
.secret { background: #05070a; border: 1px dashed var(--blue); border-radius: var(--radius); padding: 12px 18px; }
.secret .big { font-size: 1.9rem; letter-spacing: .1em; margin: .2em 0; }
.wrap-code { word-break: break-all; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: .3em .9em; border-radius: 4px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); text-transform: uppercase; }
.tabs a.active { color: #fff; background: linear-gradient(180deg, var(--blue), var(--blue-deep)); border-color: #62a8ff; }
.search { display: flex; gap: 8px; margin-bottom: 8px; }
.search input { flex: 1; font: inherit; padding: .45em .7em; border-radius: 6px; border: 1px solid var(--line); background: #05070a; color: var(--text); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #262c34; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.actions form { margin: 0 4px 4px 0; }
.nowrap { white-space: nowrap; }
.audit { color: var(--muted); font-size: .9rem; }

/* ---- footer: controller hint bar ------------------------------------- */
.foot { color: var(--muted); font-size: .85rem; padding: 26px 16px 46px; border-top: 1px solid #1a1f26; margin-top: 50px; }
.hints { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 12px; }
.hints a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-family: var(--condensed); text-transform: uppercase; }
.hints a:hover { color: var(--blue); }

@media (max-width: 720px) {
  .top { position: static; }
  .pitch { display: none; }
  .panel, .dialog { padding: 20px; }
  .facts { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .menu li { grid-template-columns: 40px 1fr; }
}

/* ---- admin: players ----------------------------------------------------- */
.wrap.wide { max-width: 1480px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-title h1 { margin: 0; }
.panel-title .search { flex: 0 1 420px; margin: 0; }
table.players td { vertical-align: middle; }
table.players tbody tr:hover { background: rgba(45, 140, 255, .08); }
.player-link { color: var(--text); text-decoration: none; }
.player-link:hover { color: var(--blue); }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: #0b0f16; box-shadow: 0 0 0 2px var(--bevel); image-rendering: pixelated; vertical-align: middle; }
.avatar.blank { font-family: var(--condensed); font-weight: 700; color: #7db8ff; background: radial-gradient(circle at 35% 30%, #2a3240, #10151c); }
.avatar.big { width: 112px; height: 112px; font-size: 2.6rem; box-shadow: 0 0 0 3px var(--bevel), 0 0 24px var(--blue-glow); }
.avatar-cell { width: 56px; }
.player-head { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.player-head h1 { margin: 0 0 4px; }
.player-head p { margin: 4px 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 20px; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: #0b0f16; border: 1px solid #262c34; border-radius: 999px; padding: .2em .8em; }
@media (max-width: 720px) {
  .player-head { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
.panel > h2:first-child, .panel > h1:first-child { margin-top: 0; }
.panel .dash + .table-wrap { margin-top: 16px; }
