:root {
  --bg: #080b10;
  --bg-2: #111720;
  --surface: rgba(255, 255, 255, 0.075);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f7fa;
  --muted: #a7b0bd;
  --line: rgba(255, 255, 255, 0.15);
  --accent: #f3c766;
  --accent-2: #f0b84f;
  --accent-ink: #161107;
  --green: #42df91;
  --red: #ff6b6b;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="emerald"] { --accent: #63e6a6; --accent-2: #29bd74; --accent-ink: #06130d; }
:root[data-theme="ruby"] { --accent: #ff8585; --accent-2: #da4b5d; --accent-ink: #1b080b; }
:root[data-theme="ice"] { --accent: #8dd8ff; --accent-2: #4da7e8; --accent-ink: #06121b; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 8%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34rem),
    radial-gradient(circle at 88% 20%, rgba(77, 167, 232, 0.11), transparent 31rem),
    linear-gradient(155deg, #06080d 0%, #111720 54%, #07100d 100%);
}
body[data-page="home"],
body[data-page="destek"],
body[data-page="admin"],
body[data-page="harita"] {
  height: 100dvh;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #080b10;
  background-size: 28px 28px;
  opacity: 1;
  visibility: visible;
  transition: opacity 320ms ease, visibility 320ms ease;
  animation: loaderFallback 400ms ease 8s forwards;
}
.site-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { display: grid; justify-items: center; gap: 11px; }
.loader-logo {
  width: 78px;
  height: 78px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius);
  object-fit: cover;
  background: #111720;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
  animation: loaderPulse 1.5s ease-in-out infinite;
}
.loader-logo-fallback { display: grid; place-items: center; color: var(--accent); font-size: 1.35rem; font-weight: 950; }
.loader-content strong { font-size: 1.2rem; }
.loader-content span { color: var(--muted); font-size: 0.84rem; }
.loader-bar { width: 150px; height: 3px; margin-top: 5px; overflow: hidden; background: rgba(255,255,255,.1); }
.loader-bar::after { content: ""; display: block; width: 45%; height: 100%; background: var(--accent); animation: loaderMove 1s ease-in-out infinite; }
.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#app { min-width: 0; min-height: 0; }
body[data-page="home"] .site-shell,
body[data-page="destek"] .site-shell,
body[data-page="admin"] .site-shell,
body[data-page="harita"] .site-shell {
  height: 100dvh;
  min-height: 0;
}
body[data-page="home"] .footer,
body[data-page="destek"] .footer,
body[data-page="admin"] .footer,
body[data-page="harita"] .footer { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 16, 0.82);
}
.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: fit-content; font-weight: 900; }
.brand-logo, .brand-logo-fallback {
  width: 46px;
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, transparent);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #28313f, #0e141d);
}
.brand-logo { object-fit: cover; }
.brand-logo-fallback { display: grid; place-items: center; color: var(--accent); font-weight: 950; }
.brand-text { display: grid; gap: 2px; }
.brand-text strong { font-size: 1.02rem; }
.brand-text span { color: var(--muted); font-size: 0.78rem; font-weight: 650; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-links a, .nav-action, .icon-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 760;
  cursor: pointer;
}
.nav-links a:hover, .nav-links a.active, .nav-action:hover, .icon-button:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.075);
}
.mobile-toggle { display: none; }

.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 70px; }
.home-page {
  height: 100%;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 18% 16%, rgba(239, 102, 117, 0.12), transparent 31rem),
    radial-gradient(circle at 84% 28%, rgba(77, 167, 232, 0.1), transparent 32rem);
  background-size: 28px 28px, 28px 28px, auto, auto;
}
.home-page::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 9%;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.5);
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}
.hero {
  width: min(620px, calc(100% - 32px));
  display: block;
  padding: 34px 0 48px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero h1, .page-title h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}
.hero h1 { text-shadow: 0 12px 42px rgba(0, 0, 0, 0.48); }
.page-title h1 { font-size: clamp(2.2rem, 5vw, 4.35rem); }
.hero p, .page-title p, .support-header p {
  margin: 22px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}
.hero p { margin-inline: auto; max-width: 590px; }
.hero-copy { display: grid; justify-items: center; width: 100%; }
.ip-card {
  margin-top: 28px;
  width: min(100%, 440px);
  border: 1px solid rgba(66, 223, 145, 0.28);
  border-radius: var(--radius);
  padding: 10px 10px 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(66, 223, 145, 0.08);
  color: #d9ffe9;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 18px 50px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}
.ip-card > div { display: grid; gap: 2px; }
.ip-card span { color: #9ac8ac; font-size: 0.76rem; font-weight: 750; }
.ip-card strong { font-size: 1rem; }
.copy-button { border-color: rgba(66, 223, 145, 0.2); color: #d9ffe9; }
.copy-button span { color: inherit; font-size: 0.82rem; }

.home-actions {
  width: min(100%, 440px);
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.home-actions .btn { backdrop-filter: blur(10px); }
.support-wide { grid-column: 1 / -1; }
.ranking-home-link { border-color: rgba(243, 199, 102, 0.28); color: #ffe9af; }
.btn {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  font-size: 0.91rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: rgba(255, 255, 255, 0.13); }
.btn.primary { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn.whatsapp { border-color: rgba(66, 223, 145, 0.36); color: #06130d; background: linear-gradient(135deg, #78f0b1, #2ccc78); }
.btn.compact { min-height: 38px; padding: 0 12px; font-size: 0.79rem; }
.btn.danger { border-color: rgba(255, 107, 107, 0.36); color: #ffb1b1; background: rgba(255, 107, 107, 0.09); }
.btn:disabled, .icon-button:disabled { opacity: 0.48; cursor: not-allowed; transform: none; }

.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
}
.server-frame {
  min-height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(145deg, #16212d, #1b2b22 55%, #45351c);
  background-size: 28px 28px, 28px 28px, cover;
  position: relative;
}
.terrain {
  position: absolute;
  width: 140px;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  transform: rotate(45deg);
}
.terrain-one { right: 30px; bottom: 30px; }
.terrain-two { width: 88px; left: 38px; top: 38px; border-color: rgba(90, 169, 255, 0.32); background: rgba(90, 169, 255, 0.12); }
.server-content { position: absolute; inset: 24px; z-index: 2; display: grid; align-content: end; gap: 14px; }
.server-content h2 { margin: 0; max-width: 390px; font-size: clamp(1.7rem, 3.4vw, 3.2rem); line-height: 1; }
.server-content p { margin: 0; color: #dce6f2; line-height: 1.55; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: rgba(0, 0, 0, 0.3); }
.stat strong { display: block; font-size: 1.35rem; }
.stat span { color: var(--muted); font-size: 0.82rem; }

.section { padding: 38px 0; }
.section-head, .support-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-head h2, .panel h2, .support-header h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.35rem); }
.section-head p { margin: 8px 0 0; max-width: 620px; color: var(--muted); line-height: 1.6; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.store-page { width: min(1120px, calc(100% - 32px)); }
.store-page .page-title { text-align: center; padding-top: 8px; }
.store-page .page-title h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.store-page .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.product-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24); }
.product-media { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #172231, #0d141d); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.product-card:hover .product-media img { transform: scale(1.035); }
.product-fallback { width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--radius); color: var(--accent); font-weight: 950; background: rgba(0, 0, 0, 0.18); }
.product-body { padding: 11px; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.product-title { margin: 0 0 2px; font-size: 0.88rem; line-height: 1.2; }
.price { color: var(--accent); font-size: 1.05rem; font-weight: 950; }
.product-buy { min-height: 36px; padding: 0 11px; font-size: 0.77rem; flex: 0 0 auto; }

.map-page { height: 100%; min-height: 0; }
.map-wrap, .map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-wrap { background: var(--surface); }

.login-page { min-height: 100%; display: grid; place-items: center; padding: 40px 16px; position: relative; }
.login-brand { position: absolute; top: 28px; left: 32px; display: flex; align-items: center; gap: 10px; }
.login-brand img { width: 38px; height: 38px; border-radius: var(--radius); object-fit: cover; }
.login-panel { width: min(440px, 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: #111720; box-shadow: var(--shadow); }
.login-panel h1 { margin: 0; font-size: 2rem; }
.login-panel > p { color: var(--muted); line-height: 1.6; }
.login-note { margin-top: 14px; color: var(--muted); text-align: center; font-size: 0.82rem; }
.recaptcha-note { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 0.76rem; line-height: 1.4; text-align: center; }
.recaptcha-note svg { flex: 0 0 auto; color: var(--green); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 22px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(0, 0, 0, 0.2); }
.auth-tab { min-height: 40px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-weight: 850; cursor: pointer; }
.auth-tab.active { color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.panel, .ticket-list-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}
.support-page {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.support-header { align-items: center; }
.support-header p { margin-top: 6px; }
.support-home { max-width: 820px; }
.admin-support-page .support-home { max-width: 980px; }
.support-state { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; color: var(--muted); font-size: 0.82rem; background: rgba(0, 0, 0, 0.15); }
.support-state.online { color: #a8f5ca; border-color: rgba(66, 223, 145, 0.25); }
.support-state.error { color: #ffb1b1; border-color: rgba(255, 107, 107, 0.3); }
.ticket-list { display: grid; gap: 9px; margin-top: 12px; }
.ticket-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}
.ticket-item:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.085); }
.ticket-item small { display: block; margin-top: 4px; color: var(--muted); }
.ticket-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #07120d; background: var(--green); }
.status { width: fit-content; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 8px; color: var(--green); font-size: 0.73rem; font-weight: 850; }
.ticket-create-view { max-width: 720px; }
.create-ticket-panel { margin-top: 14px; }
.back-button { border: 0; padding: 8px 0; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.form-grid { display: grid; gap: 12px; margin-top: 16px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 0.88rem; font-weight: 760; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; color: var(--text); background: rgba(0, 0, 0, 0.22); outline: none; }
input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--accent) 65%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
textarea { min-height: 126px; resize: vertical; }
select option { color: #111; }

.chat-view { max-width: 900px; margin: 0 auto; }
.chat-shell { height: min(680px, calc(100dvh - 240px)); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; background: #0c1218; box-shadow: var(--shadow); }
.chat-topbar { min-height: 68px; padding: 10px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #151c25; }
.chat-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.chat-identity > span:last-child { min-width: 0; display: grid; gap: 3px; }
.chat-identity strong, .chat-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-identity small { color: var(--muted); font-size: 0.74rem; font-weight: 650; }
.chat-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; color: #07120d; background: linear-gradient(135deg, var(--green), #8ff1bf); font-size: 0.72rem; font-weight: 950; }
.chat-stream { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 20px; background: linear-gradient(45deg, rgba(255,255,255,.022) 25%, transparent 25%), #0c1218; background-size: 24px 24px; scroll-behavior: smooth; }
.bubble { max-width: min(78%, 620px); border-radius: 4px 14px 14px 14px; padding: 10px 12px; line-height: 1.48; overflow-wrap: anywhere; background: #202a35; box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16); }
.bubble.me { align-self: flex-end; border-radius: 14px 4px 14px 14px; color: #07120d; background: #83ecb7; }
.bubble a { text-decoration: underline; font-weight: 700; }
.bubble small { display: block; margin-top: 5px; text-align: right; opacity: 0.66; font-size: 0.7rem; }
.chat-compose { padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 9px; border-top: 1px solid var(--line); background: #151c25; }
.chat-compose input { border-radius: 22px; background: #0e151d; }
.send-button { width: 46px; min-height: 46px; border-radius: 50%; color: #07120d; background: var(--green); }
.cooldown { min-height: 22px; padding: 2px 16px 6px; color: #ffc0c0; text-align: right; font-size: 0.75rem; background: #151c25; }
.chat-cleared { min-height: 420px; display: grid; place-content: center; justify-items: center; gap: 9px; text-align: center; color: var(--muted); }
.chat-cleared strong { color: var(--text); font-size: 1.4rem; }

.profile-page {
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  padding: 52px 16px 76px;
}
.profile-layout { width: min(560px, 100%); display: grid; gap: 16px; }
.profile-layout.admin-mode {
  width: min(1120px, 100%);
  grid-template-columns: minmax(360px, 0.8fr) minmax(520px, 1.2fr);
  align-items: start;
}
.profile-card { display: grid; gap: 14px; padding: 20px; }
.avatar-row { display: flex; align-items: center; gap: 16px; }
.avatar-row h2 { margin: 0 0 7px; }
.mc-avatar { width: 86px; height: 86px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--radius); image-rendering: pixelated; object-fit: cover; background: rgba(0, 0, 0, 0.18); }
.avatar-fallback { place-items: center; color: var(--accent); font-size: 1.25rem; font-weight: 950; }
.membership-box { border-left: 3px solid var(--accent); padding: 12px 14px; display: grid; gap: 4px; background: color-mix(in srgb, var(--accent) 9%, transparent); }
.membership-box span { color: var(--muted); font-size: 0.88rem; }
.profile-info { display: grid; }
.info-row { border-bottom: 1px solid var(--line); padding: 12px 0; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.info-row strong { color: var(--text); text-align: right; }
.theme-settings { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-swatches { display: flex; gap: 9px; }
.swatch { width: 30px; height: 30px; border: 2px solid rgba(255,255,255,.42); border-radius: 50%; cursor: pointer; }
.swatch.gold { background: #f3c766; }
.swatch.emerald { background: #42df91; }
.swatch.ruby { background: #ef6675; }
.swatch.ice { background: #70c7f6; }
.profile-resources { display: grid; gap: 7px; padding-top: 2px; }
.profile-resources button {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}
.profile-resources button:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 42%, transparent); background: rgba(255, 255, 255, 0.07); }
.profile-resources button > svg:first-child { color: var(--accent); }
.profile-resources button > svg:last-child { transform: rotate(180deg); }
.profile-resources button span { min-width: 0; display: grid; gap: 3px; }
.profile-resources button strong { color: var(--text); font-size: 0.86rem; }
.profile-resources button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.72rem; }
.admin-management { min-width: 0; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.admin-heading p { margin: 4px 0 0; color: var(--muted); font-size: 0.84rem; }
.admin-users { display: grid; gap: 8px; max-height: min(58vh, 560px); overflow-y: auto; padding-right: 4px; }
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, 0.65fr) 145px auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.14);
}
.admin-user-name { min-width: 0; display: grid; gap: 3px; }
.admin-user-name strong,
.admin-user-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-name span { color: var(--muted); font-size: 0.75rem; }
.admin-delete-user { width: 40px; padding: 0; color: #ff9ca7; }
.database-reset { display: grid; gap: 7px; padding-top: 4px; }
.database-reset small { color: var(--muted); text-align: center; font-size: 0.72rem; line-height: 1.45; }

.ranking-page { width: min(980px, calc(100% - 32px)); }
.ranking-heading { margin-bottom: 28px; text-align: center; }
.ranking-heading span { display: block; margin-bottom: 8px; color: var(--accent); font-size: 0.78rem; font-weight: 850; text-transform: uppercase; }
.ranking-heading h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; }
.ranking-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ranking-choice {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(0,0,0,.22);
}
.ranking-choice:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--surface-strong); }
.ranking-choice > svg:last-child { transform: rotate(180deg); color: var(--muted); }
.ranking-choice > span:nth-child(2) { display: grid; gap: 5px; }
.ranking-choice small { color: var(--muted); line-height: 1.4; }
.ranking-choice-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.ranking-description { max-width: 760px; margin: 24px auto 0; color: var(--muted); text-align: center; line-height: 1.75; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; margin-bottom: 18px; }
.podium-player { position: relative; min-height: 220px; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 14px 18px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; background: var(--surface); }
.podium-player.place-1 { min-height: 250px; border-color: rgba(243,199,102,.46); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.player-avatar { position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); border-radius: var(--radius); color: var(--accent); background: #111923; font-weight: 950; }
.player-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.podium-player .player-avatar { width: 96px; height: 96px; font-size: 1.2rem; }
.podium-player span:last-child { color: var(--accent); font-weight: 900; }
.podium-rank { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--accent-ink); background: var(--accent); font-weight: 950; }
.ranking-list { display: grid; gap: 7px; }
.ranking-row { min-height: 68px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; display: grid; grid-template-columns: 34px 48px 1fr auto; align-items: center; gap: 12px; background: rgba(255,255,255,.045); }
.ranking-row > strong { color: var(--accent); text-align: center; font-size: 1.05rem; }
.ranking-row .player-avatar { width: 48px; height: 48px; border-radius: 6px; font-size: 0.76rem; }
.ranking-row b { color: var(--accent); }
.staff-search { max-width: 560px; margin: 0 auto 18px; display: flex; align-items: center; gap: 10px; }
.staff-search svg { color: var(--muted); }
.staff-search input { min-height: 50px; }
.staff-list { display: grid; gap: 8px; }
.staff-row { min-height: 84px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 13px; background: var(--surface); }
.staff-row .player-avatar { width: 62px; height: 62px; font-size: 0.82rem; }
.staff-row > span { display: grid; gap: 5px; }
.staff-row small { color: var(--accent); font-weight: 800; }

.empty-state { min-height: 240px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--text); }
.notice { border: 1px solid rgba(90, 169, 255, 0.24); border-radius: var(--radius); padding: 12px; color: #cfe6ff; background: rgba(90, 169, 255, 0.08); line-height: 1.55; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(0, 0, 0, 0.76); }
.modal-backdrop.open { display: flex; }
.modal { width: min(520px, 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #111720; box-shadow: var(--shadow); animation: modalIn 220ms ease-out; }
.modal h2 { margin: 0 0 10px; }
.modal p { margin: 0; color: var(--muted); line-height: 1.65; }
.modal-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 90; max-width: min(380px, calc(100% - 36px)); border: 1px solid rgba(66, 223, 145, 0.3); border-radius: var(--radius); padding: 12px 15px; color: #dfffee; background: #123222; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: 180ms ease; }
.toast.error { border-color: rgba(255,107,107,.35); color: #ffdede; background: #39181d; }
.toast.show { opacity: 1; transform: translateY(0); }
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); }
.footer-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 650ms ease var(--delay, 0ms), transform 650ms cubic-bezier(.2,.75,.2,1) var(--delay, 0ms); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes loaderPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes loaderMove { from { transform: translateX(-120%); } to { transform: translateX(340%); } }
@keyframes loaderFallback { to { opacity: 0; visibility: hidden; pointer-events: none; } }

@media (max-width: 860px) {
  .topbar { position: sticky; }
  .nav { position: relative; padding: 10px 0; }
  .mobile-toggle { display: inline-flex; margin-left: auto; }
  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    z-index: 40;
    width: 100%;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #0b1017;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
  }
  .nav-links.open { display: grid; }
  .nav-links a, .nav-action { justify-content: flex-start; }
  .hero { padding-top: 48px; }
  .store-page .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-layout.admin-mode { grid-template-columns: 1fr; }
  .server-frame { min-height: 360px; }
  .section-head { display: block; }
  .chat-shell { height: min(680px, calc(100dvh - 220px)); }
}

@media (max-width: 560px) {
  .page { width: min(100% - 20px, 1180px); padding-top: 22px; }
  .brand-text span { display: none; }
  body[data-page="home"],
  body[data-page="home"] .site-shell {
    height: 100svh;
    min-height: 100svh;
  }
  body[data-page="home"] .topbar { position: relative; }
  .home-page {
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 24px 24px, 24px 24px, auto, auto;
  }
  .home-page::after { display: none; }
  body[data-page="home"] .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero { width: min(100% - 24px, 440px); padding: 14px 0 18px; }
  .hero h1 { font-size: 2.75rem; line-height: 1; overflow-wrap: anywhere; }
  .hero p { margin-top: 13px; font-size: 0.88rem; line-height: 1.45; }
  .ip-card {
    width: 100%;
    margin-top: 16px;
    padding: 8px 8px 8px 12px;
    gap: 8px;
  }
  .ip-card > div { min-width: 0; text-align: left; }
  .ip-card strong { overflow-wrap: anywhere; }
  .copy-button { min-height: 40px; padding: 0 10px; flex: 0 0 auto; }
  .hero-panel { padding: 10px; }
  .home-actions { width: 100%; margin-top: 10px; gap: 7px; }
  .home-actions .btn {
    min-width: 0;
    min-height: 43px;
    padding: 0 7px;
    gap: 6px;
    font-size: 0.75rem;
    line-height: 1.15;
    text-align: center;
  }
  .home-actions .btn svg { width: 16px; height: 16px; flex: 0 0 16px; }
  .store-page { width: min(100% - 16px, 1120px); padding-top: 28px; }
  .store-page .section { padding-top: 24px; }
  .store-page .page-title h1 { font-size: 1.8rem; }
  .store-page .product-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-body { padding: 10px; display: grid; }
  .product-title { font-size: 0.84rem; }
  .price { font-size: 1.05rem; }
  .product-buy { min-height: 34px; width: fit-content; font-size: 0.72rem; }
  .support-page { width: 100%; padding: 20px 10px 24px; }
  .support-header { align-items: end; padding-inline: 2px; }
  .support-header h1 { font-size: 1.8rem; }
  .support-header .btn { min-height: 42px; padding: 0 10px; font-size: 0.76rem; }
  .ticket-list-panel { padding: 10px; }
  .ticket-item { grid-template-columns: auto 1fr; }
  .ticket-item .status { display: none; }
  .support-page[data-view="chat"] {
    padding: 0;
    overflow: hidden;
  }
  .support-page[data-view="chat"] .support-header { display: none; }
  .support-page[data-view="chat"] .chat-view {
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
  }
  .support-page[data-view="chat"] .chat-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .chat-topbar {
    min-height: 64px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 10px;
  }
  .chat-topbar > .icon-button { width: 38px; min-height: 38px; padding: 0; }
  .chat-topbar .danger { min-height: 36px; padding: 0 8px; font-size: 0.68rem; box-shadow: none; }
  .chat-avatar { width: 36px; height: 36px; flex-basis: 36px; }
  .chat-stream { padding: 14px 12px; }
  .bubble { max-width: 88%; }
  .chat-compose { padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); }
  .cooldown { padding-right: 14px; }
  .login-brand { top: 18px; left: 18px; }
  .login-panel { padding: 22px; }
  .profile-page { min-height: calc(100svh - 74px); place-items: start center; padding: 28px 10px 56px; }
  .profile-card { padding: 18px; }
  .admin-heading { align-items: flex-start; }
  .admin-user-row { grid-template-columns: 1fr 86px; }
  .admin-user-row input[name="role"] { grid-column: 1 / -1; }
  .admin-user-row input[name="expiresAt"] { grid-column: 1; }
  .admin-user-row button { grid-column: 2; grid-row: 3; }
  .admin-user-row .admin-delete-user { grid-column: 2; grid-row: 1; justify-self: end; }
  .ranking-page { width: min(100% - 20px, 980px); padding-top: 28px; }
  .ranking-heading { margin-bottom: 20px; }
  .ranking-heading h1 { font-size: 2rem; }
  .ranking-choices { grid-template-columns: 1fr; gap: 8px; }
  .ranking-choice { min-height: 82px; padding: 12px; }
  .ranking-description { margin-top: 18px; font-size: 0.88rem; }
  .podium { gap: 6px; }
  .podium-player, .podium-player.place-1 { min-height: 176px; padding: 30px 6px 12px; gap: 5px; }
  .podium-player .player-avatar { width: 64px; height: 64px; font-size: 0.8rem; }
  .podium-player strong { font-size: 0.75rem; overflow-wrap: anywhere; }
  .podium-player span:last-child { font-size: 0.68rem; }
  .podium-rank { width: 25px; height: 25px; font-size: 0.76rem; }
  .ranking-row { grid-template-columns: 26px 42px 1fr auto; gap: 8px; padding-inline: 9px; }
  .ranking-row .player-avatar { width: 42px; height: 42px; }
  .ranking-row b { font-size: 0.76rem; }
  .staff-row { grid-template-columns: 52px 1fr auto; gap: 9px; padding: 9px; }
  .staff-row .player-avatar { width: 52px; height: 52px; }
  .staff-row .btn { padding-inline: 8px; font-size: 0.7rem; }
}

@media (max-width: 370px) {
  .nav {
    width: calc(100% - 16px);
    min-height: 66px;
    gap: 6px;
  }
  .brand { min-width: 0; gap: 7px; }
  .brand-logo, .brand-logo-fallback { width: 38px; height: 38px; flex: 0 0 38px; }
  .brand-text { min-width: 0; }
  .brand-text strong { font-size: 0.86rem; white-space: nowrap; }
  .mobile-toggle { width: 38px; min-height: 38px; padding: 0; flex: 0 0 38px; }
  .nav-action {
    min-width: 0;
    max-width: 76px;
    min-height: 38px;
    padding: 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
  }
  .hero { width: calc(100% - 16px); }
  .hero h1 { font-size: 2.35rem; }
  .hero p { font-size: 0.8rem; }
  .ip-card strong { font-size: 0.9rem; }
  .copy-button { padding-inline: 8px; }
  .home-actions .btn { font-size: 0.68rem; }
}

@media (min-width: 561px) and (max-height: 720px) {
  body[data-page="home"] .hero { padding-block: 12px; }
  body[data-page="home"] .hero h1 { font-size: clamp(2.45rem, 9vh, 4.4rem); }
  body[data-page="home"] .hero p { margin-top: 12px; line-height: 1.45; }
  body[data-page="home"] .ip-card { margin-top: 16px; }
  body[data-page="home"] .home-actions { margin-top: 10px; }
  body[data-page="home"] .btn { min-height: 42px; }
}

@media (max-width: 560px) and (max-height: 620px) {
  body[data-page="home"] .nav { min-height: 60px; padding-block: 6px; }
  body[data-page="home"] .brand-logo,
  body[data-page="home"] .brand-logo-fallback { width: 38px; height: 38px; }
  body[data-page="home"] .hero { padding-block: 7px; }
  body[data-page="home"] .hero h1 { font-size: 2.15rem; }
  body[data-page="home"] .hero p { margin-top: 7px; font-size: 0.76rem; line-height: 1.3; }
  body[data-page="home"] .ip-card { margin-top: 9px; min-height: 48px; }
  body[data-page="home"] .home-actions { margin-top: 7px; gap: 5px; }
  body[data-page="home"] .home-actions .btn { min-height: 38px; }
}

@media (max-width: 560px) and (max-height: 430px) {
  body[data-page="home"] .hero p { display: none; }
  body[data-page="home"] .hero { width: min(100% - 20px, 500px); }
  body[data-page="home"] .ip-card { margin-top: 6px; }
  body[data-page="home"] .home-actions { margin-top: 5px; }
}

@media (min-width: 561px) and (max-width: 900px) and (max-height: 430px) {
  body[data-page="home"],
  body[data-page="home"] .site-shell {
    height: 100svh;
    min-height: 100svh;
  }
  body[data-page="home"] .topbar { position: relative; }
  body[data-page="home"] .nav { min-height: 58px; padding-block: 5px; }
  body[data-page="home"] .brand-logo,
  body[data-page="home"] .brand-logo-fallback { width: 38px; height: 38px; }
  body[data-page="home"] .home-page {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body[data-page="home"] .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  body[data-page="home"] .hero { width: min(500px, calc(100% - 24px)); padding: 4px 0 8px; }
  body[data-page="home"] .hero h1 { font-size: 2rem; }
  body[data-page="home"] .hero p { display: none; }
  body[data-page="home"] .ip-card { margin-top: 6px; min-height: 43px; padding-block: 5px; }
  body[data-page="home"] .home-actions { margin-top: 5px; gap: 5px; }
  body[data-page="home"] .home-actions .btn { min-height: 35px; font-size: 0.76rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
