:root {
  --pink: #ff2d95;
  --cyan: #00f0ff;
  --purple: #7b2ff7;
  --yellow: #ffe94d;
  --bg-deep: #0d0221;
  --bg-mid: #1a0538;
  --ink: #f4eaff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(123, 47, 247, 0.35), transparent 60%),
    linear-gradient(var(--bg-deep), var(--bg-mid) 40%, var(--bg-deep));
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 45, 149, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.18) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(500px) rotateX(60deg) translateY(-10%) scale(2);
  transform-origin: top;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, transparent, black 25%);
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid var(--pink);
  box-shadow: 0 2px 20px rgba(255, 45, 149, 0.5);
  background: rgba(13, 2, 33, 0.7);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 8px var(--cyan), 0 0 16px var(--cyan);
  letter-spacing: 1px;
}
.logo span { color: var(--pink); text-shadow: 0 0 8px var(--pink), 0 0 16px var(--pink); }

.topbar nav { display: flex; align-items: center; gap: 0.75rem; }

.user-pill {
  font-size: 1.1rem;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: 999px;
  padding: 0.15rem 0.8rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.title-neon {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.4rem;
  color: var(--pink);
  text-shadow: 0 0 6px var(--pink), 0 0 18px var(--purple), 0 0 32px var(--purple);
  margin: 0 0 0.5rem;
  line-height: 1.6;
}

.subtitle { color: #cbb8f0; font-size: 1.15rem; }

.center-stage {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crt-card {
  padding: 2.5rem;
  text-align: center;
  max-width: 420px;
}

.glow-box {
  background: rgba(26, 5, 56, 0.75);
  border: 2px solid var(--cyan);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.45), inset 0 0 20px rgba(123, 47, 247, 0.25);
}

.stack-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }

input[type="email"], input[type="text"] {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  border: 2px solid var(--purple);
  background: #12042c;
  color: var(--ink);
  outline: none;
}
input:focus { border-color: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-neon {
  background: linear-gradient(90deg, var(--pink), var(--purple));
  color: #fff;
  box-shadow: 0 0 10px var(--pink), 0 0 20px var(--purple);
}
.btn-neon:hover { filter: brightness(1.2); }

.btn-ghost {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--cyan);
}

.btn-tiny { font-size: 0.55rem; padding: 0.35rem 0.5rem; }

.btn-danger { background: #2a0a0a; color: var(--pink); border: 1px solid var(--pink); }

.page-head { margin-bottom: 1.5rem; }

.back-link { color: var(--cyan); text-decoration: none; font-size: 1.1rem; }

.inline-form { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; }
.inline-form.small { margin: 0.6rem 0 0; }
.inline-form input { flex: 1; }

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.board-tile {
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.15s;
}
.board-tile:hover { transform: translateY(-3px) rotate(-0.5deg); }

.board-tile-link {
  color: var(--yellow);
  text-decoration: none;
  font-size: 1.3rem;
  text-shadow: 0 0 6px rgba(255, 233, 77, 0.6);
}

.empty-hint { color: #9d86c9; }

.lists-row {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  align-items: flex-start;
}

.list-col {
  min-width: 260px;
  max-width: 260px;
  padding: 0.9rem;
  flex-shrink: 0;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan);
  margin-bottom: 0.8rem;
  cursor: grab;
}

.new-list-form {
  min-width: 220px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-shrink: 0;
  height: fit-content;
}

.cards-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 30px;
}

.sticky-card {
  background: var(--yellow);
  color: #2a1a00;
  padding: 0.6rem 0.7rem;
  border-radius: 3px;
  font-size: 1.1rem;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  cursor: grab;
  transform: rotate(-1deg);
}
.sticky-card:nth-child(even) {
  background: #7fffd4;
  transform: rotate(1deg);
}
.sticky-card:nth-child(3n) {
  background: #ff9ecf;
  transform: rotate(-0.5deg);
}
.sticky-card form { margin: 0; }

.card-ghost { opacity: 0.4; }

form button.btn-danger { line-height: 1; }

/* --- topbar extras --- */

.lang-switch {
  font-size: 1rem;
  color: #9d86c9;
}
.lang-switch a { color: #9d86c9; text-decoration: none; }
.lang-switch a.active { color: var(--cyan); text-shadow: 0 0 6px var(--cyan); }

/* --- flash --- */

.flash {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0.7rem 1.1rem;
  border-radius: 6px;
  font-size: 1.1rem;
}
.flash-error {
  background: rgba(255, 45, 149, 0.12);
  border: 1px solid var(--pink);
  color: var(--pink);
}

/* --- landing --- */

.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
}
.hero-title {
  font-size: 2rem;
  white-space: pre-line;
  margin-bottom: 1rem;
}
.hero-subtitle {
  max-width: 480px;
  margin: 0 auto 2rem;
  font-size: 1.3rem;
}
.btn-big { font-size: 0.9rem; padding: 1rem 2rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.feature-tile { padding: 1.5rem; text-align: center; }
.feature-tile h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  color: var(--yellow);
  text-shadow: 0 0 6px rgba(255, 233, 77, 0.6);
  margin: 0 0 0.8rem;
}
.feature-tile p { color: #cbb8f0; font-size: 1.15rem; margin: 0; }

.footer-tag {
  text-align: center;
  color: #6b5a8e;
  font-size: 1.1rem;
  margin-top: 3rem;
}

.back-link-wrap { margin-top: 1.2rem; }

/* --- board tile actions / rename --- */

.tile-actions { display: flex; gap: 0.4rem; align-items: center; }
.board-tile { gap: 0.6rem; }

.list-name { cursor: pointer; }

/* --- card modal --- */

.card-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 1, 15, 0.75);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.card-modal-backdrop.open { display: flex; }

.card-modal {
  width: min(480px, 90vw);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.card-modal-title {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  background: #12042c;
  color: var(--yellow);
  border: 2px solid var(--purple);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
}

.card-modal-desc {
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  min-height: 140px;
  background: #12042c;
  color: var(--ink);
  border: 2px solid var(--purple);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  resize: vertical;
}
.card-modal-desc:focus, .card-modal-title:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  outline: none;
}

.card-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* --- flash ok --- */

.flash-ok {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--cyan);
  color: var(--cyan);
}

/* --- theme switcher --- */

.theme-switch { display: flex; gap: 0.4rem; align-items: center; margin-right: 0.4rem; }
.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0;
}
.theme-dot.active { border-color: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); }
.theme-dot-retrowave { background: linear-gradient(135deg, #ff2d95, #00f0ff); }
.theme-dot-jira { background: #0052cc; }
.theme-dot-cork { background: #a9713f; }

/* --- board members --- */

.members-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}
.members-title { color: #9d86c9; }
.member-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--cyan);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  color: var(--ink);
}
.member-pill form { margin: 0; display: inline-flex; }
.member-pill-owner { border-color: var(--yellow); }
.member-remove {
  background: none;
  border: none;
  color: var(--pink);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}
.members-invite { margin: 0; }
.owner-only-hint { color: #6b5a8e; font-size: 0.95rem; }

.role-badge {
  font-size: 0.6rem;
  font-family: 'Press Start 2P', monospace;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--bg-deep);
  background: var(--cyan);
  white-space: nowrap;
}
.role-badge-owner { background: var(--yellow); }
.tile-meta { display: flex; align-items: center; gap: 0.6rem; }

/* =========================================================
   THEME: JIRA (oficina) — plano, claro, sin neon
   ========================================================= */

body.theme-jira {
  --bg-deep: #f4f5f7;
  --bg-mid: #ffffff;
  --ink: #172b4d;
  --pink: #0052cc;
  --cyan: #0052cc;
  --purple: #5243aa;
  --yellow: #ffab00;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-deep);
}
body.theme-jira::before,
body.theme-jira .scanlines { display: none; }

body.theme-jira .topbar {
  background: #fff;
  border-bottom: 1px solid #dfe1e6;
  box-shadow: none;
}
body.theme-jira .logo { font-family: inherit; font-size: 1.1rem; font-weight: 700; letter-spacing: 0; color: #0052cc; text-shadow: none; }
body.theme-jira .logo span { color: #172b4d; text-shadow: none; }

body.theme-jira .title-neon {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.5rem;
  color: #172b4d;
  text-shadow: none;
}
body.theme-jira .subtitle { color: #5e6c84; }

body.theme-jira .glow-box {
  background: #fff;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.15);
}

body.theme-jira .list-col { background: #f4f5f7; border: 1px solid #dfe1e6; box-shadow: none; border-radius: 4px; }
body.theme-jira .list-head {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5e6c84;
  text-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: default;
}

body.theme-jira .sticky-card {
  background: #fff !important;
  color: #172b4d;
  transform: none !important;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.25);
  border-left: 3px solid #0052cc;
  font-family: inherit;
  font-size: 0.95rem;
}

body.theme-jira .btn { font-family: inherit; text-transform: none; letter-spacing: 0; border-radius: 4px; font-weight: 600; font-size: 0.85rem; }
body.theme-jira .btn-neon { background: #0052cc; box-shadow: none; }
body.theme-jira .btn-neon:hover { background: #0747a6; filter: none; }
body.theme-jira .btn-ghost { color: #42526e; border-color: #dfe1e6; }
body.theme-jira .btn-danger { background: #fff; color: #de350b; border-color: #ffbdad; }

body.theme-jira input[type="email"],
body.theme-jira input[type="text"],
body.theme-jira .card-modal-desc,
body.theme-jira .card-modal-title {
  font-family: inherit;
  background: #fff;
  border: 1px solid #dfe1e6;
  color: #172b4d;
}
body.theme-jira input:focus,
body.theme-jira .card-modal-desc:focus,
body.theme-jira .card-modal-title:focus {
  border-color: #4c9aff;
  box-shadow: 0 0 0 2px rgba(76, 154, 255, 0.3);
}

body.theme-jira .board-tile-link { color: #0052cc; text-shadow: none; }
body.theme-jira .board-tile:hover { transform: none; box-shadow: 0 2px 4px rgba(9, 30, 66, 0.15); }
body.theme-jira .feature-tile h2 { color: #172b4d; text-shadow: none; font-family: inherit; }
body.theme-jira .empty-hint, body.theme-jira .footer-tag { color: #6b778c; }
body.theme-jira .lang-switch a { color: #6b778c; }
body.theme-jira .lang-switch a.active { color: #0052cc; text-shadow: none; }
body.theme-jira .user-pill { color: #42526e; border-color: #dfe1e6; }
body.theme-jira .role-badge { font-family: inherit; font-weight: 700; color: #fff; }

/* =========================================================
   THEME: CORK (corcho) — post-its de verdad
   ========================================================= */

body.theme-cork {
  --ink: #3b2a1a;
  font-family: 'Kalam', cursive, sans-serif;
  background-color: #a9713f;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0, 0, 0, 0.12), transparent 60%),
    radial-gradient(circle at 80% 60%, rgba(0, 0, 0, 0.1), transparent 55%),
    repeating-radial-gradient(circle at center, rgba(0, 0, 0, 0.05) 0px, transparent 2px, transparent 4px);
}
body.theme-cork::before,
body.theme-cork .scanlines { display: none; }

body.theme-cork .topbar {
  background: rgba(59, 42, 26, 0.85);
  border-bottom: 4px solid #7a5230;
  box-shadow: none;
}
body.theme-cork .logo { font-family: 'Kalam', cursive; font-weight: 700; color: #fff8e7; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3); }
body.theme-cork .logo span { color: #ffd166; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3); }

body.theme-cork .title-neon {
  font-family: 'Kalam', cursive;
  font-weight: 700;
  color: #3b2a1a;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
}
body.theme-cork .subtitle { color: #5a4028; }

body.theme-cork .glow-box {
  background: #fdf6e3;
  border: none;
  border-radius: 2px;
  box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.35);
}

body.theme-cork .list-col { background: rgba(255, 248, 231, 0.92); box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.3); border: none; transform: rotate(-0.4deg); }
body.theme-cork .list-head { font-family: 'Kalam', cursive; font-weight: 700; font-size: 1.2rem; color: #5a4028; text-shadow: none; }

body.theme-cork .sticky-card {
  position: relative;
  font-family: 'Kalam', cursive;
  font-size: 1.25rem;
  padding-top: 1rem;
}
body.theme-cork .sticky-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #a11d1d);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body.theme-cork .btn { font-family: 'Kalam', cursive; font-weight: 700; border-radius: 6px; text-transform: none; letter-spacing: 0; }
body.theme-cork .btn-neon { background: #a11d1d; box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3); }
body.theme-cork .btn-ghost { color: #fff8e7; border-color: #fff8e7; }
body.theme-cork .btn-danger { background: #fdf6e3; color: #a11d1d; border-color: #a11d1d; }

body.theme-cork input[type="email"],
body.theme-cork input[type="text"],
body.theme-cork .card-modal-desc,
body.theme-cork .card-modal-title {
  font-family: 'Kalam', cursive;
  background: #fdf6e3;
  border: 2px solid #c9a876;
  color: #3b2a1a;
}

body.theme-cork .board-tile-link { color: #5a4028; text-shadow: none; font-family: 'Kalam', cursive; font-weight: 700; }
body.theme-cork .feature-tile h2 { color: #5a4028; text-shadow: none; font-family: 'Kalam', cursive; }
body.theme-cork .empty-hint, body.theme-cork .footer-tag { color: #fff8e7; }
body.theme-cork .lang-switch a { color: #e8d5b5; }
body.theme-cork .lang-switch a.active { color: #ffd166; text-shadow: none; }
body.theme-cork .user-pill { color: #fff8e7; border-color: #fff8e7; }
body.theme-cork .role-badge { font-family: 'Kalam', cursive; font-weight: 700; color: #fff8e7; }
