/* ===================================================================
   Fonts — self-hosted, variable, Latin + Cyrillic
=================================================================== */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===================================================================
   ToughCraft — design tokens
=================================================================== */
:root {
  --color-bg: #F6F9F7;
  --color-surface: #FFFFFF;
  --color-text: #101A14;
  --color-text-muted: #4B5B52;
  --color-border: #E3EAE5;

  --color-green: #22B14C;
  --color-green-dark: #1A8A3B;
  --color-green-tint: #E7F7EC;
  --color-blue: #00A2E8;
  --color-blue-dark: #0080BC;
  --color-blue-tint: #E3F5FD;

  --color-footer-bg: #0D1912;
  --color-footer-text: #C9D6CD;
  --color-footer-border: #1C2E22;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(13, 25, 18, 0.06);
  --shadow-md: 0 16px 36px -16px rgba(13, 25, 18, 0.22);
  --shadow-btn: 0 10px 24px -10px rgba(34, 177, 76, 0.45);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --header-h: 72px;
  --container-w: 1180px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================================================================
   Reset
=================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }

#top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex-shrink: 0; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--color-green);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  z-index: 200;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

/* ===================================================================
   Buttons
=================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background 0.18s var(--ease-out), color 0.18s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn[hidden] { display: none; }

.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }

.btn-player-head {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.mobile-nav .btn-player-head {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.btn-primary {
  background: var(--color-green);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: var(--color-green-dark); box-shadow: none; }

.btn-outline {
  background: transparent;
  color: var(--color-blue-dark);
  border: 1.5px solid var(--color-blue);
}
.btn-outline:hover { background: var(--color-blue-tint); }

.btn-light {
  background: #fff;
  color: var(--color-green-dark);
}
.btn-light:hover { background: #EFFFF3; }

.btn.is-copied {
  background: var(--color-blue);
  box-shadow: 0 10px 24px -10px rgba(0, 162, 232, 0.5);
}

/* ===================================================================
   Header
=================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(246, 249, 247, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.site-header.is-scrolled {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-flex;
}
.brand-mark img {
  display: block;
  border-radius: 6px;
}
.brand-name { color: var(--color-text); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}
.main-nav a {
  display: inline-block;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--color-text-muted);
  transition: background 0.18s var(--ease-out), color 0.18s var(--ease-out);
}
.main-nav a:hover { background: var(--color-green-tint); color: var(--color-green-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  padding: 8px;
  border-radius: var(--radius-md);
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.mobile-nav ul { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--color-text);
}
.mobile-nav a:hover { background: var(--color-green-tint); }
.mobile-nav .btn { margin-top: 6px; text-align: center; }
.mobile-nav a.btn { display: inline-flex; }
.mobile-nav a.btn-primary { color: #fff; }
.mobile-nav.is-open { display: block; }

@media (max-width: 860px) {
  .main-nav, .header-actions .btn-primary { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ===================================================================
   Scroll reveal
=================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ===================================================================
   Hero
=================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: clamp(560px, 58vw, 760px);
  border-radius: 0 0 clamp(28px, 6vw, 96px) clamp(28px, 6vw, 96px);
  background: var(--color-footer-bg);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(8, 20, 13, 0.82) 0%, rgba(8, 20, 13, 0.55) 34%, rgba(8, 20, 13, 0.08) 62%),
    linear-gradient(0deg, rgba(8, 20, 13, 0.55) 0%, rgba(8, 20, 13, 0) 32%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 64px);
  padding-block: clamp(48px, 8vw, 96px);
}

.hero-content { max-width: 560px; }

.badge {
  display: inline-block;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-green-tint);
  color: var(--color-green-dark);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.badge--on-photo {
  background: rgba(255, 255, 255, 0.92);
}

.hero-title {
  font-size: clamp(2.25rem, 1.5rem + 2.9vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: 14ch;
}
.hero-title--on-photo {
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  margin-top: 20px;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem);
  color: var(--color-text-muted);
  max-width: 46ch;
}
.hero-subtitle--on-photo {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn-frost {
  background: #fff;
  color: var(--color-blue-dark);
}
.btn-frost:hover { background: #E5F6FF; }

.hero-logo {
  flex-shrink: 0;
  width: clamp(160px, 20vw, 300px);
  height: clamp(160px, 20vw, 300px);
  object-fit: cover;
  border-radius: 32px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.55);
}

.connect-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  max-width: 460px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.connect-card__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
}
.connect-card__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
}
.status-dot--online {
  background: var(--color-green);
  animation: status-pulse 2s ease-in-out infinite;
}
.status-dot--offline { background: #D6564A; }
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 177, 76, 0.45); }
  50% { box-shadow: 0 0 0 4px rgba(34, 177, 76, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot--online { animation: none; }
}

.online-bar {
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 10px;
  border-radius: var(--radius-pill);
  background: var(--color-green-tint);
  overflow: hidden;
}
.online-bar__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-green) 0%, var(--color-blue) 100%);
  transition: width 0.6s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .online-bar__fill { transition: none; }
}

.connect-card__ip {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
}
.connect-card__meta {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .hero { min-height: 0; border-radius: 0 0 32px 32px; }
  .hero-inner { flex-direction: column; align-items: flex-start; padding-block: 40px 32px; }
  .hero-content { max-width: none; }
  .hero-title, .hero-subtitle { max-width: none; }
  .hero-logo { width: 120px; height: 120px; border-radius: 24px; align-self: flex-end; margin-top: -48px; }
}

@media (max-width: 480px) {
  .connect-card { flex-direction: column; align-items: flex-start; gap: 10px; max-width: none; }
  .connect-card__meta { text-align: left; }
}

/* ===================================================================
   Section shared
=================================================================== */
section { padding-block: clamp(56px, 8vw, 96px); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head h2 {
  font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.section-head p {
  margin-top: 12px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ===================================================================
   Features bento
=================================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 16px;
  grid-template-areas:
    "a a b b"
    "a a c d"
    "e f g g";
}

.bento-item {
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.bento-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.bento-item .icon { color: var(--color-green); }
.bento-item h3 { font-size: 1.05rem; font-weight: 700; }
.bento-item p { color: var(--color-text-muted); font-size: 0.92rem; line-height: 1.5; }

.bento-item--a {
  grid-area: a;
  justify-content: flex-end;
  background: linear-gradient(150deg, var(--color-green) 0%, var(--color-blue) 100%);
  border: none;
  color: #fff;
}
.bento-item--a .icon { color: #fff; }
.bento-item--a h3 { font-size: 1.4rem; }
.bento-item--a p { color: rgba(255, 255, 255, 0.88); }

.bento-item--b {
  grid-area: b;
  justify-content: center;
  background: var(--color-blue-tint);
  border-color: transparent;
}
.bento-item--b .icon { color: var(--color-blue-dark); }

.bento-item--g {
  grid-area: g;
  justify-content: center;
  background: var(--color-green-tint);
  border-color: transparent;
}

@media (max-width: 1023px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 168px;
    grid-template-areas:
      "a a"
      "a a"
      "b b"
      "c d"
      "e f"
      "g g";
  }
}

@media (max-width: 640px) {
  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    grid-template-areas:
      "a"
      "b"
      "c"
      "d"
      "e"
      "f"
      "g";
  }
  .bento-item { min-height: 140px; }
}

/* ===================================================================
   How to join
=================================================================== */
.join { background: var(--color-surface); border-block: 1px solid var(--color-border); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 8px;
}
.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--color-border);
  margin-bottom: 10px;
}
.step p { color: var(--color-text); font-size: 1rem; max-width: 32ch; }

@media (max-width: 780px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
}

/* ===================================================================
   Community CTA
=================================================================== */
.community {
  background: linear-gradient(120deg, var(--color-green-dark) 0%, var(--color-green) 45%, var(--color-blue) 100%);
}
.community-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 620px;
}
.community-inner h2 {
  color: #fff;
  font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.community-inner p { color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; }
.community-inner .btn { margin-top: 8px; }

/* ===================================================================
   Staff page
=================================================================== */
.staff-page .section-head { max-width: 640px; }
.staff-page .badge {
  background: var(--color-green-tint);
  color: var(--color-green-dark);
}
.staff-page h1 {
  margin-top: 4px;
  font-size: clamp(2rem, 1.7rem + 1.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.staff-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.staff-table th,
.staff-table td {
  text-align: left;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
}

.staff-table th {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: var(--color-bg);
}

.staff-table tbody tr:last-child td { border-bottom: none; }
.staff-table tbody tr:hover { background: var(--color-green-tint); }

.staff-table__nick {
  font-weight: 600;
}

/* ===================================================================
   Rules page
=================================================================== */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rules-category {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  padding: 28px clamp(20px, 4vw, 32px);
}

.rules-category__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.rules-category__num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-green-tint);
  color: var(--color-green-dark);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.rules-category__head h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.rule-items {
  display: flex;
  flex-direction: column;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}
.rule-item:first-child { border-top: none; }

.rule-item__code {
  flex-shrink: 0;
  width: 3ch;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.rule-item__text {
  flex: 1;
  min-width: 0;
  font-size: 0.96rem;
}

.rule-punishment {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.rule-punishment--mute {
  background: var(--color-blue-tint);
  color: var(--color-blue-dark);
}
.rule-punishment--tempban {
  background: #FDF1E0;
  color: #B4700F;
}
.rule-punishment--ban {
  background: #FBE4E4;
  color: #C22A2E;
}

@media (max-width: 640px) {
  .rule-item {
    flex-wrap: wrap;
  }
  .rule-item__text {
    flex-basis: 100%;
    order: 1;
  }
  .rule-punishment {
    order: 2;
    margin-left: calc(3ch + 16px);
  }
}

/* ===================================================================
   Auth (login) page
=================================================================== */
.auth-section {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}

.auth-container { display: flex; justify-content: center; }

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  margin-top: 10px;
  font-size: clamp(1.6rem, 1.4rem + 1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.auth-card > p { margin-top: 8px; color: var(--color-text-muted); font-size: 0.95rem; }

.auth-form { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.85rem; font-weight: 700; }

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  font: inherit;
  color: var(--color-text);
  transition: border-color 0.18s var(--ease-out), background 0.18s var(--ease-out);
}
.form-input:focus { outline: none; border-color: var(--color-green); background: var(--color-surface); }
.form-input.is-invalid { border-color: #E5484D; }

.form-error { min-height: 16px; font-size: 0.8rem; color: #E5484D; }

.input-wrap { position: relative; display: flex; }
.input-wrap .form-input { padding-right: 44px; }
.input-icon-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  transition: background 0.18s var(--ease-out), color 0.18s var(--ease-out);
}
.input-icon-btn:hover { background: var(--color-green-tint); color: var(--color-green-dark); }
.input-icon-btn .icon-eye-hide { display: none; }
.input-icon-btn[aria-pressed="true"] .icon-eye-show { display: none; }
.input-icon-btn[aria-pressed="true"] .icon-eye-hide { display: block; }

.form-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--color-text-muted); cursor: pointer; }
.form-check input { width: 16px; height: 16px; accent-color: var(--color-green); }

.auth-submit { width: 100%; margin-top: 4px; }

.form-success {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--color-green-tint);
  color: var(--color-green-dark);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.form-error-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(229, 72, 77, 0.12);
  color: #E5484D;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
}

/* ===================================================================
   Personal cabinet
=================================================================== */
.cabinet-page.cabinet-page--loading .cabinet-content { display: none; }

.cabinet-section {
  min-height: calc(100vh - var(--header-h));
  padding-block: clamp(40px, 6vw, 72px);
}

.cabinet-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: calc(100vh - var(--header-h) - 80px);
  color: var(--color-text-muted);
  font-weight: 600;
}
.cabinet-loading[hidden] { display: none; }

.cabinet-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-green);
  animation: cabinet-spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .cabinet-spinner { animation: none; }
}
@keyframes cabinet-spin {
  to { transform: rotate(360deg); }
}

.cabinet-head .badge { margin-bottom: 14px; }
.cabinet-head h1 {
  font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.cabinet-head h1 #cabinet-nickname-inline { color: var(--color-green-dark); }
.cabinet-head p { margin-top: 10px; color: var(--color-text-muted); font-size: 1rem; }

.cabinet-grid {
  margin-top: clamp(28px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-areas:
    "profile donate"
    "profile clan"
    "profile connect";
  gap: 20px;
  align-items: stretch;
}

.cabinet-card--profile { grid-area: profile; }
.cabinet-card--donate { grid-area: donate; }
.cabinet-card--clan { grid-area: clan; }
.cabinet-card--connect { grid-area: connect; }

.cabinet-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.cabinet-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.cabinet-card-text { color: var(--color-text-muted); font-size: 0.9rem; }

.cabinet-card--profile {
  align-items: center;
  text-align: center;
}

.cabinet-skin-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  padding-top: 16px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  overflow: hidden;
}

.cabinet-avatar {
  width: auto;
  height: 220px;
  max-width: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.cabinet-card-body { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.cabinet-nickname {
  font-size: 1.15rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.cabinet-logout { width: 100%; justify-content: center; }

.cabinet-donate-row { display: flex; flex-wrap: wrap; gap: 8px; }

.donate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--color-bg);
  color: var(--color-text-muted);
}
/* Цвет плашки по умолчанию — до ответа API или если ранг не в кодах Minecraft */
.donate-badge--free { background: var(--color-bg); color: var(--color-text-muted); }
.donate-badge--active { background: var(--color-green-tint); color: var(--color-green-dark); }
.donate-badge--time {
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-weight: 600;
}
.donate-badge--time[hidden] { display: none; }

.cabinet-card--donate .btn { align-self: flex-start; margin-top: auto; }

.cabinet-card--clan { justify-content: flex-start; }
.cabinet-clan-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cabinet-clan-name {
  font-size: 1.2rem;
  font-weight: 700;
}
.cabinet-clan-name--empty {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.clan-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
}
.clan-role-badge--leader { background: #FDF3DA; color: #92650B; }
.clan-role-badge--member { background: var(--color-bg); color: var(--color-text-muted); }
.clan-role-badge[hidden] { display: none; }

.cabinet-card--connect { justify-content: flex-start; }
.cabinet-ip {
  font-size: 1.2rem;
  font-weight: 700;
}
.cabinet-card--connect .btn { align-self: flex-start; margin-top: 4px; }

@media (max-width: 900px) {
  .cabinet-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "donate"
      "clan"
      "connect";
  }
}

/* ===================================================================
   Footer
=================================================================== */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding-top: clamp(48px, 7vw, 72px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand p { margin-top: 14px; max-width: 34ch; color: var(--color-footer-text); font-size: 0.94rem; }
.brand--footer .brand-name { color: #fff; }
.footer-ip {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: #fff;
}

.site-footer h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}

.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .contact-list a {
  color: var(--color-footer-text);
  font-size: 0.95rem;
  transition: color 0.18s var(--ease-out);
}
.footer-nav a:hover, .contact-list a:hover { color: #fff; }

.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; }
.contact-list .icon { color: var(--color-green); }

.footer-bottom {
  border-top: 1px solid var(--color-footer-border);
  padding-block: 20px;
}
.footer-bottom p { font-size: 0.85rem; color: rgba(255, 255, 255, 0.45); }
.footer-bottom p + p { margin-top: 6px; }
.footer-bottom p a { color: rgba(255, 255, 255, 0.6); text-decoration: underline; }
.footer-bottom p a:hover { color: var(--color-green); }

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
