@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap");

:root {
  --bg-0: #07090f;
  --bg-1: #0c141b;
  --bg-2: #101a22;
  --card: rgba(12, 18, 24, 0.92);
  --card-border: rgba(255, 255, 255, 0.08);
  --neon: #2fe7ff;
  --neon-deep: #1a9fff;
  --neon-glow: rgba(47, 231, 255, 0.25);
  --text: #e9f0f4;
  --muted: #9aa6b2;
  --danger: #ff7b7b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Sora", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #16202a, var(--bg-0));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(47, 231, 255, 0.12), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.45), transparent 55%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.02) 2px,
      transparent 2px,
      transparent 6px
    );
  pointer-events: none;
  z-index: -1;
}

.auth-shell,
.profile-shell {
  width: min(960px, 100%);
}

.auth-card,
.profile-card,
.stats-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(47, 231, 255, 0.08);
}

.auth-card--denied {
  border-color: rgba(255, 123, 123, 0.25);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(255, 123, 123, 0.16);
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon);
  border: 1px solid rgba(47, 231, 255, 0.4);
  background: rgba(47, 231, 255, 0.08);
  margin-bottom: 14px;
}

.auth-chip--warning {
  color: var(--danger);
  border-color: rgba(255, 123, 123, 0.35);
  background: rgba(255, 123, 123, 0.1);
}

.auth-title {
  font-size: 2rem;
  margin: 0 0 8px;
}

.auth-tagline {
  font-size: 1rem;
  margin: 0 0 18px;
  color: var(--text);
}

.auth-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 14px 0 0;
}

.auth-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: linear-gradient(145deg, var(--neon), var(--neon-deep));
  border-color: rgba(47, 231, 255, 0.55);
  box-shadow: 0 0 18px var(--neon-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(47, 231, 255, 0.35);
}

.btn-secondary {
  background: rgba(16, 24, 32, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 231, 255, 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
}

.profile-shell {
  display: grid;
  gap: 20px;
}

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

.profile-hero {
  display: flex;
  gap: 16px;
  align-items: center;
}

.profile-avatar {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 24px rgba(47, 231, 255, 0.2);
}

.profile-name {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.profile-tag {
  margin: 0;
  color: var(--muted);
}

.profile-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.meta-item {
  padding: 10px 12px;
  background: rgba(10, 15, 20, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.meta-value {
  font-size: 0.95rem;
}

.profile-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.status-item {
  padding: 12px;
  border-radius: 12px;
  background: rgba(10, 15, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
}

.status-good {
  color: var(--neon);
}

.status-bad {
  color: var(--danger);
}

.stats-card h2 {
  margin: 0 0 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-tile {
  padding: 14px;
  border-radius: 14px;
  background: rgba(10, 15, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-ledger__list {
  display: grid;
  gap: 10px;
}

.wallet-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.wallet-panel__hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.wallet-panel .wallet-ledger__list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.wallet-panel .wallet-ledger__item {
  padding: 10px;
}

.wallet-ledger__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(10, 15, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-ledger__reason {
  font-weight: 600;
}

.wallet-ledger__time {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

.wallet-ledger__delta {
  font-weight: 700;
  color: var(--neon);
}

.wallet-ledger__empty {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--muted);
  text-align: center;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.stat-value {
  font-size: 1.2rem;
  margin-top: 6px;
}

.stats-note {
  margin-top: 12px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .auth-card,
  .profile-card,
  .stats-card {
    padding: 22px;
  }

  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
