/* =============================================
   GAMESTORE — Perfil
   Mismo sistema "Glass Blue" que el resto del sitio
   ============================================= */

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

:root {
  --void:       #04060b;
  --ink:        #070a11;
  --graphite:   #10141d;
  --graphite-2: #171d29;

  --blue:       #2f6bff;
  --blue-hi:    #5d93ff;
  --blue-deep:  #1743b8;
  --blue-ice:   #a9c6ff;

  --green:      #17c964;
  --red:        #ff3b4e;
  --amber:      #ffa62b;

  --glass:      rgba(21, 27, 39, 0.58);
  --glass-hi:   rgba(31, 40, 56, 0.72);
  --glass-rail: rgba(7, 10, 17, 0.66);
  --blur:       blur(22px) saturate(160%);
  --blur-soft:  blur(14px) saturate(140%);

  --line:       rgba(120, 165, 255, 0.13);
  --line-hi:    rgba(120, 165, 255, 0.32);
  --edge:       inset 0 1px 0 rgba(255, 255, 255, 0.055);

  --text:       #eef2fb;
  --text2:      #9aa6bd;
  --text3:      #5d6880;

  --transition: 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-lift: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  --shadow-blue: 0 10px 34px -12px rgba(47, 107, 255, 0.55);

  /* alias heredados */
  --bg:      var(--void);
  --bg2:     var(--ink);
  --card:    var(--glass);
  --card2:   var(--glass-hi);
  --border:  var(--line);
  --border2: var(--line-hi);
  --accent:  var(--blue);
  --accent2: var(--blue-hi);
  --accent3: var(--blue-ice);
  --glow:    rgba(47, 107, 255, 0.32);
  --yellow:  var(--amber);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; background: var(--void); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--void);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Campo de luz fijo: da sustancia al desenfoque */
body::before {
  content: '';
  position: fixed;
  inset: -20vh -20vw;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(48vw 48vw at 20% -8%, rgba(47, 107, 255, 0.36), transparent 62%),
    radial-gradient(36vw 36vw at 94% 18%, rgba(23, 67, 184, 0.28), transparent 66%),
    radial-gradient(30vw 30vw at 74% 92%, rgba(23, 201, 100, 0.10), transparent 68%),
    radial-gradient(26vw 26vw at 4% 88%,  rgba(255, 59, 78, 0.09),  transparent 70%);
  filter: blur(30px);
}

h1, h2, .profile-name, .stat-pill .num, .site-card-name {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 2px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: rgba(120, 165, 255, 0.22); border-radius: 5px; }
::selection { background: rgba(47, 107, 255, 0.35); color: #fff; }

/* ===== Barra superior ===== */
.back-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass-rail);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--edge);
}

.back-btn {
  background: var(--glass-hi);
  border: 1px solid var(--line);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  text-decoration: none;
}
.back-btn:hover { border-color: var(--line-hi); color: var(--blue-ice); }

.back-nav-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

/* ===== Portada ===== */
.profile-cover {
  height: 168px;
  background: linear-gradient(160deg, #08122c 0%, #050a18 55%, #04060b 100%);
  position: relative;
  overflow: hidden;
  margin-top: 62px;
  border-bottom: 1px solid var(--line);
}

.cover-particles { position: absolute; inset: 0; overflow: hidden; }

.cover-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.55;
  animation: float 7s ease-in-out infinite;
}

.cover-orb:nth-child(1) {
  width: 140px; height: 140px;
  background: var(--blue);
  top: -40px; left: 18%;
  animation-delay: 0s;
}

.cover-orb:nth-child(2) {
  width: 90px; height: 90px;
  background: var(--blue-hi);
  top: 8px; right: 14%;
  animation-delay: 2.4s;
}

.cover-orb:nth-child(3) {
  width: 66px; height: 66px;
  background: var(--green);
  bottom: -14px; left: 58%;
  opacity: 0.3;
  animation-delay: 4.6s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-14px) scale(1.06); }
}

/* ===== Cabecera de perfil ===== */
.profile-header {
  padding: 0 16px 22px;
  position: relative;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-top: -46px;
  margin-bottom: 14px;
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--void);
  box-shadow: 0 0 0 2px var(--blue), 0 14px 34px rgba(0, 0, 0, 0.6);
  display: block;
  background: var(--graphite);
}

.avatar-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  background: var(--green);
  border: 2px solid var(--void);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #04060b;
  box-shadow: 0 0 12px rgba(23, 201, 100, 0.6);
}
.avatar-badge svg { width: 12px; height: 12px; color: #04060b; }

.profile-name {
  font-size: 25px;
  font-weight: 700;
  margin-bottom: 3px;
}

.profile-handle {
  font-size: 14px;
  color: var(--blue-ice);
  font-weight: 500;
  margin-bottom: 12px;
}

.profile-bio {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 62ch;
}

/* ===== Cifras ===== */
.stats-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  box-shadow: var(--edge);
}

.stat-pill .num {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-pill .lbl {
  font-size: 12px;
  color: var(--text3);
}

/* ===== Botones ===== */
.profile-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  border: 1px solid rgba(160, 195, 255, 0.32);
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { filter: brightness(1.14); transform: translateY(-2px); }

.btn-secondary {
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: var(--edge);
}
.btn-secondary:hover { border-color: var(--line-hi); color: var(--blue-ice); }

/* ===== Separador ===== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-hi) 22%, var(--line-hi) 78%, transparent);
  margin: 0 16px 22px;
  border: none;
}

/* ===== Secciones ===== */
.section { padding: 0 16px 22px; }

.section-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-hi), var(--blue-deep));
  flex-shrink: 0;
}

/* ===== Redes ===== */
.social-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 16px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--edge);
}

/* filo azul que se enciende al pasar */
.social-link::after {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 2px;
  border-radius: 2px;
  background: var(--blue-hi);
  opacity: 0;
  transition: var(--transition);
}

.social-link:hover {
  border-color: var(--line-hi);
  transform: translateX(4px);
}
.social-link:hover::after { opacity: 1; }

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(4, 6, 11, 0.45);
  border: 1px solid var(--line);
}

.social-icon img {
  width: 26px;
  height: 26px;
  object-fit: cover;
}

.social-info { flex: 1; min-width: 0; }

.social-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 1px;
}

.social-handle {
  font-size: 12px;
  color: var(--text3);
}

.social-arrow {
  color: var(--text3);
  flex-shrink: 0;
  transition: var(--transition);
}
.social-link:hover .social-arrow { color: var(--blue-hi); transform: translateX(3px); }

/* ===== Mis sitios ===== */
.sites-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.site-card {
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: var(--edge);
}

.site-card:hover {
  border-color: var(--line-hi);
  transform: translateY(-3px);
  box-shadow: var(--edge), var(--shadow-blue);
}

.site-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 107, 255, 0.12);
  border: 1px solid var(--line);
  color: var(--blue-ice);
  flex-shrink: 0;
}
.site-card-icon svg { width: 19px; height: 19px; }

.site-card-name { font-size: 14px; font-weight: 600; }

.site-card-desc {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.45;
}

/* ===== Contenido reciente ===== */
.content-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.content-scroll::-webkit-scrollbar { display: none; }

.content-thumb {
  flex-shrink: 0;
  width: 104px;
  cursor: pointer;
  transition: var(--transition);
}

.content-thumb:hover { transform: translateY(-3px); }

.content-thumb img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--graphite);
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 6px;
  transition: var(--transition);
}
.content-thumb:hover img { border-color: var(--line-hi); }

.content-thumb-title {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Ficha de datos ===== */
.about-card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 6px 16px;
  box-shadow: var(--edge);
}

.about-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.about-row:last-child { border-bottom: none; }

.about-row-icon {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-ice);
}
.about-row-icon svg { width: 15px; height: 15px; }

.about-row-label { color: var(--text3); flex-shrink: 0; min-width: 84px; }
.about-row-value { color: var(--text); font-weight: 500; }

/* ===== Pie ===== */
.profile-footer {
  padding: 22px 16px 44px;
  text-align: center;
}

.footer-text {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.6;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  text-decoration: none;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.footer-logo:hover { color: var(--blue-ice); }

.footer-logo img {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

/* ===== Animaciones ===== */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: slideUp 0.4s ease both; }
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.10s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.20s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }

/* ===== Aviso flotante ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  background: var(--glass-hi);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line-hi);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 50px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--edge), var(--shadow-lift);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 600px) {
  .profile-cover { height: 210px; }
  .sites-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
