/* ==========================================================================
   PERFIL PUBLICO (perfil.html) & ESTUDIO DE EDICION (perfiles.html)
   ========================================================================== */
.bio-page {
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(ellipse 55% 50% at 50% 0%, rgba(201, 189, 223, 0.12), transparent 65%),
    radial-gradient(ellipse 40% 45% at 82% 85%, rgba(182, 215, 226, 0.06), transparent 65%),
    #070709;
  padding: 28px 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bio-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(213, 186, 255, 0.55) 1px, transparent 1.5px),
    radial-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1.5px);
  background-size: 96px 96px, 148px 148px;
  background-position: 10px 16px, 54px 72px;
  opacity: 0.08;
}

.bio-topbar {
  width: min(980px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  position: relative;
  z-index: 3;
}

.bio-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(17, 16, 21, 0.85);
}

.bio-presets button {
  padding: 7px 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.bio-presets button:hover {
  color: var(--ink);
}

.bio-presets button.active {
  background: #f2eef8;
  color: #0b0a0f;
}

.bio-card {
  width: min(520px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(20, 18, 26, 0.94) 0%, rgba(11, 10, 14, 0.98) 100%);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(201, 189, 223, 0.06) inset;
  overflow: hidden;
  position: relative;
  z-index: 2;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.bio-card[data-theme="chrome"] {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(22, 22, 26, 0.96) 0%, rgba(10, 10, 12, 0.98) 100%);
}

.bio-card[data-theme="ice"] {
  border-color: rgba(182, 215, 226, 0.28);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.78), 0 0 60px rgba(182, 215, 226, 0.08);
}

.bio-card[data-theme="obsidian"] {
  border-color: rgba(201, 189, 223, 0.24);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.78), 0 0 70px rgba(201, 189, 223, 0.09);
}

.bio-card[data-theme="imperial"] {
  border-color: rgba(223, 202, 159, 0.36);
  background: linear-gradient(180deg, rgba(25, 22, 19, 0.96) 0%, rgba(11, 10, 14, 0.98) 100%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.82), 0 0 76px rgba(223, 202, 159, 0.11);
}

.bio-card[data-theme="imperial"] .bio-rank-chip {
  border-color: rgba(223, 202, 159, 0.45);
  background: rgba(223, 202, 159, 0.13);
  color: #e3cc9d;
}

.bio-card[data-theme="imperial"] .bio-verified {
  background: #e3cc9d;
}

.bio-banner {
  height: 148px;
  position: relative;
  overflow: hidden;
  background: #0d0c11;
}

.bio-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.bio-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 11, 16, 0.15) 0%, rgba(16, 15, 22, 0.95) 100%);
}

.bio-slug-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 10, 14, 0.72);
  backdrop-filter: blur(10px);
  font: 500 11px var(--font-mono);
  color: var(--lav-bright);
  cursor: pointer;
}

.bio-slug-pill:hover {
  border-color: var(--lav);
}

.bio-body {
  padding: 0 26px 26px;
  margin-top: -44px;
  position: relative;
  z-index: 2;
}

.bio-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bio-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid #131119;
  background: radial-gradient(circle at 30% 25%, #4a3d61, #15131c);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  position: relative;
}

.bio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.bio-avatar img[hidden],
.bio-avatar [hidden] {
  display: none;
}

.bio-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3.5px solid #131119;
  background: #23a55a;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.bio-status-dot svg {
  width: 11px;
  height: 11px;
  display: block;
}

.bio-status-dot[data-status="online"] {
  background: #23a55a;
}

.bio-status-dot[data-status="idle"] {
  background: #f0b232;
}

.bio-status-dot[data-status="dnd"] {
  background: #f23f43;
}

.bio-status-dot[data-status="offline"] {
  background: #80848e;
}

.bio-rank-chip {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(201, 189, 223, 0.3);
  background: rgba(201, 189, 223, 0.09);
  font: 600 11px var(--font-mono);
  color: var(--lav-bright);
}

.bio-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 4px;
}

.bio-name {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.045em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.discord-guild-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.065);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.045em;
  color: #f6f4fa;
  line-height: 1;
}

.discord-tag-svg,
.discord-tag-img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.bio-verified {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--lav);
  color: #0b0a0f;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.bio-custom-status {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(246, 244, 250, 0.86);
  margin: 0 0 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bio-custom-status:empty {
  display: none;
}

.bio-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid rgba(43, 212, 143, 0.35);
  background: rgba(43, 212, 143, 0.09);
  font: 500 10px/1.2 var(--font-mono);
  color: #6fe7b6;
}

.bio-live-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2bd48f;
}

.bio-handle {
  font: 500 12px var(--font-mono);
  color: var(--muted);
  margin: 0 0 14px;
}

.bio-discord-activity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.08) 0%, rgba(255, 255, 255, 0.025) 100%);
  margin-bottom: 16px;
}

.bio-discord-activity[hidden] {
  display: none;
}

.bio-activity-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.bio-activity-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(88, 101, 242, 0.16);
  border: 1px solid rgba(114, 137, 218, 0.32);
  color: #bfc7ff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.bio-activity-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-activity-meta {
  min-width: 0;
}

.bio-activity-meta strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bio-activity-meta span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bio-activity-time {
  font: 500 10.5px var(--font-mono);
  color: var(--imperial);
  white-space: nowrap;
}

.bio-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.bio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.bio-text {
  font-size: 14px;
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.bio-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.bio-meta-pill {
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}

.bio-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 18px;
}

.bio-stats-strip div {
  padding: 11px 12px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.bio-stats-strip div:last-child {
  border-right: 0;
}

.bio-stats-strip b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.bio-stats-strip span {
  font-size: 10.5px;
  color: var(--muted-2);
}

.bio-music {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 18px;
}

.bio-music-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bio-disc {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: radial-gradient(circle at 35% 30%, var(--lav), #392f4a 65%, #16141d);
  display: grid;
  place-items: center;
  color: #0b0a0f;
  font-weight: 800;
  flex-shrink: 0;
}

.bio-disc.playing {
  animation: spin 4s linear infinite;
  border-radius: 50%;
}

.bio-music-meta {
  min-width: 0;
}

.bio-music-meta strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bio-music-meta span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.bio-music-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.bio-music-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bio-equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}

.bio-equalizer i {
  width: 2.5px;
  height: 5px;
  border-radius: 99px;
  background: var(--lav);
  transition: height 0.2s ease;
}

.bio-card[data-theme="imperial"] .bio-equalizer i {
  background: var(--imperial);
}

.bio-equalizer.playing i:nth-child(1) { animation: eqBar 0.7s ease-in-out infinite alternate; }
.bio-equalizer.playing i:nth-child(2) { animation: eqBar 0.55s ease-in-out 0.15s infinite alternate; }
.bio-equalizer.playing i:nth-child(3) { animation: eqBar 0.8s ease-in-out 0.3s infinite alternate; }
.bio-equalizer.playing i:nth-child(4) { animation: eqBar 0.6s ease-in-out 0.1s infinite alternate; }

@keyframes eqBar {
  from { height: 4px; opacity: 0.55; }
  to { height: 15px; opacity: 1; }
}

.bio-links {
  display: grid;
  gap: 9px;
}

.bio-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.bio-link-btn:hover {
  border-color: rgba(201, 189, 223, 0.42);
  background: rgba(201, 189, 223, 0.08);
  transform: translateY(-1px);
}

.bio-link-btn span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.bio-footer-cta {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   PROFILE STUDIO EDITOR (en perfiles.html)
   ========================================================================== */
.studio-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: none;
  position: relative;
  z-index: 3;
}

.studio-section.open {
  display: block;
  animation: fadeSlide 0.28s ease-out;
}

.studio-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.studio-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.045em;
  margin: 0;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
}

.studio-form {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.studio-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.studio-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.studio-field input,
.studio-field textarea,
.studio-field select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #0b0a0e;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  padding: 11px 13px;
  outline: none;
}

.studio-field input:focus,
.studio-field textarea:focus,
.studio-field select:focus {
  border-color: var(--lav);
}

.studio-field textarea {
  min-height: 78px;
  resize: vertical;
}

.chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-toggle {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0c0b10;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.chip-toggle.active {
  background: rgba(201, 189, 223, 0.16);
  border-color: var(--lav);
  color: var(--lav-bright);
}

.discord-connect-box {
  border: 1px solid rgba(88, 101, 242, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.08) 0%, rgba(16, 15, 22, 0.9) 100%);
  padding: 15px 16px;
  display: grid;
  gap: 11px;
}

.discord-connect-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.discord-connect-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.discord-connect-title svg {
  width: 17px;
  height: 17px;
  color: #8ea1ff;
}

.discord-oauth-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(114, 137, 218, 0.38);
  background: rgba(88, 101, 242, 0.16);
  color: #dfe4ff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.discord-oauth-btn:hover {
  background: rgba(88, 101, 242, 0.28);
  border-color: rgba(142, 161, 255, 0.65);
}

.discord-id-row {
  display: flex;
  gap: 8px;
}

.discord-id-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #0b0a0e;
  color: var(--ink);
  font: 500 13px var(--font-mono);
  padding: 10px 12px;
  outline: none;
}

.discord-id-row input:focus {
  border-color: #8ea1ff;
}

.discord-sync-btn {
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.discord-sync-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(227, 204, 157, 0.4);
}

.discord-sync-status {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.discord-sync-status.ok {
  color: #6fe7b6;
}

.discord-sync-status.err {
  color: #f4b7b8;
}

.studio-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .studio-grid,
  .studio-row-2 {
    grid-template-columns: 1fr;
  }
}
