:root {
  color-scheme: dark;
  font-family: Inter, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  color: #f7f7f8;
  background: #080808;
  --red: #f13b4d;
  --line: rgba(255,255,255,.09);
  --muted: #8c8c95;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-width: 320px; min-height: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  background: #080808;
}
a { color: inherit; text-decoration: none; }
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 430px at 50% -130px, rgba(241,59,77,.13), transparent 72%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: auto, 60px 60px, 60px 60px;
  mask-image: linear-gradient(#000, transparent 70%);
}
header, footer {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header { min-height: 76px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 760; letter-spacing: .12em; }
.brand img { display: block; width: 40px; height: 40px; object-fit: contain; border-radius: 12px; }
#account { display: flex; align-items: center; gap: 14px; color: #bebec5; font-size: 13px; }
button { color: var(--muted); font: inherit; background: none; border: 0; border-left: 1px solid var(--line); padding: 4px 0 4px 14px; cursor: pointer; }
button:hover { color: #fff; }
main { position: relative; z-index: 1; width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.centered { min-height: calc(100svh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero-logo { display: block; width: clamp(190px, 26vw, 300px); aspect-ratio: 1; object-fit: contain; border-radius: 25%; filter: drop-shadow(0 26px 50px rgba(0,0,0,.55)); margin-bottom: 42px; }
.discord-login { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 220px; padding: 14px 20px; color: #0d0d0f; background: #f7f7f8; border: 1px solid #fff; border-radius: 10px; font-size: 13px; font-weight: 700; transition: transform .15s, background .15s; }
.discord-login:hover { transform: translateY(-2px); background: #fff; }
.discord-login svg { width: 19px; fill: #0d0d0f; }
#loginError { max-width: 390px; margin-top: 18px; color: #f08a94; font-size: 12px; }
.loader { width: 26px; height: 26px; border: 2px solid #29292d; border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#modules { padding: clamp(56px, 9vh, 104px) 0 80px; }
.module-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.module-head span { color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: .22em; }
.module-head h1 { margin: 8px 0 0; font-size: clamp(34px, 5vw, 54px); line-height: .95; letter-spacing: -.055em; font-weight: 650; }
#moduleNotice { margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; max-width: 820px; padding-top: 24px; }
.app-card { position: relative; min-height: 220px; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, #151518, #0d0d0f); box-shadow: 0 20px 60px rgba(0,0,0,.3); transition: transform .18s, border-color .18s, box-shadow .18s; }
.app-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.22); box-shadow: 0 28px 70px rgba(0,0,0,.4); }
.app-icon { position: absolute; inset: 20px 20px auto auto; width: 74px; height: 74px; display: grid; place-items: center; border-radius: 20px; }
.app-icon svg { width: 42px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.app-icon svg path:not(.stand):nth-child(2) { fill: currentColor; stroke: none; }
.stream-card { background: radial-gradient(circle at 85% 10%, rgba(139,67,255,.38), transparent 43%), linear-gradient(145deg,#1c1329,#100d14); }
.stream-card .app-icon { color: #fff; background: linear-gradient(145deg,#9c54ff,#6f24e7); box-shadow: 0 14px 36px rgba(118,42,235,.32); }
.admin-card { background: radial-gradient(circle at 85% 10%, rgba(241,59,77,.3), transparent 43%), linear-gradient(145deg,#211114,#110d0e); }
.admin-card .app-icon { color: #fff; background: linear-gradient(145deg,#f04b5b,#bd2032); }
.app-name { font-size: 20px; font-weight: 700; letter-spacing: -.035em; }
.app-state { margin-top: 7px; color: #9b9ba4; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.app-card.locked { cursor: default; filter: saturate(.55); }
.app-card.locked:hover { transform: none; border-color: var(--line); }
.app-card.locked::after { content: "VUK+"; position: absolute; inset: 18px auto auto 18px; padding: 5px 8px; color: #fff; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
footer { min-height: 70px; border-top: 1px solid var(--line); color: #66666e; font-size: 10px; letter-spacing: .1em; }
footer nav { display: flex; gap: 22px; }
footer a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
@media (max-width: 620px) {
  header, main, footer { width: min(100% - 30px, 1120px); }
  .brand span { font-size: 11px; }
  #username { max-width: 115px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero-logo { width: min(240px, 68vw); margin-bottom: 34px; }
  #modules { padding-top: 42px; }
  .module-head { align-items: start; flex-direction: column; gap: 12px; }
  #moduleNotice { text-align: left; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .app-card { min-height: 0; padding: 15px; border-radius: 18px; }
  .app-icon { inset: 14px 14px auto auto; width: 56px; height: 56px; border-radius: 16px; }
  .app-icon svg { width: 32px; }
  .app-name { font-size: 16px; }
}
@media (max-width: 390px) { .app-grid { grid-template-columns: 1fr; } .app-card { aspect-ratio: 1.35; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
