/* ─── TOKENS ─── */
:root {
  --bg:           #0d0909;
  --bg-mid:       #150d0d;
  --red:          #e53935;
  --red-light:    #ff6b6b;
  --red-dim:      #9b1c1c;
  --red-glow:     rgba(229, 57, 53, 0.35);
  --glass-bg:     rgba(22, 10, 10, 0.6);
  --glass-border: rgba(255, 107, 107, 0.2);
  --text-primary: #f5eded;
  --text-secondary: #9e8a8a;
  --text-accent:  #ff6b6b;
  --radius-card:  20px;
  --radius-btn:   12px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* ─── SCANLINES ─── */
.bg-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 3px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* ─── GRID ─── */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(229,57,53,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229,57,53,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ─── SVG DECOR ─── */
.bg-decor {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.bg-decor line, .bg-decor polyline {
  stroke: var(--red);
  stroke-width: 1;
  opacity: 0.1;
  fill: none;
  stroke-linecap: round;
}
.bg-decor polygon {
  fill: var(--red);
  opacity: 0.12;
}
.bg-decor circle {
  fill: var(--red-light);
  opacity: 0.18;
}

/* ─── ORB GLOWS ─── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.orb--tr {
  width: 500px;
  height: 500px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(229,57,53,0.18) 0%, transparent 70%);
}
.orb--bl {
  width: 460px;
  height: 460px;
  bottom: -140px;
  left: -100px;
  background: radial-gradient(circle, rgba(255,107,107,0.12) 0%, transparent 70%);
}

/* ─── STAGE ─── */
.stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  width: 100%;
  padding: 32px 16px;
}

/* ─── CARD ─── */
.card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 36px 28px 28px;
  border-radius: var(--radius-card);
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* gradient border */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  padding: 1px;
  background: linear-gradient(
    140deg,
    rgba(255, 107, 107, 0.55) 0%,
    rgba(229, 57, 53, 0.12) 45%,
    rgba(255, 107, 107, 0.08) 70%,
    rgba(255, 107, 107, 0.45) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* gloss line */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}

/* ─── EYEBROW ─── */
.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--red-light);
  opacity: 0.7;
  margin-bottom: 18px;
  text-transform: lowercase;
  align-self: flex-start;
}
.eyebrow span { opacity: 0.5; margin-right: 3px; }

/* ─── AVATAR ─── */
.avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin-bottom: 18px;
}

.avatar-ring-svg {
  position: absolute;
  inset: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  animation: ring-spin 8s linear infinite;
  filter: drop-shadow(0 0 6px rgba(229,57,53,0.5));
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar svg { width: 100%; height: 100%; }

/* ─── TEXT ─── */
.nickname {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
  text-align: center;
}

.tagline {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 22px;
  letter-spacing: 0.01em;
}

.code-accent {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-accent);
  opacity: 0.75;
}

/* ─── DIVIDER ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}
.divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(229,57,53,0.25), transparent);
}
.divider svg { flex-shrink: 0; }

/* ─── LINK BUTTONS ─── */
.links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  margin-bottom: 22px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.065);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

/* hover sweep */
.link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(229,57,53,0.08) 50%, transparent 100%);
  transform: translateX(-110%);
  transition: transform 0.45s ease;
}
.link-btn:hover::before { transform: translateX(110%); }

.link-btn:hover {
  transform: translateY(-2px);
  background: rgba(229, 57, 53, 0.1);
  border-color: rgba(229, 57, 53, 0.32);
  box-shadow: 0 0 16px rgba(229,57,53,0.15), 0 4px 18px rgba(0,0,0,0.35);
}
.link-btn:hover .link-btn__icon { color: var(--red-light); }

.link-btn:active { transform: translateY(0) scale(0.98); }

.link-btn__icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  color: var(--text-secondary);
}
.link-btn__icon svg { width: 19px; height: 19px; }

.link-btn__label { flex: 1; }

.link-btn__arrow {
  font-size: 0.72rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  color: var(--red-light);
}
.link-btn:hover .link-btn__arrow { opacity: 1; transform: translateX(0); }

.link-btn:focus-visible {
  outline: 2px solid var(--red-light);
  outline-offset: 3px;
}

/* ─── FOOTER ─── */
.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 7px rgba(74,222,128,0.75);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.status-text {
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.status-sep {
  font-size: 0.72rem;
  color: var(--red-dim);
  opacity: 0.5;
}

/* ─── ANIMATIONS ─── */
@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .avatar-ring-svg { animation: none; }
  .status-dot      { animation: none; }
  .card            { animation: none; }
  .link-btn::before { display: none; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 440px) {
  .card { padding: 28px 18px 24px; border-radius: 16px; }
  .nickname { font-size: 1.6rem; }
  .avatar-wrap { width: 80px; height: 80px; }
}

@media (min-width: 768px) {
  .card { padding: 44px 36px 36px; }
}