:root {
  --bg: #000000;
  --panel: rgba(5, 5, 5, 0.92);
  --border: rgba(177, 255, 76, 0.22);
  --text: #f5f7f1;
  --muted: rgba(245, 247, 241, 0.72);
  --lime-1: #c7ff62;
  --lime-2: #97e639;
  --lime-3: #5ea91b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius-xl: 34px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: #000; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: #000;
  color: var(--text);
  font-family: "M PLUS Rounded 1c", "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }

/* ── particles ────────────────────────────────────────────────────────────── */
.particles { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.particle {
  position: absolute;
  left: var(--left); top: var(--top);
  width: 6px; height: 6px;
  border-radius: 999px;
  background: #97e639;
  box-shadow: 0 0 10px rgba(151,230,57,.22);
  opacity: .3;
  animation: screenRun var(--duration) linear infinite alternate,
             blink var(--blink-duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

/* ── back btn ─────────────────────────────────────────────────────────────── */
.top-controls { position: fixed; top: 1rem; left: 1rem; z-index: 10; }

.back-btn {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(8,8,8,.88);
  box-shadow: 0 0 0 1px rgba(151,230,57,.18), 0 0 30px rgba(151,230,57,.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.back-btn svg { width: 20px; height: 20px; fill: none; stroke: #97e639; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back-btn:hover, .back-btn:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 0 1px rgba(151,230,57,.32), 0 0 40px rgba(151,230,57,.16);
}

/* ── page wrapper ─────────────────────────────────────────────────────────── */
.page { position: relative; z-index: 1; }

/* ══════════════════════════════════════════════════════════════════════════
   AUTH SCREEN
══════════════════════════════════════════════════════════════════════════ */
.auth-screen {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 3rem;
}

.layout {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* hero image */
.hero-img-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 560px;
}
.hero-img-glow {
  position: absolute; inset: 10% 15%;
  background: radial-gradient(circle at center, rgba(151,230,57,.22) 0%, rgba(151,230,57,.1) 36%, transparent 74%);
  filter: blur(36px); opacity: 1;
}
.hero-img {
  position: relative; z-index: 1;
  width: 100%; max-width: 340px; height: auto; object-fit: contain;
  border-radius: 32px;
  filter: drop-shadow(0 12px 34px rgba(0,0,0,.6)) drop-shadow(0 0 40px rgba(133,218,41,.22));
  animation: floatImage 6s ease-in-out infinite;
}

/* auth card */
.card {
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(177,255,76,.05), 0 0 54px rgba(116,191,31,.08), var(--shadow);
}

/* auth tabs */
.tabs {
  display: flex; gap: .3rem;
  margin-bottom: 1.4rem; padding: .3rem;
  border-radius: 18px;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(177,255,76,.1);
}
.tab {
  flex: 1; min-height: 40px; border: none; border-radius: 14px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.tab--active { background: rgba(151,230,57,.12); color: var(--lime-1); box-shadow: 0 0 18px rgba(151,230,57,.1); }
.tab:hover:not(.tab--active) { color: var(--text); background: rgba(255,255,255,.04); }

.panel--hidden { display: none; }

/* form */
.form__label { display: block; margin-top: .85rem; margin-bottom: .35rem; font-size: .9rem; color: var(--muted); }
.form__label:first-child { margin-top: 0; }
.form__input {
  width: 100%; min-height: 50px; padding: .85rem 1rem;
  border: 1px solid rgba(177,255,76,.12); border-radius: 16px;
  background: rgba(3,4,3,.9); color: var(--text);
  font: inherit; font-size: 1rem; outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.form__input::placeholder { color: rgba(245,247,241,.28); }
.form__input:focus {
  border-color: rgba(151,230,57,.36);
  box-shadow: 0 0 0 1px rgba(151,230,57,.08), 0 0 24px rgba(151,230,57,.1);
  transform: translateY(-1px);
}
.form__error {
  margin: .6rem 0 0; padding: .55rem .9rem;
  border-radius: 12px;
  background: rgba(255,60,60,.08); border: 1px solid rgba(255,60,60,.2);
  color: #ff7070; font-size: .88rem; line-height: 1.4;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 1.4rem;
  border: none; border-radius: 18px;
  font: inherit; font-weight: 600; cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.btn--primary {
  width: 100%; margin-top: 1.1rem;
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, var(--lime-1), var(--lime-2), var(--lime-3));
  color: #081004;
  box-shadow: 0 16px 34px rgba(94,169,27,.22), 0 0 26px rgba(151,230,57,.1);
}
.btn--primary::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.26), transparent);
  transform: skewX(-18deg);
  animation: btnShine 3.5s ease-in-out infinite;
}
@keyframes btnShine {
  0%   { left: -100%; }
  40%  { left: 130%; }
  100% { left: 130%; }
}
.btn--primary:hover, .btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(94,169,27,.28), 0 0 34px rgba(151,230,57,.18);
  filter: saturate(1.04);
}
.profile-card__dl {
  width: 100%;
  margin-top: 1rem;
  text-decoration: none;
}
.product-card--info { opacity: .82; }
.product-card--info .product-card__body::after {
  content: "скоро";
  display: inline-block;
  margin-top: .8rem;
  padding: .3rem .8rem;
  border-radius: 10px;
  background: rgba(151,230,57,.08);
  border: 1px solid rgba(151,230,57,.18);
  color: var(--lime-2);
  font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(151,230,57,.24);
  color: var(--lime-2);
}
.btn--outline:hover, .btn--outline:focus-visible {
  border-color: rgba(151,230,57,.44);
  background: rgba(151,230,57,.06);
  box-shadow: 0 0 20px rgba(151,230,57,.1);
}
.btn--sm { min-height: 40px; padding: 0 1rem; font-size: .9rem; margin-top: 0; width: auto; }

.accent {
  color: transparent;
  background: linear-gradient(90deg, var(--lime-1), var(--lime-2), var(--lime-3));
  -webkit-background-clip: text; background-clip: text;
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }

.dashboard {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 4.5rem;
}

/* ── dashboard tabs — centered ────────────────────────────────────────────── */
.dash-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: .6rem 1.2rem;
  background: rgba(4,4,4,.92);
  border-bottom: 1px solid rgba(177,255,76,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dash-nav__tabs {
  grid-column: 2;
  display: flex;
  gap: .3rem;
}

.dash-nav__right {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}

.dash-nav__login {
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.dash-tab {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px; padding: 0 1rem;
  border: none; border-radius: 14px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.dash-tab svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dash-tab--active { background: rgba(151,230,57,.12); color: var(--lime-1); }
.dash-tab:hover:not(.dash-tab--active) { color: var(--text); background: rgba(255,255,255,.05); }

/* panels */
.dpanel { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.dpanel--hidden { display: none; }

/* ── shop grid ────────────────────────────────────────────────────────────── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(177,255,76,.04), 0 14px 36px rgba(0,0,0,.28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(151,230,57,.18), 0 20px 48px rgba(0,0,0,.36), 0 0 32px rgba(151,230,57,.08);
}

.product-card__img-wrap {
  position: relative;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(177,255,76,.1);
}
.product-card__img-wrap::before {
  content: "";
  position: absolute; inset: 10% 20%;
  background: radial-gradient(circle at center, rgba(151,230,57,.2) 0%, transparent 70%);
  filter: blur(20px);
}
.product-card__img {
  position: relative; z-index: 1;
  width: 90px; height: 90px;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.5)) drop-shadow(0 0 18px rgba(133,218,41,.18));
}

.product-card__body {
  padding: 1.2rem;
  display: flex; flex-direction: column; gap: .5rem;
  flex: 1;
}
.product-card__name {
  margin: 0;
  font-size: 1.1rem; font-weight: 600; letter-spacing: -.03em;
  color: var(--text);
}
.product-card__desc {
  margin: 0;
  font-size: .88rem; color: var(--muted); line-height: 1.4;
  flex: 1;
}
.product-card__price {
  margin: 0;
  font-size: 1.5rem; font-weight: 600; letter-spacing: -.04em;
  color: transparent;
  background: linear-gradient(90deg, var(--lime-1), var(--lime-2));
  -webkit-background-clip: text; background-clip: text;
}
.product-card__price span {
  font-size: .85rem; opacity: .8;
  color: var(--lime-2);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.btn--buy { margin-top: .4rem; }

/* ── profile card ─────────────────────────────────────────────────────────── */
.profile-card {
  max-width: 480px;
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; text-align: center;
}
.profile-card__avatar {
  width: 80px; height: 80px;
  border-radius: 999px;
  background: rgba(151,230,57,.1);
  border: 1px solid rgba(151,230,57,.22);
  display: flex; align-items: center; justify-content: center;
}
.profile-card__avatar svg {
  width: 36px; height: 36px;
  fill: none; stroke: var(--lime-2); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.profile-card__login {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 600; letter-spacing: -.04em;
}
.profile-card__rows { width: 100%; display: flex; flex-direction: column; gap: .5rem; }
.profile-card__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1rem;
  border-radius: 14px;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(177,255,76,.08);
}
.profile-card__label { font-size: .85rem; color: var(--muted); }
.profile-card__value { font-size: .9rem; font-weight: 600; color: var(--text); }

/* ── animations ───────────────────────────────────────────────────────────── */
@keyframes floatImage {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
@keyframes screenRun {
  0%   { transform: translate3d(0,0,0) scale(1); }
  35%  { transform: translate3d(calc(var(--shift-x)*.48),calc(var(--shift-y)*-.24),0) scale(1.05); }
  68%  { transform: translate3d(calc(var(--shift-x)*-.36),calc(var(--shift-y)*.62),0) scale(.96); }
  100% { transform: translate3d(var(--shift-x),var(--shift-y),0) scale(1.08); }
}
@keyframes blink {
  0%, 100% { opacity: .2; }
  50%       { opacity: .56; }
}

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; gap: 2rem; }
  .hero-img-wrap { min-height: 380px; }
  .hero-img { max-width: 560px; }
}
@media (max-width: 680px) {
  .auth-screen { padding: 4rem .6rem 2rem; }
  .hero-img-wrap { min-height: 300px; }
  .hero-img { max-width: 380px; }
  .card { padding: 1.2rem; }
  .dash-nav { padding: .5rem .8rem; }
  .dash-tab { padding: 0 .7rem; font-size: .82rem; }
  .dpanel { width: calc(100% - 1rem); padding: 1.5rem 0 3rem; }
  .shop-grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
  .product-card__img { width: 72px; height: 72px; }
}
@media (max-width: 420px) {
  .shop-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ── payment modal ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1rem;
}

.modal {
  width: min(420px, 100%);
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(8, 10, 8, 0.96);
  box-shadow:
    0 0 0 1px rgba(177, 255, 76, 0.06),
    0 0 60px rgba(116, 191, 31, 0.1),
    0 32px 64px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: modalIn 220ms ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__oops {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  color: transparent;
  background: linear-gradient(90deg, var(--lime-1), var(--lime-2), var(--lime-3));
  -webkit-background-clip: text;
  background-clip: text;
}

.modal__text {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
}

.modal__sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.modal__link {
  color: var(--lime-2);
  text-decoration: none;
  font-weight: 600;
  transition: color 150ms ease;
}

.modal__link:hover {
  color: var(--lime-1);
  text-decoration: underline;
}

.modal__ok {
  margin-top: 0.6rem;
}
