/* ══════════════════════════════════════
   БАЗА
   ══════════════════════════════════════ */
:root {
  --bg: #0d0d10;
  --bg-2: #15151a;
  --bg-3: #1b1b22;
  --bg-4: #23232c;
  --line: #2a2a34;
  --line-hi: #3a3a48;
  --text: #ececf0;
  --text-dim: #9a9aa6;
  --text-mute: #6a6a76;
  --text-faint: #4a4a56;
  --accent: #7cb342;
  --accent-hi: #8bc34a;
  --danger: #d94a4a;
  --pixel: 6px;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.pixel-corners {
  clip-path: polygon(
    0 var(--pixel), var(--pixel) var(--pixel), var(--pixel) 0,
    calc(100% - var(--pixel)) 0, calc(100% - var(--pixel)) var(--pixel), 100% var(--pixel),
    100% calc(100% - var(--pixel)), calc(100% - var(--pixel)) calc(100% - var(--pixel)),
    calc(100% - var(--pixel)) 100%, var(--pixel) 100%,
    var(--pixel) calc(100% - var(--pixel)), 0 calc(100% - var(--pixel))
  );
}

/* ФОН */
.bg-layer {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(124, 179, 66, 0.06), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(77, 208, 225, 0.05), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(240, 180, 41, 0.04), transparent 55%),
    var(--bg);
}
.bg-glow {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: 0.35; animation: glowFloat 20s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes glowFloat {
  0%, 100% { transform: translate3d(0,0,0) scale(1); opacity: 0.25; }
  50% { transform: translate3d(30px,-50px,0) scale(1.15); opacity: 0.5; }
}
.bg-block {
  position: absolute; border: 1px solid rgba(255,255,255,0.04);
  animation: blockFloat linear infinite; will-change: transform, opacity;
}
@keyframes blockFloat {
  0% { transform: translate3d(0,0,0) rotate(0deg); opacity: 0.08; }
  50% { transform: translate3d(24px,-70px,0) rotate(90deg); opacity: 0.22; }
  100% { transform: translate3d(0,0,0) rotate(180deg); opacity: 0.08; }
}

.content-layer { position: relative; z-index: 1; }

.container {
  width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 2rem;
}

/* ШАПКА */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  z-index: 100; background: rgba(13, 13, 16, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: 1.5rem;
}
.header-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.92rem; font-weight: 800; color: var(--text);
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.1em;
  white-space: nowrap; transition: color 0.2s ease;
}
.header-brand:hover { color: var(--accent); }

.header-nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  display: inline-block; padding: 0.5rem 0.9rem; font-size: 0.88rem;
  font-weight: 500; color: var(--text-dim); text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease; white-space: nowrap;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

.header-auth { display: flex; align-items: center; gap: 0.5rem; }
.header-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 1.05rem; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: none; font-family: inherit; letter-spacing: 0.02em;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.header-btn:active { transform: translateY(1px); }
.header-btn-login {
  background: transparent; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-hi);
}
.header-btn-login:hover { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--text-mute); }

.header-user {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none; color: var(--text);
  font-size: 0.85rem; font-weight: 500;
  transition: box-shadow 0.2s ease;
  max-width: 180px;
}
.header-user:hover { box-shadow: inset 0 0 0 1px var(--line-hi); }
.header-user span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.header-user-avatar {
  width: 28px; height: 28px; image-rendering: pixelated;
  background: var(--bg-3);
  flex-shrink: 0;
}

.header-burger {
  display: none; width: 40px; height: 40px; background: transparent;
  border: none; cursor: pointer; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; padding: 0;
}
.header-burger span {
  display: block; width: 20px; height: 1.5px; background: var(--text-dim);
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}
.header-burger:hover span { background: var(--text); }
.header-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.header-burger.open span:nth-child(2) { opacity: 0; }
.header-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0;
  background: rgba(13,13,16,0.97); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  padding: 1rem 0 1.5rem 0; z-index: 99; flex-direction: column; gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { padding: 0.85rem 1.25rem; font-size: 0.95rem; }
.mobile-menu .nav-link.active { box-shadow: inset 3px 0 0 var(--accent); }
.mobile-menu-auth {
  display: flex; gap: 0.6rem; padding: 1rem 1.25rem 0 1.25rem;
  border-top: 1px solid var(--line); margin-top: 0.75rem;
}
.mobile-menu-auth .header-btn { flex: 1; padding: 0.75rem 1rem; }

/* ЭКРАНЫ */
.screen {
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 4rem) 0 4rem 0; position: relative;
}

/* ГЕРОЙ */
.screen-hero { border-bottom: 1px solid var(--line); text-align: center; }
.screen-hero .container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; width: 100%;
}
.hero-label {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: clamp(0.6rem, 1.1vw, 0.72rem); text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--text-mute);
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 0.55rem 1.1rem; margin-bottom: clamp(1.5rem, 4vh, 2.5rem); font-weight: 500;
}
.hero-label-dot {
  width: 6px; height: 6px; background: var(--accent);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero-title {
  font-size: clamp(1.9rem, 7vw, 4.5rem); font-weight: 800;
  line-height: 1; letter-spacing: -0.035em; color: var(--text);
  margin-bottom: clamp(0.75rem, 2vh, 1.25rem); white-space: nowrap;
}
.hero-title .accent-block { color: var(--accent); }
.hero-sub {
  font-size: clamp(0.75rem, 1.5vw, 1rem); font-weight: 500;
  color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.22em; margin-bottom: clamp(1.5rem, 4vh, 2.25rem);
}
.hero-desc {
  font-size: clamp(0.9rem, 1.3vw, 1.05rem); color: var(--text-dim);
  line-height: 1.65; max-width: 560px;
  margin: 0 auto clamp(2rem, 5vh, 2.75rem) auto;
}

.ip-block {
  display: inline-flex; align-items: stretch; background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease; user-select: none;
}
.ip-block:hover { box-shadow: inset 0 0 0 1px var(--line-hi); }
.ip-block:active { transform: translateY(1px); }
.ip-value {
  display: flex; align-items: center; gap: 0.8rem;
  padding: clamp(0.8rem, 1.5vh, 1.05rem) clamp(1rem, 2vw, 1.6rem);
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: clamp(0.8rem, 1.2vw, 1rem); font-weight: 600;
  color: var(--text); letter-spacing: -0.01em; white-space: nowrap;
}
.ip-value::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  background: var(--accent); flex-shrink: 0;
}
.ip-action {
  display: flex; align-items: center; padding: 0 clamp(0.8rem, 1.5vw, 1.3rem);
  background: var(--bg-3); font-size: clamp(0.6rem, 1vw, 0.7rem);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-mute); transition: color 0.2s ease, background 0.2s ease;
  box-shadow: inset 1px 0 0 var(--line);
}
.ip-block:hover .ip-action { color: var(--text); background: var(--bg-4); }

/* СЕКЦИИ */
.screen-news, .screen-features { border-bottom: 1px solid var(--line); }
.news-inner, .features-inner { width: 100%; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-end; gap: 1.5rem; margin-bottom: 3rem;
}
.section-title {
  font-size: clamp(1.7rem, 4.5vw, 3.2rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.03em; color: var(--text); max-width: 640px;
}
.section-title .dim { color: var(--text-faint); }
.section-all-link {
  font-size: 0.88rem; color: var(--text-mute); text-decoration: none;
  font-weight: 500; transition: color 0.2s ease; padding-bottom: 0.4rem;
}
.section-all-link:hover { color: var(--accent); }

/* НОВОСТИ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 1.6rem 1.5rem 1.7rem 1.5rem; display: flex;
  flex-direction: column; gap: 0.85rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.news-card:hover { box-shadow: inset 0 0 0 1px var(--line-hi); transform: translateY(-2px); }
.news-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; font-size: 0.72rem; color: var(--text-faint);
  font-family: ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase;
}
.news-tag { color: var(--accent); }
.news-title { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; line-height: 1.35; }
.news-text { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; flex: 1; }
.news-more { font-size: 0.82rem; color: var(--text-mute); text-decoration: none; font-weight: 500; transition: color 0.2s ease; align-self: flex-start; margin-top: 0.25rem; }
.news-more:hover { color: var(--accent); }

/* ОСОБЕННОСТИ */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 700px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease; overflow: hidden;
}
.feature-card:hover { box-shadow: inset 0 0 0 1px var(--line-hi); transform: translateY(-2px); }
.feature-visual {
  aspect-ratio: 16 / 9; position: relative; overflow: hidden;
  background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line);
}
.feature-visual img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.feature-card:hover .feature-visual img { transform: scale(1.04); }
.feature-visual::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,13,16,0) 40%, rgba(13,13,16,0.55) 100%),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.04), transparent 60%);
}
.feature-body { padding: 1.4rem 1.5rem 1.6rem 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.feature-name { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.feature-text { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; }

/* КАК НАЧАТЬ */
.screen-join {
  flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 4rem) 0 2rem 0;
}
.join-main { flex: 1; display: flex; align-items: center; width: 100%; }
.join-inner { width: 100%; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }
.step {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 1.75rem 1.5rem 1.6rem 1.5rem; display: flex; flex-direction: column; gap: 0.9rem;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: var(--accent); color: var(--bg);
  font-family: ui-monospace, monospace; font-weight: 700; font-size: 1.05rem;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25);
}
.step-name { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.step-text { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; }
.step-code {
  font-family: ui-monospace, monospace; font-size: 0.85rem; color: var(--text);
  background: var(--bg-3); padding: 0.4rem 0.7rem;
  box-shadow: inset 0 0 0 1px var(--line); align-self: flex-start; margin-top: 0.2rem;
}

/* ══════════════════════════════════════
   ФУТЕР — большой, с пустотой снизу и сверху
   ══════════════════════════════════════ */
.site-footer {
  width: 100%;
  padding-top: 5rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
  width: 100%;
}
.footer-brand {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  line-height: 1;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-discord {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-discord:hover { color: var(--accent); }
.footer-note {
  font-size: 0.7rem;
  color: var(--text-faint);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.06em;
  margin-top: 0.5rem;
}

/* СТРАНИЦА НОВОСТЕЙ */
.news-page {
  padding: calc(var(--header-h) + 4rem) 0 4rem 0;
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
}
.news-page-inner { flex: 1; width: 100%; }
.page-head { margin-bottom: 3rem; }
.page-title {
  font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.03em; color: var(--text); margin-bottom: 0.75rem;
}
.page-sub { font-size: 1rem; color: var(--text-dim); max-width: 520px; }
.news-list { display: flex; flex-direction: column; gap: 1rem; }
.news-full {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 2rem 2rem 2.2rem 2rem; display: flex; flex-direction: column; gap: 1rem;
  transition: box-shadow 0.25s ease;
}
.news-full:hover { box-shadow: inset 0 0 0 1px var(--line-hi); }
.news-full-meta {
  display: flex; align-items: center; gap: 1.25rem;
  font-size: 0.72rem; color: var(--text-faint);
  font-family: ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase;
}
.news-full-title { font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 700; color: var(--text); line-height: 1.25; letter-spacing: -0.015em; }
.news-full-text { font-size: 0.95rem; color: var(--text-dim); line-height: 1.7; }

/* АВТОРИЗАЦИЯ */
.auth-screen {
  min-height: 100vh; min-height: 100svh; display: flex;
  align-items: center; justify-content: center;
  padding: calc(var(--header-h) + 2rem) 1.5rem 3rem 1.5rem;
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 2.5rem 2rem 2.25rem 2rem;
}
.auth-title {
  font-size: 1.5rem; font-weight: 800; color: var(--text);
  letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.auth-sub { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 2rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.5rem; }
.auth-label {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-mute);
}
.auth-input {
  width: 100%; padding: 0.85rem 1rem; font-family: inherit;
  font-size: 0.95rem; color: var(--text);
  background: var(--bg-3); border: none; outline: none;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s ease;
}
.auth-input:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.auth-error {
  padding: 0.75rem 1rem; font-size: 0.85rem;
  color: #ffbdbd; background: rgba(217, 74, 74, 0.12);
  box-shadow: inset 0 0 0 1px rgba(217, 74, 74, 0.35);
}
.auth-success {
  padding: 0.75rem 1rem; font-size: 0.85rem;
  color: #c3e6b7; background: rgba(124, 179, 66, 0.12);
  box-shadow: inset 0 0 0 1px rgba(124, 179, 66, 0.35);
}
.auth-submit {
  margin-top: 0.5rem; padding: 0.95rem 1.25rem; font-family: inherit;
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--bg); background: var(--accent); border: none;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25); cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.auth-submit:hover { background: var(--accent-hi); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Разделитель «или» */
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.5rem 0 1rem 0;
  color: var(--text-faint); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* Кнопка Discord */
.auth-discord {
  display: flex; align-items: center; justify-content: center;
  gap: 0.7rem; padding: 0.85rem 1.25rem;
  background: #5865F2; color: #fff; text-decoration: none;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.2);
}
.auth-discord:hover { background: #4752c4; }
.auth-discord:active { transform: translateY(1px); }
.auth-discord svg { flex-shrink: 0; }

/* ПРОФИЛЬ */
.profile-screen {
  padding: calc(var(--header-h) + 3rem) 0 0 0;
  min-height: 100vh; min-height: 100svh;
}

.profile-top {
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (max-width: 1100px) {
  .profile-top { grid-template-columns: 320px 1fr; }
  .stats-card { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .profile-top { grid-template-columns: 1fr 1fr; }
  .skin-viewer { grid-column: 1 / -1; order: -1; }
  .stats-card { grid-column: auto; }
}
@media (max-width: 700px) {
  .profile-top { grid-template-columns: 1fr; }
}

.profile-card {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  display: flex; flex-direction: column; gap: 1.15rem;
  position: relative;
  min-width: 0;
}

/* Шапка карточки: аватар + ник в одной строке, UUID под ними */
.profile-head {
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  row-gap: 0.45rem;
  align-items: center;
  min-width: 0;
}
.profile-avatar {
  grid-column: 1;
  grid-row: 1;
  width: 56px; height: 56px; image-rendering: pixelated;
  background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line);
  flex-shrink: 0;
}
.profile-id {
  display: contents;
}
.profile-nick {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  padding-right: 42px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.profile-uuid {
  grid-column: 1 / -1;
  grid-row: 2;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: -0.01em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.profile-meta {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding-top: 1rem; border-top: 1px solid var(--line);
}
.profile-meta-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; font-size: 0.85rem;
}
.profile-meta-label { color: var(--text-mute); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.profile-meta-value { color: var(--text); font-weight: 500; text-align: right; }

.profile-links { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.profile-link {
  display: block; padding: 0.65rem 1rem; font-size: 0.85rem; font-weight: 600;
  text-align: center; text-decoration: none;
  color: var(--text); background: var(--bg-3); border: none; font-family: inherit;
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.profile-link:hover { background: var(--bg-4); box-shadow: inset 0 0 0 1px var(--line-hi); }

.skin-viewer {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  position: relative; overflow: hidden;
  min-height: 420px; display: flex;
  align-items: center; justify-content: center;
}
#skinCanvas { display: block; width: 100%; height: 100%; cursor: grab; }
#skinCanvas:active { cursor: grabbing; }

.skin-viewer-hint {
  position: absolute; bottom: 0.85rem; left: 50%; transform: translateX(-50%);
  font-size: 0.7rem; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: 0.14em; pointer-events: none;
}

.stats-card {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 1.75rem 1.6rem 1.6rem 1.6rem;
  min-width: 0;
}
.stats-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-mute); margin-bottom: 1.25rem;
}
.stats-list { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.stats-item {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--line);
}
.stats-item:last-child { border-bottom: none; padding-bottom: 0; }
.stats-label { font-size: 0.78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.05em; }
.stats-value { font-size: 0.9rem; color: var(--text); font-weight: 600; text-align: right; }

/* Кнопка выхода в углу карточки профиля */
.profile-logout {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-mute);
  border: none; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  z-index: 2;
}
.profile-logout:hover {
  color: #ffbdbd; background: rgba(217, 74, 74, 0.1);
  box-shadow: inset 0 0 0 1px rgba(217, 74, 74, 0.4);
}
.profile-logout:active { transform: translateY(1px); }
.profile-logout svg { width: 16px; height: 16px; display: block; }

/* Кнопка выхода в шапке */
.header-logout {
  width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-mute);
  border: none; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.header-logout:hover {
  color: #ffbdbd; background: rgba(217, 74, 74, 0.1);
  box-shadow: inset 0 0 0 1px rgba(217, 74, 74, 0.4);
}
.header-logout:active { transform: translateY(1px); }
.header-logout svg { width: 16px; height: 16px; display: block; }

.mobile-menu-auth .header-logout {
  width: auto; flex: 1; padding: 0.75rem 1rem;
}
.mobile-menu-auth .header-logout svg { width: 18px; height: 18px; }

/* СЕКЦИИ ПРОФИЛЯ */
.profile-section { margin-top: 3rem; }
.profile-section-head {
  display: flex; justify-content: space-between;
  align-items: baseline; gap: 1rem; margin-bottom: 1.5rem;
}
.profile-section-title {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: 1.5rem;
}
.profile-section-head .profile-section-title { margin-bottom: 0; }
.profile-section-meta {
  font-family: ui-monospace, monospace; font-size: 0.8rem;
  color: var(--text-faint); letter-spacing: 0.05em;
}

/* ИНВЕНТАРЬ */
.inv-wrapper {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 1.25rem; display: inline-block; max-width: 100%;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.inv-grid {
  display: grid; grid-template-columns: repeat(9, 56px);
  gap: 4px;
}
.inv-grid-armor-vertical { grid-template-columns: repeat(1, 56px); }
.inv-grid-small { grid-template-columns: repeat(1, 56px); }

.inv-slot {
  width: 56px; height: 56px; background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.inv-slot img { width: 40px; height: 40px; image-rendering: pixelated; }
.inv-count {
  position: absolute; right: 3px; bottom: 1px;
  font-family: ui-monospace, monospace; font-size: 0.75rem;
  font-weight: 700; color: #fff;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}
.inv-empty { padding: 1rem; color: var(--text-mute); font-size: 0.88rem; }

.inv-slot-shulker {
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.inv-slot-shulker:hover {
  box-shadow: inset 0 0 0 1px var(--accent-hi), 0 0 0 1px rgba(124,179,66,0.4);
}
.inv-shulker-badge {
  position: absolute; top: 2px; right: 2px;
  width: 8px; height: 8px; background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
}

/* ИНВЕНТАРЬ + БРОНЯ РЯДОМ */
.inv-and-gear {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: stretch;
}
.gear-block {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 1rem 1rem 1.25rem 1rem;
  display: flex; flex-direction: column;
}
.gear-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-mute);
  margin-bottom: 0.85rem; text-align: center;
}
.gear-block .inv-grid {
  flex: 1; align-content: center; justify-content: center;
}

/* ДОСТИЖЕНИЯ */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.adv-card {
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 0.85rem 1rem; display: flex; gap: 0.85rem; align-items: center;
  transition: box-shadow 0.2s ease;
}
.adv-card.done { box-shadow: inset 0 0 0 1px var(--line-hi); background: var(--bg-3); }
.adv-card.locked { opacity: 0.45; }
.adv-card:hover { box-shadow: inset 0 0 0 1px var(--line-hi); }
.adv-icon {
  width: 36px; height: 36px; image-rendering: pixelated;
  background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line);
  flex-shrink: 0; padding: 3px;
}
.adv-body { min-width: 0; flex: 1; }
.adv-name {
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adv-card.locked .adv-name { color: var(--text-mute); }
.adv-desc {
  font-size: 0.72rem; color: var(--text-dim); line-height: 1.35;
  margin-top: 0.15rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* СВОРАЧИВАЕМЫЕ ДОСТИЖЕНИЯ */
.adv-collapse { position: relative; --adv-collapsed-h: 140px; }
.adv-collapse-inner {
  position: relative; overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 99999px;
}
.adv-collapse.collapsed .adv-collapse-inner { max-height: var(--adv-collapsed-h); }
.adv-collapse.collapsed .adv-collapse-inner::after {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: 0; height: 60px;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
  pointer-events: none;
}
.adv-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; margin: 1.25rem auto 0 auto;
  padding: 0.65rem 1.4rem; background: transparent;
  color: var(--text-dim); border: none; font-family: inherit;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.adv-toggle:hover {
  color: var(--text); background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line-hi);
}
.adv-toggle:active { transform: translateY(1px); }
.adv-toggle-arrow {
  width: 16px; height: 16px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.adv-collapse.collapsed .adv-toggle-arrow { transform: rotate(0deg); }
.adv-collapse:not(.collapsed) .adv-toggle-arrow { transform: rotate(180deg); }
@media (max-width: 500px) { .adv-toggle { width: 100%; } }

/* СМЕНА ПАРОЛЯ */
.password-card {
  max-width: 480px;
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 1.75rem 1.6rem 1.6rem 1.6rem;
}
.password-form { display: flex; flex-direction: column; gap: 1.1rem; }

/* ШАЛКЕР МОДАЛКА */
.shulker-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.shulker-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.shulker-modal-card {
  position: relative; z-index: 1;
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-hi);
  padding: 1.25rem 1.25rem 1.5rem 1.25rem;
  max-width: 100%; overflow: visible;
}
.shulker-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: 1rem;
}
.shulker-modal-title {
  font-size: 0.92rem; font-weight: 700; color: var(--text);
  text-transform: capitalize;
}
.shulker-modal-close {
  background: transparent; border: none; cursor: pointer;
  color: var(--text-mute); font-size: 1.5rem; line-height: 1;
  padding: 0 0.4rem; transition: color 0.2s ease;
}
.shulker-modal-close:hover { color: var(--text); }

/* ══════════════════════════════════════
   ТУЛТИП ПРЕДМЕТА
   ══════════════════════════════════════ */
.inv-slot { position: relative; }
.inv-slot:hover { z-index: 100; }

.inv-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a22;
  box-shadow: inset 0 0 0 1px #3a3a48, 0 6px 20px rgba(0,0,0,0.6);
  padding: 0.75rem 1rem;
  z-index: 200;
  pointer-events: none;
  text-align: left;
  max-width: min(340px, calc(100vw - 32px));
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.inv-slot:hover .inv-tooltip { display: block; }

.inv-tooltip::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a1a22;
  filter: drop-shadow(0 1px 0 #3a3a48);
}

.inv-tooltip-title {
  font-size: 0.95rem; font-weight: 700; color: #ffffff;
  margin-bottom: 0.45rem; line-height: 1.3;
}
.inv-tooltip-body {
  font-size: 0.78rem; line-height: 1.55; color: #b8b8c4;
  white-space: pre;
}

/* Первая строка инвентаря — тултип СНИЗУ */
.inv-grid .inv-slot:nth-child(-n+9) .inv-tooltip {
  top: calc(100% + 10px); bottom: auto;
}
.inv-grid .inv-slot:nth-child(-n+9) .inv-tooltip::before {
  top: -10px; bottom: auto;
  border-top-color: transparent;
  border-bottom-color: #1a1a22;
  filter: drop-shadow(0 -1px 0 #3a3a48);
}

/* Крайние слоты инвентаря — прижимаем к краю */
.inv-slot:nth-child(9n + 1) .inv-tooltip,
.inv-slot:nth-child(9n + 2) .inv-tooltip {
  left: 0; transform: translateX(0);
}
.inv-slot:nth-child(9n + 1) .inv-tooltip::before,
.inv-slot:nth-child(9n + 2) .inv-tooltip::before {
  left: 20px; transform: translateX(0);
}
.inv-slot:nth-child(9n + 8) .inv-tooltip,
.inv-slot:nth-child(9n + 9) .inv-tooltip {
  left: auto; right: 0; transform: translateX(0);
}
.inv-slot:nth-child(9n + 8) .inv-tooltip::before,
.inv-slot:nth-child(9n + 9) .inv-tooltip::before {
  left: auto; right: 20px; transform: translateX(0);
}

/* Броня — тултип СВЕРХУ, растёт ВПРАВО */
.gear-block .inv-tooltip {
  top: auto;
  bottom: calc(100% + 10px);
  left: 0;
  right: auto;
  transform: translateX(-16px);
  max-width: min(300px, calc(100vw - 48px));
}
.gear-block .inv-tooltip::before {
  top: auto;
  bottom: -10px;
  left: 26px;
  transform: translateX(0);
  border-top-color: #1a1a22;
  border-bottom-color: transparent;
}

/* Вторая рука (последний .gear-block) — растёт ВЛЕВО */
.gear-block:last-child .inv-tooltip {
  left: auto;
  right: 0;
  transform: translateX(16px);
}
.gear-block:last-child .inv-tooltip::before {
  left: auto;
  right: 26px;
  transform: translateX(0);
}

/* Шалкер — тултип сверху, по центру слота */
.shulker-modal .inv-tooltip {
  top: auto;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
}
.shulker-modal .inv-tooltip::before {
  top: auto;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: #1a1a22;
  border-bottom-color: transparent;
}

/* Ничего не обрезаем */
.inv-wrapper,
.gear-block,
.inv-and-gear,
.profile-section {
  overflow: visible;
}

/* Убираем clip-path со всех контейнеров с тултипами */
.inv-wrapper.pixel-corners,
.shulker-modal-card.pixel-corners,
.gear-block.pixel-corners {
  clip-path: none;
  border-radius: 4px;
}

@media (max-width: 700px) {
  .inv-tooltip { max-width: min(240px, calc(100vw - 32px)); padding: 0.6rem 0.8rem; }
  .inv-tooltip-title { font-size: 0.85rem; }
  .inv-tooltip-body { font-size: 0.72rem; }
}

/* АДАПТИВ */
@media (max-width: 860px) {
  .header-nav, .header-auth { display: none; }
  .header-burger { display: flex; }
}

@media (max-width: 700px) {
  .container { padding: 0 1.25rem; }
  .screen { padding: calc(var(--header-h) + 3rem) 0 3rem 0; }
  .section-head { margin-bottom: 2rem; }
  .feature-visual { aspect-ratio: 16 / 8; }
  .site-footer { margin-top: 2rem; padding-top: 3.5rem; padding-bottom: 3.5rem; min-height: 180px; }
  .ip-block { width: 100%; justify-content: space-between; }
  .news-full { padding: 1.5rem 1.35rem 1.7rem 1.35rem; }
  .inv-grid { grid-template-columns: repeat(9, 44px); }
  .inv-slot { width: 44px; height: 44px; }
  .inv-slot img { width: 32px; height: 32px; }
  .inv-grid-armor-vertical { grid-template-columns: repeat(4, 44px); }
  .inv-grid-small { grid-template-columns: repeat(1, 44px); }
  .skin-viewer { min-height: 360px; }
  .inv-and-gear { flex-direction: column; align-items: stretch; }
}

@media (max-width: 400px) {
  .inv-grid { grid-template-columns: repeat(9, 38px); }
  .inv-slot { width: 38px; height: 38px; }
  .inv-slot img { width: 26px; height: 26px; }
  .inv-grid-armor-vertical { grid-template-columns: repeat(4, 38px); }
  .inv-grid-small { grid-template-columns: repeat(1, 38px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}