:root {
  --bg: #0f172a;
  --card: #1e293b;
  --accent: #f1f5f9;
  --accent-2: #3b82f6;
  --muted: #94a3b8;
  --shadow: rgba(0, 0, 0, 0.28);
}

/* base */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    "Helvetica Neue",
    Arial;
  background: var(--bg);
  color: var(--accent);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent-2);
  text-decoration: none;
}
.app {
  max-width: 1100px;
  margin: 20px auto;
  padding: 18px;
}

/* header */
header.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.brand .title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}
.brand .subtitle {
  font-size: 13px;
  color: var(--muted);
}

/* profile area */
.profile-area {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.profile-pic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-2));
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.06);
}
.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-initial {
  font-weight: 700;
  color: white;
  font-size: 16px;
  user-select: none;
}
.user-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 110px;
}
.user-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 60%;
}
.user-name input {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent);
  padding: 6px 8px;
  border-radius: 8px;
  width: 140px;
  font-weight: 600;
}

/* gear button */
.gear-btn {
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  padding: 8px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gear-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

#btn-login {
  cursor: pointer;
}

/* ===============================
          SETTINGS SIDEBAR
   =============================== */

.settings-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 90%;
  height: 100vh;
  background: var(--card);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 30000 !important;
  display: flex;
  flex-direction: column;
}

.settings-sidebar.open {
  transform: translateX(0);
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.settings-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.settings-section {
  margin-bottom: 18px;
}

.settings-section.danger button {
  width: 100%;
  padding: 12px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

/* footer */
.settings-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-footer .settings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  border-radius: 8px;
}

.settings-footer .settings-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.settings-header {
  padding: 16px;
}

.settings-divider {
  height: 1px;
  background: var(--muted);
  margin: 12px 0;
}

.settings-close-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.settings-close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* overlay */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2900;
}

.settings-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#s-goProfile,
#s-goFriends,
#s-goSupport,
#mb-goSupport {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

#s-goProfile,
#s-goFriends,
#s-goSupport {
  cursor: pointer;
}

.theme-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.06);
}

/* controls / inputs */
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
  flex-direction: column;
  align-items: center;
}
.controls input,
.controls select {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  width: 50%;
}
.controls input,
.controls select {
  background: var(--card);
  color: var(--accent);
}
.btn.primary {
  background: var(--accent-2);
  color: #fff;
  border-radius: 8px;
  width: 20%;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
  border-radius: 8px;
}
button.add-jikan:disabled {
  background: #3a3a3a;
  color: #aaa;
  cursor: not-allowed;
  opacity: 0.7;
}
#username {
  width: 50%;
}
#btn-add {
  width: 40%;
}

/* grid & cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s;
  cursor: default;
}
.card:hover {
  transform: translateY(-4px);
}
.card .thumb {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card .meta {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card .title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}
.card .genre {
  font-size: 13px;
  color: var(--muted);
}
.card .last {
  font-size: 14px;
  color: var(--accent);
}
.card .actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.card .link {
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-2);
  border: 1px solid rgba(59, 130, 246, 0.08);
  font-weight: 600;
}
.card .small {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* modal & form */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
  z-index: 999;
}
.modal.open {
  display: flex;
}
.panel {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
}
.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.form-row .col {
  flex: 1;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
input[type="text"],
select,
input[type="url"],
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  background: var(--bg);
  color: var(--accent);
}
textarea {
  min-height: 80px;
  resize: vertical;
}
.uploader {
  display: flex;
  gap: 8px;
  align-items: center;
}
.fakefile {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  cursor: pointer;
  color: var(--muted);
}

/* category header */
h2.tipo-header {
  display: flex;
  align-items: center;
  font-size: 20px;
  color: var(--accent-2);
  font-weight: 600;
  margin: 20px 0 10px 0;
  white-space: nowrap;
}
h2.tipo-header::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: var(--accent-2);
  margin-left: 10px;
  opacity: 0.18;
}

#empty {
  color: var(--muted);
  text-align: center;
  margin-top: 18px;
}

/* mobile bottom bar */
.mobile-bar {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 14px;
  height: 64px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  z-index: 1400;
  align-items: center;
  justify-content: space-around;
  padding: 0 16px;
}
.mobile-btn {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-add {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-6px);
  font-size: 26px;
  border: 4px solid rgba(255, 255, 255, 0.03);
}

.small-toast {
  font-size: 13px;
  color: var(--accent-2);
  margin-top: 6px;
}

/* LAZY FADE-IN */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}
img[loading="lazy"].loaded {
  opacity: 1;
}

/* time box */
#time-box {
  display: flex;
  margin: 12px auto;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  color: var(--accent);
  box-shadow: 0 4px 10px var(--shadow);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.04);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 70%;
}
#time-box .label {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

/* switch */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  display: none;
}

/* Slider visible */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--switch-off, var(--muted)); /* color apagado según tema */
  border-radius: 22px;
  transition: 0.3s;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5); /* un poquito de sombra para contraste */
}

/* Circulito */
.slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: var(
    --switch-circle,
    #fff
  ); /* siempre visible sobre cualquier fondo */
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Cuando está activo */
input:checked + .slider {
  background: var(--switch-on, var(--accent-2)); /* color destacado del tema */
}

input:checked + .slider::before {
  transform: translateX(20px);
}

.grid h2.tipo-header {
  grid-column: 1 / -1 !important;
  width: 100%;
  display: flex; /* 🔥 Necesario para que la línea vuelva */
  align-items: center;
  margin: 20px 0 10px 0;
}

.search-box {
  margin-top: 16px;
  min-width: 40%;
}

#user-control {
  align-items: stretch;
}

#zm-search {
  width: 100%;
  margin: 0 auto;
  min-width: unset !important;
}

#zm-results {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.search-bar {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 40%;
  margin: 0 auto 12px auto;
  margin-top: 50px;
  margin-bottom: 12px;
}

.search-bar input {
  flex: 1;
  width: auto;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card);
  color: var(--accent);
}

.search-bar button {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: var(--accent-2);
  color: white;
  font-weight: 600;
  cursor: pointer;
  width: 20%;
}

.controls #zm-search input,
.controls #zm-search button,
.controls #zm-search select {
  width: auto !important;
}

.controls {
  align-items: center;
}

.filter-panel {
  position: absolute;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  left: 50%;
  padding: 12px;
  margin-top: 8px;
  z-index: 1000;
  width: 220px;
}

.filter-panel.hidden {
  display: none;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.filter-group label {
  font-size: 13px;
  color: var(--muted);
}

.filter-group select {
  padding: 6px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* responsive */
@media (max-width: 920px) {
  .search-box {
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
  }
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }
  .search-bar input {
    width: 100%;
    flex: none;
  }
  .search-bar button {
    width: 100%;
  }
}
@media (max-width: 720px) {
  .brand .title {
    font-size: 18px;
  }
}
@media (max-width: 580px) {
  header.app-header {
    justify-content: center;
  }
  .profile-area {
    display: none !important;
  }
  .brand {
    align-items: center;
  }
  .brand .title {
    text-align: center;
  }
  .brand .subtitle {
    text-align: center;
  }
  .mobile-bar {
    display: flex !important;
  }
  .app {
    padding-bottom: 100px;
  }
  .form-row {
    flex-direction: column;
  }
  #btn-add {
    display: none !important;
  }
  #mobile-gear {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  #mobile-gear svg {
    width: 22px;
    height: 22px;
  }
  #mobile-profile-pic {
    width: 38px;
    height: 38px;
  }
  #btn-finalizados-pc {
    display: none !important;
  }
  .search-box {
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
  }
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
    max-width: 80%;
  }
  .search-bar input {
    width: 100%;
    flex: none;
  }
  .search-bar button {
    width: 100%;
  }
  #zm-results {
    width: 100%;
    margin: 0 auto;
    grid-template-columns: repeat(1, 1fr);
  }
  .controls {
    align-items: stretch;
  }
  .filter-panel {
    left: auto;
    width: 86.98%;
  }
  #username,
  #email,
  #password,
  #btn-login {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .profile-modal-content {
    background: var(--card);
    width: 98% !important;
    max-height: 90vh;
    max-width: 98% !important; /* No ocupa toda la pantalla de alto */
    overflow-y: auto; /* Permite scroll si el contenido es largo */
    border-radius: 20px;
    padding: 30px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }

  .btn-danger-outline {
    background: transparent;
    color: #ff4d4d;
    border: 1px solid #ff4d4d;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 15px;
    transition: 0.3s;
    z-index: 10001;
    width: 100% !important;
  }

  .btn-danger-outline:hover {
    background: #ff4d4d;
    color: white;
  }

  #mobile-requests-panel:not(.hidden) {
    display: block !important;
  }

  .btn.primary {
    width: 40% !important;
  }

  .friends-header {
    width: 100% !important;
  }
}

/* ============================================X
   AÑADIDO — MODAL "MOVER A FINALIZADOS"
   ============================================ */
#finish-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20002 !important;
  padding: 20px;
}
#finish-modal.hidden {
  display: none;
}
#finish-modal .panel {
  background: var(--card);
  padding: 18px;
  border-radius: 14px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.747);
}
#finish-modal .panel p {
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--accent);
}
#finish-confirm,
#finish-cancel {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
#finish-confirm {
  background: var(--accent-2);
  color: white;
  z-index: 20003 !important;
  pointer-events: auto !important;
}
#finish-cancel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

/* checkbox terminado */
.finish-box {
  margin-top: 6px;
  display: none;
  align-items: center;
}
.finish-box label {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.finish-box input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-2);
  border-radius: 4px;
  margin-right: 6px;
  position: relative;
  cursor: pointer;
  background: transparent;
}
.finish-box input[type="checkbox"]:checked {
  background: var(--accent-2);
}
.finish-box input[type="checkbox"]:checked::after {
  display: flex !important;
  content: "✔";
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 14px;
  color: white;
}

.finished-label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #22c55e;
}

/* desktop finalizados button */
#btn-finalizados-pc {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  margin-left: 12px;
}
#btn-finalizados-pc:hover {
  background: rgba(59, 130, 246, 0.1);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto; /* empuja hacia la izquierda */
}

.top-btn {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  margin-right: 15px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--accent);
  transition: 0.2s ease;
}

.top-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* mobile home / finalizados buttons */
.mobile-btn-home,
.mobile-btn-finished {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.mobile-btn-home svg,
.mobile-btn-finished svg {
  width: 22px;
  height: 22px;
  margin-right: 6px;
}

/* mobile settings popup */
.mobile-settings-popup {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 90px;
  z-index: 2000;
  background: var(--card);
  padding: 16px;
  border-radius: 14px;
  color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: popupFade 0.2s ease-out;
}
@keyframes popupFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mobile-settings-popup h3 {
  margin: 0 0 10px 0;
  font-size: 17px;
  font-weight: 700;
}
.mobile-settings-popup button {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
}
.mobile-settings-popup button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.progress-wrapper {
  margin-top: 8px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-2);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  margin-top: 4px;
  color: var(--muted);
}

/* Skeleton loader */
.skeleton-card {
  background: #161b22;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pulse 1.4s infinite ease-in-out;
}

.skeleton-thumb {
  height: 180px;
  border-radius: 8px;
  background: #21262d;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: #21262d;
}

.skeleton-line.short {
  width: 60%;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

/* Loader */
.search-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  opacity: 1;
  transition: opacity 0.2s ease;
}

.search-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.zm-card {
  transition: transform 0.15s ease;
}

.zm-card.swipe-right {
  transform: translateX(10px);
}

.zm-card.swipe-left {
  transform: translateX(-10px);
}

/* Perfil de Usuario */
.user-profile-header {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.user-code-display {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: monospace;
  margin-top: 4px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.copy-toast {
  position: absolute;
  bottom: 130%; /* Aparece encima */
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--accent-2);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Flechita hacia abajo del mensaje (opcional) */
.copy-toast::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--accent-2) transparent transparent transparent;
}

/* Clase que activaremos con JS */
.copy-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.user-avatar-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
}

#user-page-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card);
}

.avatar-edit-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: var(--accent-2);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.user-info-text {
  flex: 1;
  min-width: 250px;
}

.name-edit-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bio-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
  padding: 10px;
  border-radius: 8px;
  margin-top: 15px;
  resize: vertical;
  min-height: 80px;
}

.profile-section {
  margin-top: 40px;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--accent-2);
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-grid-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.stat-card {
  background: var(--card);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
}

.stat-card span {
  display: block;
  font-size: 1.4rem;
  font-weight: bold;
}

.stat-card label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Acordeón Reseñas */
.accordion-header {
  width: 100%;
  background: var(--card);
  color: var(--accent);
  border: none;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-weight: bold;
}

.accordion-content {
  background: rgba(255, 255, 255, 0.02);
  padding: 15px;
  border-radius: 0 0 8px 8px;
}

.review-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
}

.review-item:last-child {
  border: none;
}

.switch-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch-container .switch {
  margin-top: 7px;
}

.scroll-top-btn {
  position: fixed;
  bottom: 80px; /* Separado del borde o de la barra móvil */
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--accent-2);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 999;

  /* Animación de aparición */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease-in-out;
}

/* Clase que añadiremos con JS para mostrarlo */
.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background-color: #2563eb; /* Un azul un poco más oscuro */
  transform: scale(1.1);
}

/* En móviles lo subimos un poco más para que no tape la barra de navegación */
@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 90px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 850px) {
  .btn-danger-outline {
    width: 100% !important;
  }
}

/* Contenedor del ojo */
.visibility-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover .visibility-btn {
  opacity: 1;
}

.visibility-btn.is-public {
  color: #4ade80; /* Verde si es público */
  border-color: #4ade80;
}

/* Contenedor de secciones en el perfil */
.user-public-section {
  margin-top: 25px;
}

/* Contenedor de las etiquetas */
.mini-grid {
  display: flex;
  flex-wrap: wrap; /* Para que se ajusten una al lado de otra */
  gap: 10px;
  padding: 10px 0;
}

/* Estilos mejorados para las mini-tags con progreso */
.mini-tag {
  position: relative;
  overflow: hidden;
  background: var(--card); /* Fondo base */
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease;
  z-index: 1;
}

.mini-tag span {
  position: relative;
  z-index: 2; /* Texto siempre por encima de la barra */
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5); /* Mejora legibilidad sobre colores claros */
}

/* La barra de progreso será un gradiente en el fondo */
.mini-tag.in-progress {
  border-color: var(--accent-2);
}

.mini-tag:hover {
  background: var(--muted); /* El azul de tu app */
  border-color: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tag-icon {
  font-size: 0.9rem;
}

.tag-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

/* Ajuste para los títulos de sección en el perfil */
.user-public-section h3 {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  margin-top: 20px;
}

/* Estilo del Bocadillo (Tooltip) */
.copy-tooltip {
  position: absolute;
  bottom: 120%; /* Aparece arriba de la etiqueta */
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-2);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  animation: popIn 0.2s ease-out forwards;
}

/* Flechita del bocadillo */
.copy-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--accent-2);
}

/* Animaciones */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.copy-tooltip.out {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Ajuste de la etiqueta para que parezca botón */
.mini-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-tag:active {
  transform: scale(0.95); /* Efecto de pulsación */
}

.dev-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 8px;
  color: #ffd700; /* Color Oro */
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* Opcional: Nombre en color especial para el admin */
#user-page-name:has(.dev-badge) {
  background: linear-gradient(90deg, #fff, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

/* Badge del Tester */
.tester-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 8px;
  color: #22c55e; /* Un verde vibrante */
  filter: drop-shadow(0 0 3px rgba(34, 197, 94, 0.4));
}

/* Efecto de nombre para Tester */
#user-page-name:has(.tester-badge) {
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, #ffffff, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Social Zone */

/* FRIENDS SECTION */
.friends-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
  width: 60%;
}
.search-friend-box {
  display: flex;
  gap: 10px;
}
.search-friend-box input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--card);
  background: var(--card);
  color: var(--accent);
}

.friend-card {
  background: var(--card);
  padding: 15px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s;
}
.friend-card:hover {
  transform: translateY(-2px);
}
.friend-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}
.friend-info {
  flex: 1;
}
.friend-info h4 {
  margin: 0;
  font-size: 1rem;
}
.friend-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.friend-actions {
  display: flex;
  gap: 8px;
}
.btn-small {
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* PUBLIC PROFILE MODAL */
.profile-modal {
  width: 90%;
  padding: 30px;
  text-align: center;
}
.profile-avatar-large img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--accent-2);
  margin-bottom: 15px;
}
.public-reviews-section {
  text-align: left;
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
}
.public-review-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.notifications-container {
  position: relative;
}
.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid var(--bg);
}
.dropdown-content {
  position: absolute;
  right: 0;
  top: 40px;
  width: 280px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.dropdown-content.hidden {
  display: none;
}

.dropdown-header {
  padding: 12px;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Item de solicitud */
.request-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.request-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.req-info {
  flex: 1;
  font-size: 14px;
}
.req-btns {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}
.btn-mini {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}
.btn-accept {
  background: var(--accent-2);
  color: white;
}
.btn-reject {
  background: #334155;
  color: white;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.friend-item-card {
  background: var(--card);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.2s;
}

.friend-item-card:hover {
  transform: translateY(-3px);
  background: #2d3a4f;
}
.friend-item-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 8px;
  object-fit: cover;
}

.empty-msg {
  text-align: center;
  color: var(--muted);
  margin-top: 30px;
}

.stats-locked {
  position: relative;
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}
.stats-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: rgba(15, 23, 42, 0.4); /* Un velo oscuro */
  border-radius: 12px;
}
.stats-overlay svg {
  margin-bottom: 8px;
  color: var(--muted);
}

/* Card de búsqueda */
.search-card-result {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
}

.user-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.avatar-md {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.btn-action {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.btn-action.primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-action.success {
  background: #10b98194;
  color: white;
  cursor: default;
}
.btn-action.muted {
  background: #334155;
  color: #94a3b8;
  cursor: default;
}

.btn-danger-outline {
  background: transparent;
  color: #ff4d4d;
  border: 1px solid #ff4d4d;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 15px;
  transition: 0.3s;
  z-index: 10001;
  width: 20%;
}

.btn-danger-outline:hover {
  background: #ff4d4d;
  color: white;
}

.hidden {
  display: none !important;
}

/* IMPORTANTE: Esta regla hace que el JS funcione */
#public-profile-modal:not(.hidden) {
  display: flex !important;
}

.profile-modal-content {
  background: var(--card);
  width: 60%;
  border-radius: 20px;
  padding: 30px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
}

/* Estilo para las reseñas dentro del modal */
#public-reviews-list {
  margin-top: 20px;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Scrollbar personalizado para las reseñas */
#public-reviews-list::-webkit-scrollbar {
  width: 4px;
}
#public-reviews-list::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 10px;
}

/* Ajustes específicos para el perfil público */
.profile-modal-content {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  text-align: left; /* Alineado a la izquierda como tu perfil */
}

#public-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-2);
}

/* Lógica de Blur para Stats */
.stats-locked {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
}

.stats-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  background: rgba(15, 23, 42, 0.2);
  color: var(--accent);
  text-align: center;
  font-weight: 600;
}

.stats-overlay svg {
  margin-bottom: 5px;
  opacity: 0.8;
}

.public-review-item {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.public-review-item:last-child {
  border: none;
}

#public-username:has(.dev-badge) {
  background: linear-gradient(90deg, #fff, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

#public-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
  gap: 15px;
  margin-top: 15px;
}

/* El fondo negro/borroso se queda quieto */
#public-profile-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  padding: 20px;
}

/* La tarjeta es la que tiene el scroll interno */
.profile-modal-content {
  background: var(--card);
  width: 60%;
  max-height: 90vh;
  max-width: 60%; /* No ocupa toda la pantalla de alto */
  overflow-y: auto; /* Permite scroll si el contenido es largo */
  border-radius: 20px;
  padding: 30px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Ocultar scrollbar feo en la tarjeta (opcional) */
.profile-modal-content::-webkit-scrollbar {
  width: 6px;
}
.profile-modal-content::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

#public-bio {
  white-space: pre-wrap; /* Respeta saltos de línea manuales */
  word-wrap: break-word; /* Rompe palabras largas si es necesario */
  overflow-wrap: break-word; /* Estándar moderno para romper líneas */
  max-width: 100%; /* No permite que sea más ancho que el modal */
  line-height: 1.5; /* Mejora la lectura */
  color: var(--muted-text);
  margin-bottom: 20px;
}

#public-profile-action {
  position: relative !important;
  z-index: 99999 !important; /* Prioridad máxima */
  pointer-events: auto !important; /* Asegura que reciba clics */
  margin-top: 25px !important;
  display: flex !important;
  clear: both !important; /* Evita que elementos flotantes lo tapen */
}

#mobile-requests-panel {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--accent-2);
  border-radius: 15px;
  margin: 10px;
  padding: 12px;
  animation: slideDown 0.3s ease-out;
  display: none;
}

.requests-header {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--accent-2);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.request-card-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card); /* O el color de tus cards */
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#jikan-alert {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 1. Bloqueador que cubre toda la pantalla */
.tutorial-blocker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9998;
  background: rgba(
    0,
    0,
    0,
    0.5
  ); /* Un poco más oscuro para que el foco sea mejor */
  pointer-events: none; /* Permitimos que los clics atraviesen el fondo... */
}

/* 2. Cuando el tutorial está activo, activamos el bloqueo y el puntero */
.tutorial-active .tutorial-blocker {
  display: block !important;
  pointer-events: auto; /* ...pero aquí bloqueamos todo */
}

/* 3. Elemento destacado: quitamos el bloqueo de eventos */
.tutorial-active .highlighted {
  position: relative;
  z-index: 9999 !important;
  outline: 4px solid var(--accent-2); /* Asegúrate de que esta variable exista en tu :root */
  pointer-events: auto; /* Permitimos clics solo en el elemento destacado */
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); /* Crea el efecto "foco" profesional */
}

/* 4. Overlay del tutorial: Posicionamiento dinámico */
#tutorial-overlay {
  position: fixed;
  z-index: 99999;
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  max-width: 320px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#tutorial-overlay.hidden {
  display: none;
}

/* Asegura que el resaltado sea visible independientemente del tipo de elemento */
.highlighted {
  outline: 4px solid var(--accent) !important;
  outline-offset: 2px !important;
  position: relative !important;
  z-index: 10005 !important;
}
#res-btn {
  pointer-events: auto !important;
  z-index: 30006 !important;
}

#tutorial-text {
  font-family: "Segoe UI", Roboto, sans-serif;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

#next-step-btn,
#skip-btn {
  background-color: var(--accent-2); /* Un azul/violeta moderno */
  color: var(--accent);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-end;
}

#skip-btn {
  background-color: #0f172a00;
}

.tutorial-fade-in {
  animation: fadeIn 0.4s ease-out;
}

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

.auth-actions {
  display: flex;
  width: 100%; /* Debe coincidir con el ancho de los inputs */
  justify-content: space-between; /* Uno a cada punta */
  gap: 10px;
  margin-top: 5px;
}

#btn-reset-password {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5); /* Borde blanco semi-transparente */
  padding: 8px 15px;
  border-radius: 20px; /* Bordes redondeados tipo cápsula */
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
  font-family: inherit;
}

#btn-reset-password:hover {
  background: rgba(255, 255, 255, 0.1); /* Brillo sutil al pasar el ratón */
  border-color: #ffffff;
  transform: translateY(-1px);
}

#btn-reset-password:active {
  transform: translateY(0);
}
#btn-login {
  flex-grow: 1;
  width: auto;
  background: var(--accent-2);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
}

/* ==========================================
   VISTA DE SOPORTE (CORREGIDA Y CENTRADA)
   ========================================== */

/* Contenedor principal centrado */
.support-wrapper {
  max-width: 550px; /* Ancho máximo para que se vea bien en PC y móvil */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 25px; /* Espacio entre las cajitas */
  padding: 10px;
}

.support-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Bloque de Cuota (La barrita de 3 tickets) */
.support-info-card {
  background: var(--card);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow);
}

.quota-bar {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  margin: 10px 0;
  overflow: hidden;
}

#quota-fill {
  height: 100%;
  background: var(--accent-2);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tickets Individuales */
.ticket-card {
  background: var(--card);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid rgba(255,255,255,0.03);
}

/* Formulario */
.ticket-form {
  background: var(--card);
  padding: 20px;
  border-radius: 15px;
  margin-top: 15px;
  animation: slideIn 0.3s ease;
}

#support-msg {
  width: 100%;
  min-height: 100px;
  background: var(--bg);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px;
  margin: 15px 0;
  font-family: inherit;
  resize: none;
}

/* Panel Admin más separado */
.admin-section {
  margin-top: 50px;
  padding: 20px;
  background: rgba(255,255,255,0.02);
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,0.1);
}

.admin-separator {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 3px;
  margin-bottom: 20px;
}

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

/* Ticket solucionado */
.ticket-card.resolved {
    border-left: 4px solid #10b981 !important; /* Verde esmeralda */
    background: rgba(16, 185, 129, 0.05);
}

.badge.resolved {
    background: #10b981;
    color: white;
}

.admin-hidden {
    display: none !important;
}

/* Ajuste para que el formulario no quede debajo de la barra móvil */
.support-wrapper {
    padding-bottom: 100px; /* Suficiente espacio para que la barra móvil no tape el botón Enviar */
}

/* El contenedor del formulario también necesita aire abajo */
.ticket-form {
    margin-bottom: 20px;
}

#support-view {
    /* Esto permite que la página haga scroll suficiente para superar la barra móvil */
    padding-bottom: 80px; 
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Si tu barra móvil mide 60px, le damos 80px de margen al formulario */
#ticket-form-container {
    margin-bottom: 40px; 
}