/* --- GhostChat Shop — стекло + mesh-сеть на фоне --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:         #020617;
  --bg-deep:    #060a1a;
  --surface:    rgba(15, 23, 42, 0.35);
  --surface2:   rgba(30, 41, 59, 0.55);
  --border:     rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --primary:    #a855f7;
  --primary2:   #7c3aed;
  --text:       #f1f5f9;
  --sub:        #94a3b8;
  --muted:      #64748b;
  --green:      #4ade80;
  --red:        #f87171;
  --yellow:     #fbbf24;
  --blue:       #60a5fa;
  --radius:     18px;
}

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

body {
  background: transparent;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* --- Mesh canvas layer --- */
#mesh-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* Deep gradient overlay (под mesh) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 20% 0%,  rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(70% 60% at 100% 100%, rgba(168, 85, 247, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
}

a { color: var(--primary); text-decoration: none; }

/* ---------------- NAV ---------------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 20px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--sub); font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-btn {
  padding: 8px 18px; border-radius: 10px; border: 1px solid var(--border-strong);
  cursor: pointer;
  background: rgba(168, 85, 247, 0.12);
  color: var(--text); font-size: 14px; font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.nav-btn:hover { background: rgba(168, 85, 247, 0.22); border-color: rgba(168, 85, 247, 0.5); }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* Profile dropdown */
.profile-wrap { position: relative; }
.profile-btn {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: white; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.35);
}
.profile-btn:hover { transform: scale(1.06); }
.profile-menu {
  position: absolute; top: 46px; right: 0; min-width: 230px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: none;
}
.profile-menu.show { display: block; }
.profile-menu .pm-head {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--sub);
}
.profile-menu .pm-head b { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; }
.profile-menu a, .profile-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  background: transparent; border: none; color: var(--text); font-size: 14px;
  border-radius: 8px; cursor: pointer; font-family: inherit; text-decoration: none;
}
.profile-menu a:hover, .profile-menu button:hover { background: var(--surface2); }
.profile-menu .pm-sep { border-top: 1px solid var(--border); margin: 4px 0; }

/* ---------------- PAGE ---------------- */
.page {
  position: relative; z-index: 2;
  padding: 120px 24px 80px;
  max-width: 1100px; margin: 0 auto;
}

/* Glass card */
.card {
  background: var(--surface);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* Typography */
h1 { font-size: clamp(36px, 6vw, 54px); font-weight: 800; line-height: 1.08; letter-spacing: -1.5px; margin-bottom: 14px; }
h1 .grad {
  background: linear-gradient(135deg, #c084fc, #a855f7, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
p  { color: var(--sub); line-height: 1.6; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------------- BUTTONS ---------------- */
.btn {
  padding: 12px 22px; border-radius: 12px; cursor: pointer;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s, opacity 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  color: white;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(168, 85, 247, 0.5); }
.btn-outline {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(168, 85, 247, 0.5); }
.btn-ghost {
  background: transparent; color: var(--sub); padding: 10px 16px;
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn-danger {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--red);
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.18); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------------- FORMS ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 15px; font-family: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--muted); }
.input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(2, 6, 23, 0.65);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}

/* Read-only info box (like disabled input) */
.info-box {
  padding: 11px 14px; border-radius: 12px;
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid var(--border);
  font-size: 14px; color: var(--text);
}

/* ---------------- BADGES ---------------- */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  backdrop-filter: blur(8px);
}
.badge-green  { background: rgba(74,222,128,0.12);  color: var(--green);   border: 1px solid rgba(74,222,128,0.3); }
.badge-purple { background: rgba(168,85,247,0.12);  color: var(--primary); border: 1px solid rgba(168,85,247,0.3); }
.badge-yellow { background: rgba(251,191,36,0.12);  color: var(--yellow);  border: 1px solid rgba(251,191,36,0.3); }
.badge-red    { background: rgba(248,113,113,0.12); color: var(--red);     border: 1px solid rgba(248,113,113,0.3); }
.badge-blue   { background: rgba(96,165,250,0.12);  color: var(--blue);    border: 1px solid rgba(96,165,250,0.3); }

/* ---------------- TOAST ---------------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  padding: 12px 20px; border-radius: 12px; font-size: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.toast.show { opacity: 1; }
.toast.error { border-color: rgba(248, 113, 113, 0.4); }
.toast.success { border-color: rgba(74, 222, 128, 0.4); }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 768px) {
  nav { padding: 12px 16px; }
  .nav-links { display: none; }
  .page { padding: 100px 16px 40px; }
  .card { padding: 20px; border-radius: 14px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.5); }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  #mesh-bg { display: none; }
}
