﻿/* ========================================
   Professional Design System
   ======================================== */
:root {
  --bg: #050508;
  --bg-deep: #030305;
  --surface: rgba(15, 15, 25, 0.6);
  --surface-hover: rgba(20, 20, 35, 0.7);
  --surface-strong: rgba(25, 25, 45, 0.85);
  --border: rgba(80, 80, 120, 0.12);
  --border-hover: rgba(0, 212, 170, 0.25);
  --border-strong: rgba(0, 212, 170, 0.4);
  --text: #f5f5fa;
  --text-dim: #c8c8dc;
  --text-muted: #8888a8;
  --text-faint: #585878;
  --accent: #00d4aa;
  --accent-weak: rgba(0, 212, 170, 0.08);
  --accent-mid: rgba(0, 212, 170, 0.18);
  --accent-strong: rgba(0, 212, 170, 0.35);
  --accent-glow: rgba(0, 212, 170, 0.5);
  --accent-2: #6366f1;
  --accent-2-weak: rgba(99, 102, 241, 0.08);
  --accent-2-glow: rgba(99, 102, 241, 0.4);
  --online: #43b581;
  --idle: #faa61a;
  --dnd: #f04747;
  --offline: #747f8d;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --space-1: 0.125rem;
  --space-2: 0.25rem;
  --space-3: 0.5rem;
  --space-4: 0.75rem;
  --space-5: 1rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
  --shadow-xl: 0 32px 96px rgba(0,0,0,0.6);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 120ms;
  --duration-base: 240ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  --header-h: 52px;
  --avatar-size: 128px;
  --max-content: 520px;
  --z-bg: 0;
  --z-vignette: 1;
  --z-content: 2;
  --z-header: 100;
  --z-tooltip: 200;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; border: none; background: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-mid); color: var(--text); }
#starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-bg); display: block; }
.noise-overlay { position: fixed; inset: 0; z-index: calc(var(--z-bg) + 1); pointer-events: none; opacity: 0.03; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E"); }
.vignette { position: fixed; inset: 0; z-index: var(--z-vignette); pointer-events: none; background: radial-gradient(ellipse 80% 60% at 50% 40%, transparent 0%, rgba(5,5,8,0.35) 55%, rgba(5,5,8,0.7) 85%, var(--bg) 100%); }
.app { position: relative; z-index: var(--z-content); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-7) var(--space-5); }
.rich-presence { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--max-content); height: var(--header-h); display: flex; align-items: center; justify-content: center; padding: 0 var(--space-5); z-index: var(--z-header); pointer-events: none; }
.rich-presence-track { width: 100%; overflow: hidden; background: linear-gradient(90deg, transparent, var(--accent-weak), transparent); border: 1px solid var(--border); border-radius: var(--radius-full); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); padding: var(--space-2) var(--space-5); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.02); }
.rich-presence-text { display: inline-block; white-space: nowrap; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; padding: 0 var(--space-8); animation: marquee 24s linear infinite; will-change: transform; }
.rich-presence-text.paused { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .rich-presence-text { animation: none; transform: none; white-space: normal; overflow: hidden; text-overflow: ellipsis; } }
.main-content { display: flex; flex-direction: column; align-items: center; gap: var(--space-7); width: 100%; max-width: var(--max-content); padding-top: calc(var(--header-h) + var(--space-8)); }

.avatar-group { position: relative; width: var(--avatar-size); height: var(--avatar-size); flex-shrink: 0; }
.avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--shadow-lg), 0 0 0 1px var(--border), 0 0 60px -10px var(--accent-glow); transition: transform var(--duration-slow) var(--ease-out), filter var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out); }
.avatar-group:hover .avatar { transform: scale(1.03); filter: brightness(1.08) saturate(1.1); border-color: var(--accent); box-shadow: var(--shadow-xl), 0 0 0 1px var(--accent), 0 0 80px -10px var(--accent-glow); }

.status-ring { position: absolute; inset: -6px; border-radius: 50%; border: 4px solid; box-shadow: 0 0 0 3px var(--bg), 0 0 30px currentColor; animation: pulse-ring 3s ease-in-out infinite; will-change: opacity, transform; }
@keyframes pulse-ring { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(1.08); } }
.status-ring.online { border-color: var(--online); color: var(--online); }
.status-ring.idle { border-color: var(--idle); color: var(--idle); }
.status-ring.dnd { border-color: var(--dnd); color: var(--dnd); }
.status-ring.offline { border-color: var(--offline); color: var(--offline); animation: none; }
@media (prefers-reduced-motion: reduce) { .status-ring { animation: none; } }

.avatar[src=""] { background: linear-gradient(135deg, var(--surface), var(--surface-hover)); }

.info-group { text-align: center; width: 100%; }
.username { font-family: var(--font-display); font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 700; letter-spacing: -0.025em; color: var(--text); margin-bottom: var(--space-3); text-shadow: 0 2px 24px rgba(0,0,0,0.6); word-break: break-word; animation: fadeUp 0.7s var(--ease-out) forwards; opacity: 0; }
.status-badge { display: inline-flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: 0.8125rem; font-weight: 500; color: var(--text-dim); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); animation: fadeUp 0.7s var(--ease-out) 0.1s forwards; opacity: 0; }
.status-badge:hover { border-color: var(--border-hover); background: var(--surface-hover); box-shadow: 0 0 20px -5px var(--accent-glow); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 12px currentColor; flex-shrink: 0; }
.status-badge.online .status-dot { background: var(--online); color: var(--online); }
.status-badge.idle .status-dot { background: var(--idle); color: var(--idle); }
.status-badge.dnd .status-dot { background: var(--dnd); color: var(--dnd); }
.status-badge.offline .status-dot { background: var(--offline); color: var(--offline); }
.status-label { text-transform: capitalize; letter-spacing: 0.02em; }

.custom-status { display: inline-flex; align-items: center; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-3) var(--space-5); background: var(--accent-mid); border: 1px solid var(--border-strong); border-radius: var(--radius-full); font-size: 0.875rem; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); animation: fadeUp 0.5s var(--ease-out) 0.2s forwards; opacity: 0; }
.custom-emoji { font-size: 1.25rem; flex-shrink: 0; }
.custom-text { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

.bio { text-align: center; max-width: 55ch; padding: 0 var(--space-5); animation: fadeUp 0.7s var(--ease-out) 0.3s forwards; opacity: 0; }
.bio-line { font-size: clamp(0.9375rem, 2.5vw, 1.125rem); line-height: 1.8; color: var(--text-dim); font-weight: 400; }
.bio-line:first-child { margin-bottom: var(--space-2); }
.bio-line strong { color: var(--text); font-weight: 600; }
.bio-line .sep { color: var(--text-faint); margin: 0 var(--space-2); }
.bio-line .highlight { color: var(--accent); font-weight: 500; }
.footer { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--border); width: 100%; max-width: var(--max-content); animation: fadeUp 0.7s var(--ease-out) 0.4s forwards; opacity: 0; }
.social-links { display: flex; justify-content: center; gap: var(--space-4); flex-wrap: wrap; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); transition: all var(--duration-base) var(--ease-out); }
.social-link:hover, .social-link:focus-visible { background: var(--surface-hover); border-color: var(--accent); color: var(--accent); transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 24px -8px var(--accent-glow); }
.social-link svg { width: 20px; height: 20px; flex-shrink: 0; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } .avatar, .status-ring, .rich-presence-text, .custom-status { animation: none; } }

@media (max-width: 560px) { :root { --header-h: 44px; --avatar-size: 104px; --space-7: 1.5rem; --space-8: 2rem; } .rich-presence-text { font-size: 0.7rem; } .custom-status { font-size: 0.8125rem; padding: var(--space-2) var(--space-4); } .bio-line { font-size: 0.9375rem; } .username { font-size: clamp(1.5rem, 6vw, 2.25rem); } .social-link { width: 40px; height: 40px; } }

@media (max-height: 720px) { :root { --avatar-size: 96px; } .main-content { gap: var(--space-5); } .bio-line { font-size: 0.9375rem; } }

@media (prefers-contrast: high) { :root { --border: rgba(255,255,255,0.2); --border-hover: var(--accent); --text-dim: var(--text); --text-muted: var(--text-dim); } }

/* ========================================
   Letreiro - Vertical Scrolling Marquee
   ======================================== */
.letreiro {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: var(--max-content);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: var(--z-header);
}
.letreiro-track {
  width: 100%;
  height: 100%;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
}
.letreiro-text {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 0 var(--space-4);
  animation: letreiro-scroll 30s linear infinite;
  will-change: transform;
}
@keyframes letreiro-scroll {
  0% { transform: translateY(100%); }
  100% { transform: translateY(-100%); }
}
@media (prefers-reduced-motion: reduce) { .letreiro-text { animation: none; transform: none; } }

/* ========================================
   Status Indicator (replaces status-ring)
   ======================================== */
.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid;
  box-shadow: 0 0 0 2px var(--bg), 0 0 20px currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.status-indicator::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}
.status-indicator.online { border-color: var(--online); color: var(--online); }
.status-indicator.idle { border-color: var(--idle); color: var(--idle); }
.status-indicator.dnd { border-color: var(--dnd); color: var(--dnd); }
.status-indicator.offline { border-color: var(--offline); color: var(--offline); }
.avatar-group:hover .status-indicator { transform: scale(1.1); }

/* ========================================
   Text Ring around Avatar
   ======================================== */
.text-ring {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
.text-ring span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  transform-origin: center center;
  animation: text-ring-orbit 60s linear infinite;
}
.text-ring span:nth-child(1) { animation-delay: 0s; }
.text-ring span:nth-child(2) { animation-delay: -7.5s; }
.text-ring span:nth-child(3) { animation-delay: -15s; }
.text-ring span:nth-child(4) { animation-delay: -22.5s; }
.text-ring span:nth-child(5) { animation-delay: -30s; }
.text-ring span:nth-child(6) { animation-delay: -37.5s; }
.text-ring span:nth-child(7) { animation-delay: -45s; }
.text-ring span:nth-child(8) { animation-delay: -52.5s; }
@keyframes text-ring-orbit {
  0% { transform: rotate(0deg) translateY(-50%) translateX(-50%) rotate(0deg); }
  100% { transform: rotate(360deg) translateY(-50%) translateX(-50%) rotate(-360deg); }
}
@media (prefers-reduced-motion: reduce) { .text-ring span { animation: none; } }

/* ========================================
   Bio Pills
   ======================================== */
.bio-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.bio-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dim);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all var(--duration-fast) var(--ease-out);
  animation: fadeUp 0.5s var(--ease-out) calc(0.3s + var(--i, 0) * 0.08s) forwards;
  opacity: 0;
}
.bio-pill.highlight {
  background: var(--accent-mid);
  border-color: var(--accent);
  color: var(--accent);
}
.bio-pill:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.bio-pill.highlight:hover {
  box-shadow: 0 4px 16px -4px var(--accent-glow);
}

/* ========================================
   Minimal Rich Presence (Letreiro)
   ======================================== */
.rich-presence-text {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 0 var(--space-4);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color var(--duration-fast) var(--ease-out);
}
.rich-presence-text:hover { color: var(--accent); }
.rich-presence-track { cursor: default; }
@media (prefers-reduced-motion: reduce) { .rich-presence-text { animation: none; } }

/* Avatar load state */
.avatar[src=""] { background: linear-gradient(135deg, var(--surface), var(--surface-hover)); }
