
:root{--bg:#0b0e13;--panel:#111720;--panel2:#171f2b;--text:#f3f5f7;--muted:#9aa6b2;--line:#263142;--accent:#f0b84b;--accent2:#ffd67e;--danger:#e35d6a;--success:#5fd18d;--shadow:0 20px 70px rgba(0,0,0,.35)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:radial-gradient(circle at 20% -10%,rgba(240,184,75,.08),transparent 30%),radial-gradient(circle at 110% 80%,rgba(91,121,255,.06),transparent 35%),var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}a{color:inherit;text-decoration:none}button,input{font:inherit}.shell{width:min(1180px,calc(100% - 48px));margin:auto;padding:28px 0 60px}.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:48px}.brand{display:flex;align-items:center;gap:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.brand-mark{width:42px;height:42px;border-radius:12px;background:#121923;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;box-shadow:0 8px 24px rgba(0,0,0,.22);overflow:hidden}.ghost-btn,.primary-btn,.danger-btn,.secondary-btn,.icon-btn{border:1px solid var(--line);border-radius:12px;padding:12px 16px;background:#121923;color:var(--text);cursor:pointer;transition:.18s}.ghost-btn:hover,.secondary-btn:hover,.icon-btn:hover{transform:translateY(-1px);border-color:#3c4a60;background:#171f2b}.primary-btn{background:linear-gradient(180deg,var(--accent2),var(--accent));border-color:#e1a63a;color:#17130b;font-weight:800}.primary-btn:hover{transform:translateY(-1px);filter:brightness(1.04)}.danger-btn{background:rgba(227,93,106,.12);border-color:rgba(227,93,106,.35);color:#ff9ba6}.hero{min-height:65vh;display:flex;align-items:center;justify-content:center}.mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,360px));justify-content:center;gap:24px;width:100%}.mode-card{position:relative;aspect-ratio:1/1;min-height:0;border:1px solid var(--line);border-radius:26px;padding:32px;background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.01)),var(--panel);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;transition:.2s}.mode-card:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 70% 20%,rgba(240,184,75,.14),transparent 38%)}.mode-card:hover{transform:translateY(-1px);border-color:#46536a}.mode-card h1,.mode-card p,.mode-kicker{position:relative}.mode-card h1{margin:0 0 8px;font-size:34px;line-height:1.05}.mode-card p{color:var(--muted);margin:0}.mode-kicker{color:var(--accent2);font-size:13px;text-transform:uppercase;letter-spacing:.12em;font-weight:800;margin-bottom:10px}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:26px}.page-head h1{font-size:42px;margin:0 0 8px}.page-head p{margin:0;color:var(--muted)}.games-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:20px}.cover{aspect-ratio:1;border-radius:18px;overflow:hidden;border:1px solid var(--line);background:var(--panel);box-shadow:0 14px 40px rgba(0,0,0,.24);transition:.18s;padding:12px;box-sizing:border-box}.cover img{width:100%;height:100%;object-fit:contain;display:block;border-radius:12px}.game-card:hover .cover{transform:translateY(-3px);border-color:#49566b}.game-title{font-weight:750;margin-top:11px;text-align:center}.game-meta,.small{color:var(--muted);font-size:13px;margin-top:4px}.panel{background:rgba(17,23,32,.94);border:1px solid var(--line);border-radius:20px;padding:24px;box-shadow:var(--shadow)}.setup-wrap{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:24px}.setup-game{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:center}.setup-cover{width:180px;aspect-ratio:1;border-radius:18px;overflow:hidden;border:1px solid var(--line);background:var(--panel);padding:10px;box-sizing:border-box}.setup-cover img{width:100%;height:100%;object-fit:contain;display:block;border-radius:12px}.field{margin-top:18px}.field label{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}.input{width:100%;border:1px solid var(--line);border-radius:12px;background:#0e141c;color:var(--text);padding:14px;outline:none}.controller-box{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--line);border-radius:14px;padding:15px;background:#0e141c}.controller-status{display:flex;align-items:center;gap:10px}.dot{width:9px;height:9px;border-radius:50%;background:#6f7b8d;box-shadow:0 0 0 4px rgba(111,123,141,.12)}.dot.ok{background:var(--success);box-shadow:0 0 0 4px rgba(95,209,141,.12)}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.sep{height:1px;background:var(--line);margin:20px 0}.room-list{display:grid;gap:12px}.room-row{display:grid;grid-template-columns:1.6fr .7fr .7fr auto;gap:14px;align-items:center;padding:16px;border:1px solid var(--line);border-radius:15px;background:#0f151e}.room-name{font-weight:750}.badge{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:6px 9px;font-size:12px;color:var(--muted)}.badge.live{color:#ffc1c7;border-color:rgba(227,93,106,.3);background:rgba(227,93,106,.08)}.badge.wait{color:#ffe2a7;border-color:rgba(240,184,75,.3);background:rgba(240,184,75,.08)}.player-list,.status-stack{display:grid;gap:10px;margin-top:18px}.player-row,.status-card{display:flex;align-items:center;justify-content:space-between;padding:14px;border:1px solid var(--line);border-radius:13px;background:#0e141c}.emu-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px}.emu-screen{aspect-ratio:4/3;border-radius:18px;border:1px solid #2b3546;background:#050608;display:grid;place-items:center}.screen-placeholder{text-align:center;color:#7f8a98}.screen-placeholder strong{display:block;color:#dfe5ec;font-size:22px;margin-bottom:8px}.status-card{display:block}.status-card .label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.status-card .value{font-weight:750;margin-top:5px}.notice{border:1px solid rgba(240,184,75,.28);background:rgba(240,184,75,.07);color:#f5db9f;padding:12px 14px;border-radius:12px;font-size:13px}.table{width:100%;border-collapse:separate;border-spacing:0 10px}.table th{color:var(--muted);font-size:12px;text-align:left;padding:0 12px}.table td{background:#0f151e;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:14px 12px}.table td:first-child{border-left:1px solid var(--line);border-radius:12px 0 0 12px}.table td:last-child{border-right:1px solid var(--line);border-radius:0 12px 12px 0}.login-wrap{min-height:70vh;display:grid;place-items:center}.login-card{width:min(420px,100%)}@media(max-width:800px){.mode-grid{grid-template-columns:minmax(0,360px);justify-content:center}.setup-wrap,.emu-layout{grid-template-columns:1fr}.mode-card{min-height:0}.setup-game{grid-template-columns:120px 1fr}.setup-cover{width:120px}.room-row{grid-template-columns:1fr 1fr}.page-head{align-items:flex-start;flex-direction:column}}@media(max-width:560px){.shell{width:min(100% - 24px,1180px);padding-top:16px}.brand span:last-child{display:none}.mode-grid{grid-template-columns:1fr}.page-head h1{font-size:34px}.games-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.setup-game{grid-template-columns:1fr}.setup-cover{width:100%;max-width:220px}}

.brand b{color:var(--accent2);font-weight:900}
.controller-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}
.controller-actions .secondary-btn,.controller-actions .ghost-btn{width:100%}
.game-stage{min-height:calc(100vh - 150px);display:flex;flex-direction:column;align-items:center}
.game-heading{text-align:center;margin:4px 0 20px}
.game-heading h1{font-size:38px;margin:0}
.game-center{width:100%;display:flex;justify-content:center;align-items:center}
.emulator-panel{width:min(900px,100%)}
.game-status-row{width:min(900px,100%);display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}
.game-status-row .status-card{margin:0}
@media(max-width:700px){
  .controller-actions{grid-template-columns:1fr 1fr}
  .game-status-row{grid-template-columns:1fr}
}
@media(max-width:460px){
  .controller-actions{grid-template-columns:1fr}
}


/* VCC_HOME_CAPTIONS_V2_6 */
.mode-item{
  width:100%;
  display:flex;
  flex-direction:column;
}
.mode-item .mode-card{
  width:100%;
}
.mode-caption{
  margin:12px 32px 0;
  color:rgba(154,166,178,.72);
  font-size:14px;
  line-height:1.42;
  font-weight:400;
}

.brand-emoji{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:22px;line-height:1;transform:translateY(-4px)}


/* VCC_SETUP_LABELS_V2_8 */
.controller-title{
  color:var(--text);
  font-size:18px;
  line-height:1.2;
  font-weight:700;
  margin-bottom:10px;
}


/* VCC_CONTROLLER_CAPTURE_V2_9 */
.dot.waiting{
  background:var(--accent);
  box-shadow:0 0 0 4px rgba(240,184,75,.14),0 0 14px rgba(240,184,75,.30);
}


/* VCC_CHALLENGE_RUNTIME_V3_3 */
.runtime-panel{padding:16px}
.runtime-screen{position:relative;overflow:hidden}
.runtime-screen canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  background:#000;
  object-fit:contain;
  image-rendering:pixelated;
  outline:none;
}
.runtime-overlay{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding:28px;
  text-align:center;
  background:rgba(5,6,8,.90);
  transition:opacity .18s ease,visibility .18s ease;
}
.runtime-overlay.hidden{opacity:0;visibility:hidden;pointer-events:none}
.runtime-status{color:var(--muted);font-size:14px;line-height:1.45}
.runtime-progress{width:min(520px,80%);height:12px;accent-color:var(--accent)}
.runtime-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.runtime-actions button:disabled{opacity:.45;cursor:default;transform:none}
.runtime-cache-btn{font-size:13px}
.runtime-log{width:100%;max-height:180px;overflow:auto;margin:12px 0 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:#090d12;color:var(--muted);font:12px/1.4 Consolas,monospace;white-space:pre-wrap}
@media(max-width:560px){.runtime-panel{padding:8px}.runtime-overlay{padding:16px}.runtime-progress{width:92%}.runtime-actions{width:100%}.runtime-actions button{width:100%}}


/* VCC_GAMEPAD_MODAL_V3_4 */
#vcc-gamepad-overlay{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(5,8,12,.78);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
#vcc-gamepad-box{
  width:min(520px,100%);
  padding:24px;
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(17,23,32,.98);
  color:var(--text);
  font-family:inherit;
  box-shadow:var(--shadow);
}
.vcc-gamepad-kicker{
  margin-bottom:10px;
  color:var(--accent2);
  font-size:12px;
  font-weight:800;
  letter-spacing:.12em;
}
.vcc-gamepad-title{
  margin:0 0 12px;
  color:var(--text);
  font-size:28px;
  line-height:1.15;
}
.vcc-gamepad-text{
  color:var(--muted);
  font-size:15px;
  line-height:1.55;
  white-space:pre-line;
}
.vcc-gamepad-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-top:22px;
}
.vcc-gamepad-actions button{
  min-width:110px;
}
@media(max-width:560px){
  #vcc-gamepad-overlay{padding:12px}
  #vcc-gamepad-box{padding:20px;border-radius:18px}
  .vcc-gamepad-title{font-size:24px}
  .vcc-gamepad-actions{flex-direction:column-reverse}
  .vcc-gamepad-actions button{width:100%}
}


/* VCC_RUNTIME_OVERLAY_V3_5 */
.runtime-overlay{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:28px;
  text-align:center;
  background:rgba(5,6,8,.90);
  transition:opacity .18s ease,visibility .18s ease;
}
.runtime-overlay.hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.runtime-loading{
  width:min(520px,80%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
}
.runtime-loading[hidden]{display:none}
.runtime-status{
  width:100%;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
  text-align:center;
}
.runtime-progress{
  display:block;
  width:100%;
  height:10px;
  accent-color:var(--accent);
}
.runtime-start-btn{
  min-width:190px;
}
.runtime-start-btn[hidden]{display:none}
@media(max-width:560px){
  .runtime-loading{width:92%}
  .runtime-start-btn{width:min(260px,100%)}
}


/* VCC_GAME_LAYOUT_V3_6 */
.game-page-main{
  padding-top:8px;
}
.game-page-main .page-head{
  margin-top:0;
  margin-bottom:14px;
}
.game-page-main .page-head h1{
  margin-top:0;
  margin-bottom:0;
}
.game-page-main .emu-shell{
  margin-top:0;
}


/* VCC_HOME_CARD_TITLE_TUNE_V5_2 */
body[data-page="home"] .mode-card{
  padding:28px;
}
body[data-page="home"] .mode-card h1{
  margin:0;
  font-size:clamp(28px,2.7vw,32px);
  line-height:.96;
  letter-spacing:-.02em;
}
body[data-page="home"] .mode-card .mode-kicker{
  margin-bottom:14px;
}
body[data-page="home"] .mode-caption{
  margin-top:10px;
  font-size:13px;
  color:rgba(154,166,178,.66);
}


/* VCC_HOME_TITLE_SPACING_V5_3 */
body[data-page="home"] .mode-card h1{
  line-height:1.06;
  font-size:clamp(27px,2.45vw,31px);
  letter-spacing:-0.02em;
  max-width:11ch;
}
body[data-page="home"] .mode-card .mode-kicker{
  margin-bottom:16px;
}
body[data-page="home"] .mode-item:nth-child(2) .mode-card h1{
  max-width:9ch;
}
body[data-page="home"] .mode-card br{
  display:block;
  content:"";
}


/* VCC_HOME_TITLE_LAYOUT_FIX_V5_4 */
body[data-page="home"] .mode-card h1{
  margin:0;
  font-size:clamp(27px,2.45vw,31px);
  line-height:1.03;
  letter-spacing:-0.02em;
  max-width:none;
}
body[data-page="home"] .mode-card h1 br{
  display:block;
}
body[data-page="home"] .mode-card .mode-kicker{
  margin-bottom:14px;
}
body[data-page="home"] .mode-caption{
  margin-top:12px;
  color:rgba(154,166,178,.66);
}


/* VCC_HOME_TITLE_FINAL_V5_5 */
body[data-page="home"] .mode-card .home-mode-title,
body[data-page="home"] .mode-item:nth-child(2) .mode-card .home-mode-title{
  margin:0;
  width:auto;
  max-width:none !important;
  font-size:30px;
  line-height:1.06;
  letter-spacing:-0.02em;
}
body[data-page="home"] .mode-card .home-mode-title span{
  display:block;
  white-space:nowrap;
}
body[data-page="home"] .mode-card .mode-kicker{
  margin-bottom:14px;
}


/* VCC_NETPLAY_RTT_DISPLAY_CSS_V1 */
body[data-page="game"] .game-status-row{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
body[data-page="game"] .vcc-ping-card .value{
  font-variant-numeric:tabular-nums;
}
@media(max-width:850px){
  body[data-page="game"] .game-status-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  body[data-page="game"] .game-status-row{
    grid-template-columns:1fr;
  }
}


/* VCC_MEDNAFEN_NATIVE_PING_CSS_V2 */
body[data-page="game"] .game-status-row{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
body[data-page="game"] .vcc-ping-card .value{
  font-variant-numeric:tabular-nums;
}
@media(max-width:850px){
  body[data-page="game"] .game-status-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  body[data-page="game"] .game-status-row{
    grid-template-columns:1fr;
  }
}

/* VCC_BRAND_IMAGE_V1 */
.brand-logo-img{
  width:31px;
  height:32px;
  object-fit:contain;
  object-position:center center;
  display:block;
  transform:translateX(0px);
}


/* VCC_GLOBAL_SITE_BACKGROUND_V1 */
body{
  min-height:100vh;
  background:
    linear-gradient(
      90deg,
      rgba(6,10,16,.58) 0%,
      rgba(6,10,16,.28) 45%,
      rgba(6,10,16,.48) 100%
    ),
    url("../images/main-page-bg.png") center center / cover no-repeat fixed;
  background-color:var(--bg);
}

@media(max-width:800px){
  body{
    background-attachment:scroll;
  }
}


/* VCC_GLOBAL_HEADER_GEOMETRY_V1 */

/* Одна и та же ширина и позиция шапки на каждой странице. */
.topbar{
  width:min(1180px,calc(100vw - 40px));
  margin-left:auto;
  margin-right:auto;
}

/* Внутренности бренда тоже всегда одинаковы. */
.brand-mark{
  flex:0 0 42px;
  width:42px;
  height:42px;
}

.brand-logo-img{
  width:31px;
  height:32px;
  object-fit:contain;
  object-position:center center;
  display:block;
  transform:translateX(0px);
}

@media(max-width:560px){
  .topbar{
    width:calc(100vw - 24px);
  }
}

/* VCC_GLOBAL_SCROLLBAR_ALIGNMENT_V1
   Всегда одинаковая ширина viewport на всех страницах. */
html{
  overflow-y:scroll !important;
}

/* VCC_ADMIN_ACTIONS_ALIGN_V1 */
body[data-page="admin"] .table th:last-child,
body[data-page="admin"] .table td:last-child{
  width:1%;
  white-space:nowrap;
  text-align:right;
}

body[data-page="admin"] .table td:last-child .ghost-btn,
body[data-page="admin"] .table td:last-child .secondary-btn,
body[data-page="admin"] .table td:last-child .primary-btn{
  display:inline-flex;
  justify-content:center;
}

/* VCC_CHALLENGE_ROOMS_ADMIN_V1 */
body[data-page="admin"] .table th:last-child,
body[data-page="admin"] .table td:last-child{
  width:1%;
  min-width:132px;
  white-space:nowrap;
  text-align:right;
}

body[data-page="admin"] .table td:last-child .secondary-btn{
  min-width:112px;
  justify-content:center;
}

body[data-page="admin"] .table button[disabled]{
  opacity:.42;
  cursor:default;
  transform:none;
}
