:root {
  color-scheme: dark;
  --bg: #080b09;
  --panel: rgba(17, 23, 19, 0.91);
  --panel-strong: #111713;
  --line: rgba(163, 180, 145, 0.2);
  --text: #eef2e9;
  --muted: #9ba598;
  --accent: #c8e35a;
  --accent-dark: #1b2414;
  --danger: #e07b68;
  --success: #a9d25f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(122, 139, 70, 0.12), transparent 33rem),
    linear-gradient(145deg, #090d0a 0%, #0d120f 52%, #070908 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,.025) 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(255,255,255,.018) 80px);
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

a { color: inherit; }

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(200, 227, 90, .5);
  color: var(--accent);
  background: rgba(200, 227, 90, .06);
  clip-path: polygon(50% 0, 100% 28%, 88% 86%, 50% 100%, 12% 86%, 0 28%);
}

.language-switcher { display: flex; gap: 6px; }

.language-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
}

.language-option:hover,
.language-option.is-active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, .04);
}

.hero-shell,
.auth-shell {
  flex: 1;
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  position: relative;
  z-index: 1;
}

.hero-shell { display: grid; align-items: center; padding: 44px 0 80px; }

.hero-card { max-width: 760px; padding: clamp(28px, 6vw, 68px); border-left: 1px solid var(--line); }

.status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.status-line span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.eyebrow { margin: 42px 0 12px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
h1 { max-width: 730px; margin: 0; font-size: clamp(2.65rem, 8vw, 6.5rem); line-height: .96; letter-spacing: -.055em; text-wrap: balance; }
.primary-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.home-page {
  background:
    radial-gradient(circle at 82% 18%, rgba(200, 227, 90, .16), transparent 26rem),
    radial-gradient(circle at 10% 78%, rgba(53, 98, 72, .22), transparent 34rem),
    linear-gradient(135deg, #050806 0%, #0a100c 48%, #050706 100%);
}

.home-page .atmosphere {
  opacity: .44;
  background-image:
    linear-gradient(rgba(200, 227, 90, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 227, 90, .025) 1px, transparent 1px),
    radial-gradient(circle at 75% 40%, rgba(200, 227, 90, .13), transparent 1px);
  background-size: 48px 48px, 48px 48px, 4px 4px;
  mask-image: radial-gradient(circle at center, #000 20%, transparent 82%);
}

.home-page .site-header {
  margin-top: 18px;
  padding: 0 20px;
  min-height: 64px;
  border: 1px solid rgba(200, 227, 90, .12);
  border-radius: 14px;
  background: rgba(7, 11, 8, .62);
  box-shadow: 0 14px 45px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

.home-page .hero-card {
  position: relative;
  isolation: isolate;
  max-width: 840px;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid rgba(200, 227, 90, .24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(23, 33, 25, .94), rgba(9, 14, 11, .88));
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .52),
    inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(20px);
}

.home-page .hero-card::after {
  content: "S.T.A.L.K.E.R // TERMINAL 01";
  position: absolute;
  right: -34px;
  bottom: 44px;
  z-index: -1;
  color: rgba(200, 227, 90, .055);
  font-size: clamp(2rem, 5vw, 4.8rem);
  font-weight: 900;
  letter-spacing: .04em;
  white-space: nowrap;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: right bottom;
}

.home-page .status-line {
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid rgba(200, 227, 90, .2);
  border-radius: 999px;
  background: rgba(200, 227, 90, .045);
}

.home-page .eyebrow { margin-top: 34px; }

.home-page h1 {
  color: transparent;
  background: linear-gradient(105deg, #f7faef 8%, #dfe9c5 58%, #9fb55a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  text-shadow: 0 12px 45px rgba(0, 0, 0, .28);
}

.home-page .button {
  min-height: 52px;
  border-radius: 12px;
}

.home-page .button-primary {
  box-shadow: 0 10px 30px rgba(200, 227, 90, .16);
}

.home-page .button-secondary {
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(10px);
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.button:hover { transform: translateY(-1px); }
.button-primary { color: #11150b; background: var(--accent); }
.button-primary:hover { background: #d7ef77; }
.button-secondary { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.035); }
.button-secondary:hover { border-color: rgba(200, 227, 90, .45); }
.button-full { width: 100%; }

.info-drawer { max-width: 620px; margin-top: 34px; color: var(--muted); border-top: 1px solid var(--line); }
.info-drawer summary { padding: 17px 0; color: var(--text); font-weight: 700; cursor: pointer; }
.info-drawer p { margin: 0 0 18px; font-size: .92rem; }
.site-footer { min-height: 64px; display: flex; justify-content: space-between; gap: 20px; color: #707970; font-size: .75rem; }

.auth-shell { display: grid; place-items: center; padding: 26px 0 70px; }
.auth-card { width: min(100%, 520px); padding: clamp(24px, 5vw, 42px); border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.auth-card h1 { font-size: clamp(2rem, 7vw, 3.4rem); }
.auth-intro { margin: 14px 0 28px; color: var(--muted); }
.field { margin-top: 18px; }
.field-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: .84rem; font-weight: 750; }
.optional { color: var(--muted); font-weight: 500; }
.field input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: #0b100d;
  font: inherit;
}
.field input:focus { border-color: rgba(200, 227, 90, .65); box-shadow: 0 0 0 3px rgba(200, 227, 90, .08); }
.field-hint, .field-status { min-height: 18px; margin: 6px 2px 0; color: var(--muted); font-size: .76rem; }
.field-status[data-state="success"] { color: var(--success); }
.field-status[data-state="error"], .field-error { color: var(--danger); }
.field-status[data-state="checking"] { color: #d6c88d; }
.form-actions { margin-top: 28px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 20px; color: var(--muted); font-size: .84rem; }
.auth-links a { color: var(--text); }
.notice { margin: 0 0 22px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; font-size: .88rem; }
.notice-error { color: #ffd3cb; border-color: rgba(224,123,104,.4); background: rgba(224,123,104,.09); }
.notice-success { color: #e7ffc0; border-color: rgba(169,210,95,.35); background: rgba(169,210,95,.08); }
.welcome-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 34px; }
.admin-card { width: min(100%, 720px); }
.admin-dashboard { width: min(100%, 980px); }
.admin-dashboard h1 { font-size: clamp(2.4rem, 7vw, 5rem); }
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}
.admin-project-button {
  min-height: 76px;
  justify-content: flex-start;
  padding-inline: 20px;
  text-align: left;
}
.field select, .field textarea {
  width: 100%; padding: 13px 14px; color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; outline: none; background: #0b100d; font: inherit;
}
.field select:focus, .field textarea:focus { border-color: rgba(200,227,90,.65); box-shadow: 0 0 0 3px rgba(200,227,90,.08); }
.field textarea { min-height: 130px; resize: vertical; }

@media (max-width: 620px) {
  .site-header { min-height: 68px; }
  .brand { letter-spacing: .13em; }
  .hero-shell, .auth-shell { width: min(100% - 22px, 1180px); }
  .hero-card { padding: 32px 14px 42px 22px; }
  .eyebrow { margin-top: 30px; }
  .primary-actions .button { flex: 1 1 150px; }
  .site-footer { width: calc(100% - 28px); flex-direction: column; justify-content: center; padding: 16px 0; }
  .language-option span:last-child { display: none; }
  .admin-grid { grid-template-columns: 1fr; }
  .home-page .site-header { margin-top: 10px; padding-inline: 14px; }
  .home-page .hero-card { border-radius: 18px; padding: 28px 22px 34px; }
  .home-page .hero-card::after { display: none; }
}
