/* ── DESKTOP SETTINGS (solo PC) ───────────────────────────────
   Panel independiente del "you" de móvil: HTML/CSS/JS propios,
   no navega ni cambia la URL, y no se abre en móvil. */

/* ── Modal tipo Fluxer: tarjeta centrada sobre fondo oscuro, con animación ── */
#dsOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 16px 8vw;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0);
  transition: background .2s ease;
}
#dsOverlay.open { background: rgba(0, 0, 0, .68); }

#dsOverlay .ds-modal {
  display: flex;
  width: 100%;
  max-width: 1680px;
  height: 100%;
  max-height: 980px;
  background: #1b1c20;
  border: 1px solid #2c2e34;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.965);
  transition: opacity .2s ease, transform .26s cubic-bezier(.2, .9, .25, 1.05);
}
#dsOverlay.open .ds-modal { opacity: 1; transform: none; }
#dsOverlay.closing .ds-modal { opacity: 0; transform: translateY(8px) scale(.975); transition: opacity .18s ease, transform .2s ease; }
#dsOverlay.closing { transition: background .2s ease; }
@media (prefers-reduced-motion: reduce) {
  #dsOverlay, #dsOverlay .ds-modal { transition: none !important; }
}

.ds-sidebar {
  width: clamp(280px, 24vw, 400px);
  min-width: clamp(280px, 24vw, 400px);
  background: #212227;
  border-right: 1px solid #2c2e34;
  display: flex;
}
.ds-sidebar-inner { flex: 1; overflow-y: auto; padding: 20px 16px 24px; scrollbar-width: thin; }

.ds-search {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid #3a3c44; border-radius: 10px; color: #b5bac1; background: transparent; cursor: text;
}
.ds-search:focus-within { border-color: #5b57e8; }
.ds-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #f2f3f5; font: inherit; font-size: .95rem; }
.ds-search input::placeholder { color: #a3a8b1; }

.ds-sb-user {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; padding: 8px 10px;
  border: none; border-radius: 10px; background: transparent; color: #f2f3f5; cursor: pointer; text-align: left;
  font: inherit; font-size: 1rem; font-weight: 600; transition: background .15s;
}
.ds-sb-user:hover { background: #2a2c33; }
.ds-sb-user.active { background: #32343c; }
.ds-sb-av {
  position: relative; width: 40px; height: 40px; border-radius: 50%; flex: none; background: #5865f2; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700;
}
.ds-sb-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ds-sb-av i { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #212227; box-sizing: border-box; }
.ds-sb-uname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ds-sb-section { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #a3a8b1; padding: 6px 4px 8px; margin-top: 22px; }
.ds-sb-item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px; margin-bottom: 2px;
  border: none; border-radius: 10px; background: transparent; color: #d2d5db; font: inherit; font-size: 1rem; font-weight: 600;
  text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.ds-sb-item svg { flex: none; color: #b5bac1; }
.ds-sb-item:hover { background: #2a2c33; color: #fff; }
.ds-sb-item.active { background: #32343c; color: #fff; }
.ds-sb-item.active svg { color: #fff; }
.ds-sb-empty { color: #a3a8b1; font-size: .9rem; padding: 16px 6px; }

.ds-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #1b1c20; }
.ds-head { display: flex; align-items: center; justify-content: space-between; height: 76px; flex: none; padding: 0 20px 0 20px; border-bottom: 1px solid #2c2e34; }
.ds-head-title { margin: 0; font-size: 1.5rem; font-weight: 600; color: #f2f3f5; }
#dsOverlay .ds-close {
  width: 40px; height: 40px; border-radius: 10px; border: none; background: none; color: #d2d5db;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s;
}
#dsOverlay .ds-close:hover { background: #2a2c33; color: #fff; }

.ds-content { flex: 1; overflow-y: auto; padding: 32px 40px 80px; scrollbar-width: thin; }
.ds-content-inner { max-width: 880px; margin: 0 auto; }
/* el título ya está en la cabecera del modal */
.ds-content-inner > .ds-title:first-child { display: none; }
.ds-title { font-size: 1.5rem; font-weight: 700; color: #f2f3f5; margin-bottom: 24px; }
.ds-sublabel { font-size: .95rem; font-weight: 700; color: #f2f3f5; margin: 20px 0 4px; }
.ds-hint { font-size: .84rem; color: #949ba4; margin-bottom: 8px; }

.ds-select {
  background: #1e1f22; border: none; border-radius: 4px; padding: 12px 14px;
  color: #dbdee1; font-size: .94rem; width: 100%; cursor: pointer; appearance: none;
}

.ds-btn {
  background: #4e5058; border: none; border-radius: 4px; padding: 10px 18px;
  color: #fff; font-size: .9rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: background .15s;
}
.ds-btn:hover { background: #6d6f78; }
.ds-btn.accent { background: var(--accent, #5865f2); }
.ds-btn.accent:hover { background: var(--accent-hover, #4752c4); }

.ds-input {
  background: #1e1f22; border: none; border-radius: 4px; padding: 10px 12px;
  color: #dbdee1; font-size: .94rem; width: 100%; outline: none;
}
.ds-input:focus { outline: 2px solid var(--accent, #5865f2); }
.ds-textarea { resize: none; min-height: 80px; font-family: inherit; }

.ds-profile-grid { display: flex; gap: 40px; margin-top: 24px; align-items: flex-start; }
.ds-form-col { flex: 1; min-width: 0; }
.ds-preview-col { width: 300px; flex-shrink: 0; }
@media (max-width: 900px) { .ds-profile-grid { flex-direction: column; } .ds-preview-col { width: 100%; } }

.ds-preview-label { font-size: .95rem; font-weight: 700; color: #f2f3f5; margin-bottom: 10px; text-align: center; }
.ds-preview-card { background: #111214; border-radius: 8px; overflow: hidden; border: 1px solid #2a2d30; }
.ds-preview-banner { height: 100px; background: #5865f2; background-size: cover; background-position: center; }
.ds-preview-body { padding: 0 16px 16px; position: relative; }
.ds-preview-avatar-wrap { margin-top: -40px; margin-bottom: 8px; }
.ds-preview-avatar {
  width: 80px; height: 80px; border-radius: 50%; border: 6px solid #111214;
  background: #5865f2; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: #fff; overflow: hidden; position: relative;
}
.ds-preview-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ds-preview-status { position: absolute; bottom: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 4px solid #111214; background: #23a55a; box-sizing: content-box; }
.ds-preview-name { font-size: 1.05rem; font-weight: 700; color: #f2f3f5; }
.ds-preview-tag { font-size: .82rem; color: #949ba4; margin-bottom: 10px; }
.ds-preview-since { font-size: .78rem; font-weight: 700; color: #949ba4; text-transform: uppercase; margin-top: 8px; }
.ds-preview-since-val { font-size: .84rem; color: #dbdee1; font-weight: 600; }
.ds-preview-msgbtn { margin-top: 12px; width: 100%; padding: 10px; background: #4752c4; border: none; border-radius: 4px; color: #fff; font-weight: 600; font-size: .88rem; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: default; }

.ds-toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-22px);
  background: #0C0B0E; border: 1px solid #28272B; color: #f2f3f5; padding: 13px 20px; border-radius: 14px;
  font-size: .93rem; font-weight: 700; opacity: 0; pointer-events: none;
  box-shadow: 0 8px 28px rgba(0,0,0,.5);
  transition: opacity .25s ease, transform .3s cubic-bezier(.34,1.15,.64,1); z-index: 100000;
}
.ds-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
  #dsOverlay { display: none !important; }
}

/* ── Ajustes PC: controles añadidos (avatar/banner/color/cuenta) ── */
#dsOverlay .ds-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#dsOverlay .ds-color { width: 44px; height: 36px; padding: 2px; border-radius: 6px; border: 1px solid #3a3c42; background: #1e1f22; cursor: pointer; }
#dsOverlay .ds-counter { font-size: .72rem; color: #949ba4; text-align: right; margin-top: 4px; }
#dsOverlay .ds-input[type="text"], #dsOverlay input.ds-input { height: 42px; }
#dsOverlay .ds-textarea { min-height: 96px; height: auto; }
#dsOverlay .ds-preview-bio { font-size: .84rem; color: #dbdee1; margin: 4px 0 10px; line-height: 1.35; overflow-wrap: anywhere; }
#dsOverlay .ds-preview-avatar { position: relative; }
#dsOverlay .ds-account-card { background: #1e1f22; border-radius: 10px; overflow: hidden; border: 1px solid #2a2d30; }
#dsOverlay .ds-account-banner { height: 110px; background-size: cover; background-position: center; }
#dsOverlay .ds-account-head { display: flex; align-items: center; gap: 16px; padding: 0 20px 16px; }
#dsOverlay .ds-account-head .ds-preview-avatar { border: 6px solid #1e1f22; flex: none; }
#dsOverlay .ds-account-name { flex: 1; min-width: 0; font-size: 1.25rem; font-weight: 700; color: #f2f3f5; padding-top: 12px; }
#dsOverlay .ds-account-name small { font-size: .9rem; color: #949ba4; font-weight: 500; margin-left: 2px; }
#dsOverlay .ds-account-head .ds-btn { margin-top: 12px; }
#dsOverlay .ds-account-fields { margin: 0 20px 20px; padding: 14px 16px; background: #2b2d31; border-radius: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
#dsOverlay .ds-field span { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; color: #949ba4; margin-bottom: 4px; }
#dsOverlay .ds-field b { font-size: .95rem; color: #f2f3f5; font-weight: 600; }

#dsOverlay .ds-theme-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
#dsOverlay .ds-theme { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 96px; padding: 12px 8px; border-radius: 10px; background: #1e1f22; border: 2px solid transparent; color: #dbdee1; cursor: pointer; transition: border-color .15s, background .15s; }
#dsOverlay .ds-theme:hover { background: #26272b; }
#dsOverlay .ds-theme.on { border-color: var(--accent, #5865f2); }
#dsOverlay .ds-theme-dot { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); background-size: cover; }
#dsOverlay .ds-theme-name { font-size: .76rem; font-weight: 600; text-align: center; line-height: 1.2; }

/* ── Controles dentro del modal (como las capturas) ── */
#dsOverlay .ds-sublabel { color: #f2f3f5; }
#dsOverlay .ds-hint { color: #b5bac1; }
#dsOverlay .ds-select,
#dsOverlay .ds-input { background: #26272d; border: 1px solid #34363d; border-radius: 10px; color: #f2f3f5; }
#dsOverlay .ds-select { height: 54px; padding: 0 18px; }
#dsOverlay .ds-input:focus { outline: none; border-color: #5b57e8; }
#dsOverlay .ds-btn { background: #2b2d34; border: 1px solid #3a3c44; border-radius: 10px; padding: 10px 16px; }
#dsOverlay .ds-btn:hover { background: #34363e; }
#dsOverlay .ds-btn.accent { background: #4641d9; border-color: #4641d9; }
#dsOverlay .ds-btn.accent:hover { background: #5651f0; border-color: #5651f0; }
#dsOverlay .ds-preview-card { background: #0f1013; border: 2px solid #1e2cc4; border-radius: 10px; }
#dsOverlay .ds-account-card { background: #26272d; border-color: #34363d; }
#dsOverlay .ds-account-fields { background: #1b1c20; }
#dsOverlay .ds-theme { background: #26272d; }
#dsOverlay .ds-theme:hover { background: #2e3037; }
@media (max-width: 1100px) { #dsOverlay { padding: 8px; } }
#dsOverlay .tx-select { background: #26272d !important; border-color: #34363d !important; border-radius: 10px !important; min-height: 54px; padding: 0 18px !important; }
