/* ============================================================
   Better Discovery – Global Styles
   ============================================================ */

:root {
  color-scheme: dark;
  --bg-primary:   #0d0d0d;
  --bg-secondary: #141414;
  --bg-card:      #1c1c1c;
  --accent:       #6366f1;
  --accent-hover: #4f46e5;
  --text-primary: #f0f0f0;
  --text-muted:   #979797;
  --border:       #2a2a2a;
  --success:      #22c55e;
  --danger:       #ef4444;
  --radius:       12px;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.5);
  --grad-1:       linear-gradient(135deg, #7c3aed 0%, #6366f1 45%, #06b6d4 100%);
  --grad-2:       linear-gradient(130deg, rgba(124,58,237,0.2), rgba(6,182,212,0.14));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

a {
  color: var(--accent);
  text-underline-offset: 2px;
  text-decoration-color: rgba(99, 102, 241, 0.45);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}

/* Barras de scroll discretas y a juego con el tema */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: #3a3a3a; }

body::before,
body::after {
  content: '';
  position: fixed;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.22;
}

body::before {
  background: #7c3aed;
  top: -180px;
  left: -140px;
  animation: blobDriftA 26s ease-in-out infinite alternate;
}

body::after {
  background: #06b6d4;
  bottom: -220px;
  right: -120px;
  animation: blobDriftB 32s ease-in-out infinite alternate;
}

@keyframes blobDriftA {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(130px, 90px) scale(1.18); }
}

@keyframes blobDriftB {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-150px, -70px) scale(1.12); }
}

/* ── Navigation ── */
nav {
  background: var(--bg-secondary);
  background: color-mix(in srgb, var(--bg-secondary) 80%, transparent);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.nav-auth .user-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}

/* Subrayado deslizante (micro-interacción) */
.nav-links a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-1);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-logo { transition: transform 0.2s ease; }
.nav-logo:hover { transform: translateY(-2px) rotate(-2deg); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  font-family: inherit;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--grad-1);
  background-size: 220% 220%;
  color: #fff;
  transition: background-position 0.5s ease, transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
}

/* Brillo que barre el botón al pasar el ratón */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.28) 50%, transparent 58%);
  transform: translateX(-130%);
  pointer-events: none;
}

.btn-primary:hover::after {
  animation: btnShine 0.8s ease;
}

@keyframes btnShine {
  from { transform: translateX(-130%); }
  to   { transform: translateX(130%); }
}

.btn-primary:hover {
  background-position: 90% 50%;
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Feedback de pulsación (micro-interacción) */
.btn:active:not(:disabled),
.dp-tab:active,
.dp-chip:active,
.page-btn:active {
  transform: scale(0.97);
}

/* ── Discovery+ (nav) ── */
.dp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: linear-gradient(120deg, rgba(245, 158, 11, 0.16), rgba(251, 191, 36, 0.10));
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.dp-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.dp-btn.active {
  background: linear-gradient(120deg, #f59e0b, #fbbf24);
  border-color: transparent;
  color: #1c1204;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

/* Botón dorado (acciones de Discovery+) */
.btn-dp {
  background: linear-gradient(120deg, #f59e0b, #fbbf24);
  color: #1c1204;
  font-weight: 700;
}

.btn-dp:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

/* ── Modal Discovery+ ── */
.dp-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 8, 12, 0.66);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease both;
}

.dp-modal {
  position: relative;
  width: min(100%, 460px);
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #21212a 0%, #17171c 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  padding: 30px 28px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.dp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.dp-close:hover { color: var(--text-primary); background: var(--bg-card); }

.dp-kicker { font-size: 2.2rem; margin-bottom: 6px; }

.dp-title {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.dp-title span {
  background: linear-gradient(120deg, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dp-sub { color: var(--text-muted); margin-bottom: 18px; }

.dp-perks {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.dp-perks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 12px;
  padding: 11px 14px;
}

.dp-perks li strong { font-size: 0.9rem; }
.dp-perks li small { color: var(--text-muted); line-height: 1.45; display: block; margin-top: 2px; }
.dp-perk-icon { font-size: 1.3rem; }

.dp-action { text-align: center; }
.dp-action .btn-dp { width: 100%; justify-content: center; padding: 12px; }

.dp-active-note {
  text-align: center;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.dp-fineprint {
  margin-top: 14px;
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-muted);
}

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

/* ── Barra descubrir: tabs + chips ── */
.discover-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.dp-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.dp-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.dp-tab:hover { color: var(--text-primary); }

.dp-tab.active {
  background: var(--grad-1);
  color: #fff;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

.dp-lock { font-size: 0.72rem; }

.dp-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dp-chip {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.dp-chip:hover { color: var(--text-primary); border-color: var(--accent); }

.dp-chip.active {
  background: rgba(99, 102, 241, 0.16);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.dp-chip.locked { border-style: dashed; }

/* ── Skeleton (shimmer) ── */
.skeleton-card {
  background: linear-gradient(180deg, rgba(30,30,40,0.9) 0%, rgba(26,26,30,0.9) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sk-thumb {
  height: 160px;
  background: linear-gradient(100deg, #1c1c24 40%, #26263a 50%, #1c1c24 60%);
  background-size: 200% 100%;
  animation: skShimmer 1.3s ease-in-out infinite;
  border-bottom: 1px solid var(--border);
}

.sk-line {
  height: 12px;
  border-radius: 6px;
  margin: 14px 16px 0;
  background: linear-gradient(100deg, #1c1c24 40%, #26263a 50%, #1c1c24 60%);
  background-size: 200% 100%;
  animation: skShimmer 1.3s ease-in-out infinite;
}

.sk-line.w80 { width: 72%; }
.sk-line.w60 { width: 58%; }
.sk-line.w40 { width: 40%; margin-bottom: 18px; }

@keyframes skShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Layout helpers ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 80px 24px 56px;
  position: relative;
  animation: fadeUp 0.6s ease both;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(115deg, #f0f0f0 25%, #a5b4fc 42%, #f0f0f0 55%, #67e8f9 72%, #f0f0f0 85%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
  animation: heroShimmer 8s ease-in-out infinite;
}

@keyframes heroShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 28px;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 18px auto auto 50%;
  width: min(760px, 90vw);
  height: 180px;
  transform: translateX(-50%);
  background: var(--grad-2);
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.85;
  z-index: -1;
  animation: heroGlow 6s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50%      { opacity: 0.95; transform: translateX(-50%) scale(1.05); }
}

/* ── Search ── */
.search-wrap {
  max-width: 560px;
  margin: 0 auto 44px;
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 13px 20px 13px 46px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.search-wrap input::placeholder { color: var(--text-muted); }

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.result-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: -8px 0 16px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 7px 12px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s;
}

.sort-select:hover { border-color: var(--accent); }
.sort-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }

/* ── Snippet grid ── */
.snippets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* ── Card ── */
.snippet-card {
  position: relative;
  background: linear-gradient(180deg, rgba(30,30,40,0.95) 0%, rgba(26,26,30,0.95) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.snippet-card:hover {
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-4px) scale(1.012);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55), 0 6px 28px rgba(99, 102, 241, 0.22);
}

/* Destello diagonal que barre la tarjeta al pasar el ratón */
.snippet-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.055) 50%, transparent 60%);
  transform: translateX(-130%);
  pointer-events: none;
  z-index: 3;
}

.snippet-card:hover::after {
  animation: cardShine 0.9s ease;
}

@keyframes cardShine {
  from { transform: translateX(-130%); }
  to   { transform: translateX(130%); }
}

.snippet-card .card-thumb { transition: filter 0.3s ease; }
.snippet-card:hover .card-thumb { filter: saturate(1.2) brightness(1.06); }

.card-thumb {
  height: 160px;
  background: linear-gradient(130deg, #312e81, #1d4ed8, #0891b2);
  background-size: 180% 180%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  animation: shimmer 8s ease infinite;
}

.card-thumb iframe {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 200%;
  border: none;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(13, 13, 20, 0.72);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #e0e7ff;
  font-size: 0.68rem;
  backdrop-filter: blur(4px);
}

.card-body { padding: 16px; }

.card-title {
  font-weight: 600;
  font-size: 0.975rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  min-height: 2.5em;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grad-1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

.profile-dot.large {
  width: 28px;
  height: 28px;
}

.card-stats { display: flex; gap: 10px; flex-shrink: 0; }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 48px;
}

.page-btn {
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

.page-btn:hover,
.page-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Loading / Empty ── */
.loading {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-muted);
}

.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 10px;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty-state h3 { margin-bottom: 8px; color: var(--text-primary); }

/* ── Upload / Form pages ── */
.form-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}

.page-header { margin-bottom: 36px; }
.page-title  { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.page-sub    { color: var(--text-muted); font-size: 0.95rem; }

.form-group { margin-bottom: 22px; }

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.form-label .hint { color: var(--text-muted); font-weight: 400; }

.form-input,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  /* 1rem = 16px: evita que el móvil haga zoom al enfocar el campo */
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-textarea { resize: vertical; min-height: 100px; }

.code-textarea {
  font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.83rem;
  min-height: 320px;
  tab-size: 2;
  line-height: 1.6;
}

.code-textarea.dragover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.size-bar {
  display: flex;
  justify-content: flex-end;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.size-bar.warn  { color: #f59e0b; }
.size-bar.error { color: var(--danger); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ── View page ── */
.view-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  padding: 20px 24px;
  max-width: 1440px;
  margin: 0 auto;
}

.preview-wrap {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  height: calc(100vh - 100px);
  position: sticky;
  top: 74px;
  border: 1px solid var(--border);
}

.preview-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.view-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.panel {
  background: linear-gradient(180deg, rgba(33,33,40,0.95) 0%, rgba(23,23,28,0.95) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.panel-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.view-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.view-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.author-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.like-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-primary);
  font-size: 0.93rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
  font-weight: 500;
}

.like-btn:hover { background: rgba(255, 77, 109, 0.1); border-color: #ff4d6d; color: #ff4d6d; }
.like-btn.liked  { background: rgba(255, 77, 109, 0.12); border-color: #ff4d6d; color: #ff4d6d; animation: popLike 0.35s ease; }

/* El corazón «salta» al dar like */
.like-btn.liked #likeIcon { display: inline-block; animation: popIcon 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.4); }

@keyframes popIcon {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45) rotate(-8deg); }
  70%  { transform: scale(0.92) rotate(4deg); }
  100% { transform: scale(1); }
}

/* Botón Guardada (descubrimiento+) */
.copy-btn.bookmark-btn.saved {
  border-color: #f59e0b;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
}

.copy-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
  margin-top: 8px;
}

.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Comments */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.comment {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 0.83rem;
}

.comment-author {
  font-weight: 600;
  color: var(--accent);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.comment-body { color: var(--text-muted); line-height: 1.5; }

.comment-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.comment-form { display: flex; flex-direction: column; gap: 8px; }

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  /* 1rem = 16px: evita que el móvil haga zoom al enfocar el campo */
  font-size: 1rem;
  font-family: inherit;
  resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }
.comment-form input::placeholder,
.comment-form textarea::placeholder { color: var(--text-muted); }

.comment-form textarea { min-height: 68px; }

/* ── About page ── */
.about-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.about-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f0f0f0 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.about-page > p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.about-page h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 36px;
}

.about-page p { color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.feature-card {
  background: linear-gradient(180deg, rgba(34,34,39,0.9) 0%, rgba(25,25,30,0.9) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,0.5);
}

.feature-card.dp-feature {
  border-color: rgba(245, 158, 11, 0.5);
  background:
    linear-gradient(180deg, rgba(64, 48, 14, 0.35) 0%, rgba(25, 25, 30, 0.9) 70%),
    linear-gradient(180deg, rgba(34,34,39,0.9) 0%, rgba(25,25,30,0.9) 100%);
}

.feature-card.dp-feature:hover { border-color: #f59e0b; }

.feature-card .ico { font-size: 1.6rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 0.82rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

.code-block {
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 18px 20px;
  font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.82rem;
  color: #a5f3fc;
  overflow-x: auto;
  margin: 14px 0;
  line-height: 1.7;
  white-space: pre;
}

.step {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-body h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.step-body p  { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.step-body a  { color: var(--accent); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 13px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.88rem;
  z-index: 9999;
  animation: slideIn 0.25s ease;
  max-width: 320px;
  box-shadow: var(--shadow);
}

.toast.success { border-color: var(--success); color: var(--success); }
.toast.error   { border-color: var(--danger);  color: var(--danger);  }
.toast.info    { border-color: var(--accent);  }

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes popLike {
  0% { transform: scale(0.96); }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.reveal {
  opacity: 0;
  animation: fadeUp 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

/* ── Config notice ── */
.config-notice {
  grid-column: 1 / -1;
  background: #0d0d1a;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  line-height: 1.7;
}

.config-notice code {
  background: var(--bg-secondary);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: monospace;
  color: var(--accent);
  font-size: 0.88em;
}

.tag-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.73rem;
  background: rgba(99,102,241,0.15);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.3);
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 24px 30px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* Títulos: mejor equilibrio de líneas (los navegadores antiguos lo ignoran) */
h1, h2, h3, .page-title, .dp-title, .section-title { text-wrap: balance; }

/* ── Focus visibility (keyboard users) ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Barra de carga superior ── */
.load-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 10001;
  background: var(--grad-1);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, width 0.4s ease;
}

.load-bar.on {
  opacity: 1;
  width: 45%;
  animation: loadBarPulse 1.1s ease-in-out infinite;
}

.load-bar.done {
  width: 100%;
  opacity: 0;
  transition: width 0.35s ease, opacity 0.45s ease;
}

@keyframes loadBarPulse {
  0%, 100% { width: 40%; }
  50%      { width: 85%; }
}

/* ── Reveal on scroll ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].reveal-in {
  opacity: 1;
  transform: none;
}

.profile-grid > [data-reveal]:nth-child(2) { transition-delay: 80ms; }
.profile-grid > [data-reveal]:nth-child(3) { transition-delay: 160ms; }
.feature-grid > [data-reveal]:nth-child(2) { transition-delay: 60ms; }
.feature-grid > [data-reveal]:nth-child(3) { transition-delay: 120ms; }
.feature-grid > [data-reveal]:nth-child(4) { transition-delay: 180ms; }
.feature-grid > [data-reveal]:nth-child(5) { transition-delay: 240ms; }
.feature-grid > [data-reveal]:nth-child(6) { transition-delay: 300ms; }

/* ── Toast: icono + salida ── */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 1px;
}

.toast.success .toast-icon { background: rgba(34, 197, 94, 0.16); color: var(--success); }
.toast.error   .toast-icon { background: rgba(239, 68, 68, 0.16); color: var(--danger); }
.toast.info    .toast-icon { background: rgba(99, 102, 241, 0.16); color: var(--accent); }

.toast-msg { line-height: 1.45; }

.toast-hide {
  opacity: 0 !important;
  transform: translateX(110%) !important;
  transition: opacity 0.32s ease, transform 0.32s ease !important;
}

/* ── Like: anillo pulsante ── */
.like-btn { position: relative; overflow: hidden; }

.like-btn.liked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 77, 109, 0.55);
  animation: likeRing 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes likeRing {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.05); }
}

/* ── Vista de creación: entrada animada ── */
.view-enter { animation: fadeIn 0.35s ease both; }
.view-enter .preview-wrap { animation: fadeUp 0.5s ease both; }
.view-enter .view-sidebar .panel { animation: fadeUp 0.5s ease both; }
.view-enter .view-sidebar .panel:nth-child(1) { animation-delay: 0.05s; }
.view-enter .view-sidebar .panel:nth-child(2) { animation-delay: 0.12s; }
.view-enter .view-sidebar .panel:nth-child(3) { animation-delay: 0.19s; }

/* ── Login: tarjeta + mostrar contraseña ── */
.auth-card { animation: fadeUp 0.5s ease both; }

.pw-wrap { position: relative; }

.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px 7px;
  border-radius: 6px;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}

.pw-toggle:hover { opacity: 1; background: rgba(99, 102, 241, 0.12); }

/* ── Paginación: activo con gradiente ── */
.page-btn.active {
  background: var(--grad-1);
  border-color: transparent;
  color: #fff;
}

/* ── Reduced motion ── */
/* ═══════════════════════════════════════════════════
   Página Discovery+ (discovery-plus.html)
   ═══════════════════════════════════════════════════ */
.dp-hero { text-align: center; }
.dp-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 18px;
}
.dp-hero h1 .dp-plus-mark,
.dp-plan h3 .dp-plus-mark {
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dp-hero p { max-width: 640px; margin: 0 auto 26px; }
.dp-member-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.dp-member-note:not([hidden]) { color: #a5b4fc; }

.dp-section { max-width: 1080px; margin: 0 auto; padding: 46px 20px 8px; }
.dp-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 26px;
}

/* Cómo funciona */
.dp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.dp-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.dp-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-1);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.dp-step h3 { font-size: 1rem; margin-bottom: 8px; }
.dp-step p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.55; }

/* Planes */
.dp-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}
.dp-plan {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
}
.dp-plan h3 { font-size: 1.15rem; margin-bottom: 10px; }
.dp-plan-price { font-size: 2rem; font-weight: 800; margin: 0 0 18px; }
.dp-plan-price small { font-size: 0.85rem; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.dp-plan-list { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.dp-plan-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 7px 0 7px 28px;
  position: relative;
}
.dp-plan-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}
.dp-plan-cta { width: 100%; justify-content: center; }
.dp-plan.featured {
  border: none;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    var(--grad-1) border-box;
  border: 2px solid transparent;
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.22);
  transform: translateY(-6px);
}
.dp-plan.featured .dp-plan-list li { color: var(--text-primary); }
.dp-plan-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-1);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.dp-fineprint {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Acciones por estado */
.dp-action { min-height: 46px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dp-big { font-size: 1rem; padding: 13px 34px; }
.dp-checking { color: var(--text-muted); font-size: 0.9rem; }

/* Tarjeta de estado de la suscripción */
.dp-status-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 18px;
  padding: 22px 24px;
}
.dp-status-card .dp-section-title { text-align: center; }
.dp-status-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.dp-status-chips .chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.chip-k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 700; }
.chip-v { font-size: 0.95rem; font-weight: 600; overflow-wrap: anywhere; }
.dp-redeem-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.5);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.dp-redeem-box code {
  display: inline-block;
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fbbf24;
}
.dp-pending-note { color: #fbbf24; font-weight: 600; font-size: 0.95rem; text-align: center; }
.dp-active-until { color: var(--text-muted); font-size: 0.85rem; }
.dp-code-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.dp-code-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.dp-code-row .form-input { flex: 1 1 220px; text-align: center; letter-spacing: 0.06em; }
.dp-trust { margin-top: 18px; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 720px) {
  .dp-status-chips { grid-template-columns: 1fr; }
}

/* FAQ */
.dp-faq { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.dp-faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 18px;
  transition: border-color 0.2s;
}
.dp-faq details[open] { border-color: rgba(99, 102, 241, 0.5); }
.dp-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dp-faq summary::-webkit-details-marker { display: none; }
.dp-faq summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.25s;
  flex: none;
}
.dp-faq details[open] summary::after { transform: rotate(45deg); }
.dp-faq details p {
  margin: 0;
  padding: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA final */
.dp-cta-band {
  margin: 60px auto 70px;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 54px 24px;
  border-radius: 20px;
  background: var(--grad-2);
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.dp-cta-band h2 { font-size: 1.6rem; margin-bottom: 10px; }
.dp-cta-band p { color: var(--text-muted); margin-bottom: 24px; }

/* Responsive */
@media (max-width: 720px) {
  .dp-steps { grid-template-columns: 1fr; }
  .dp-price-grid { grid-template-columns: 1fr; }
  .dp-plan.featured { transform: none; }
  .dp-section { padding-top: 34px; }
}

/* ═══════════════════════════════════════════════════
   Badges, banner Discovery+ y tickets de soporte
   ═══════════════════════════════════════════════════ */
.discovery-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #1a1205;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}
.mod-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}

/* Banner promocional de Discovery+ (home y profile) */
.plus-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto 26px;
  padding: 16px 22px;
  border-radius: 16px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  background: linear-gradient(120deg, rgba(249, 115, 22, 0.10), rgba(124, 58, 237, 0.10));
}
.plus-text { color: var(--text-primary); font-size: 0.92rem; line-height: 1.5; }
.plus-text span { font-weight: 700; }
.plus-text .plus-hot { color: #fb923c; }

/* Tickets de soporte (support.html y mod.html) */
.ticket-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  transition: border-color 0.2s;
}
.ticket-card:hover { border-color: rgba(99, 102, 241, 0.4); }
.ticket-card .ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ticket-title { font-weight: 600; font-size: 1rem; }
.ticket-meta { color: var(--text-muted); font-size: 0.82rem; margin-top: 6px; }
.ticket-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.ticket-status.open {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.ticket-status.closed {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.chat-bubble { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.chat-bubble .who { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
.chat-bubble .what {
  color: #e5e7eb;
  font-size: 0.84rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble .when { font-size: 0.72rem; color: var(--text-muted); }

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

/* ── Responsive ── */
@media (max-width: 900px) {
  .view-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .preview-wrap {
    height: 55vw;
    min-height: 300px;
    position: static;
  }
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 50px 16px 40px; }
}

/* ═══════════════════════════════════════════════════
   Modal de vinculación de base de datos (⚙️ BD)
   ═══════════════════════════════════════════════════ */
.db-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.db-modal {
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 26px 26px 22px;
  position: relative;
}
.db-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.db-close:hover { color: var(--text-primary); background: var(--bg-card); }
.db-title { margin: 0 0 8px; font-size: 1.35rem; }
.db-status { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.5; }
.db-status[data-status="local"] { color: #a5b4fc; }
.db-fineprint { font-size: 0.75rem; color: var(--text-muted); margin: 10px 0 16px; line-height: 1.5; }
.db-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.db-error { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; margin: 10px 0 0; }
