/* Spawnverse Worlds — style, coerente con la mod */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #050208;
  --bg-card: #0d0815;
  --bg-mid:  #1a0e2e;
  --ink: #f4ecff;
  --ink-dim: #8a7ca0;
  --plasma: #ff4d4d;
  --void: #6c2bd9;
  --laser: #c8ff00;
  --cyan: #00e5ff;
  --warn: #ffaa55;
}

html, body {
  background: var(--bg-deep);
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(108,43,217,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,43,217,.06) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(108,43,217,.25), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255,77,77,.18), transparent 35%);
  pointer-events: none;
  z-index: 0;
}
.noise {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

header {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 24px;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(108,43,217,.2);
}
.logo {
  font-family: 'Major Mono Display', monospace;
  font-size: 22px; color: var(--ink); text-decoration: none;
  letter-spacing: 2px;
}
.logo span { color: var(--plasma); }
.logo em {
  font-style: normal; color: var(--laser);
  font-size: 14px; margin-left: 6px;
  vertical-align: middle;
}
.lang-switch {
  display: flex; gap: 4px;
  margin-left: auto;
}
.lang-btn {
  background: transparent;
  border: 1px solid var(--ink-dim);
  color: var(--ink-dim);
  font-family: 'VT323', monospace;
  font-size: 16px; letter-spacing: 1px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all .2s;
}
.lang-btn:hover { background: var(--laser); color: var(--bg-deep); border-color: var(--laser); }
.dashboard .lang-switch { margin-left: 16px; margin-right: 0; }

.alpha-badge {
  font-family: 'VT323', monospace;
  color: var(--warn); border: 1px solid var(--warn);
  padding: 4px 10px; font-size: 14px; border-radius: 2px;
  animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .5; } }
.user { display: flex; gap: 12px; align-items: center; }
.user span { font-family: 'VT323', monospace; font-size: 18px; color: var(--laser); }

main {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
  padding: 64px 32px;
}

/* HERO */
.hero { margin-bottom: 100px; }
.coord {
  font-family: 'VT323', monospace; color: var(--cyan);
  font-size: 14px; margin-bottom: 24px; letter-spacing: 1px;
}
.coord::before { content: '◆ '; }
h1 {
  font-family: 'Major Mono Display', monospace;
  font-size: clamp(48px, 9vw, 110px);
  font-weight: 400; line-height: .95; letter-spacing: -2px;
  margin-bottom: 32px; text-transform: lowercase;
}
.ink-plasma { color: var(--plasma); font-style: italic; }
.ink-void { color: var(--void); -webkit-text-stroke: 1px var(--void); color: transparent; }
.ink-laser { color: var(--laser); }
.glitch { display: inline-block; position: relative; }
.lead {
  font-size: clamp(16px, 2vw, 22px);
  color: var(--ink-dim);
  max-width: 640px; margin-bottom: 32px;
}
.lead strong { color: var(--ink); }
.lead-sub {
  font-family: 'VT323', monospace;
  font-size: 16px; color: var(--warn); margin-top: 32px;
}
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: 'VT323', monospace; font-size: 20px; letter-spacing: 1px;
  cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn:hover { background: var(--ink); color: var(--bg-deep); transform: translateX(2px); }
.btn.primary { background: var(--plasma); border-color: var(--plasma); color: var(--bg-deep); font-weight: bold; }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.ghost { border-color: var(--ink-dim); color: var(--ink-dim); }
.btn.ghost:hover { background: var(--ink-dim); color: var(--bg-deep); }
.btn.small { padding: 8px 16px; font-size: 16px; }
.btn.danger { border-color: var(--plasma); color: var(--plasma); }
.btn.danger:hover { background: var(--plasma); color: var(--bg-deep); }

/* FEATURES */
.features { margin-bottom: 100px; }
h2 {
  font-family: 'Major Mono Display', monospace;
  font-size: 36px; text-transform: lowercase; letter-spacing: -1px;
  margin-bottom: 32px;
}
h2::before { content: '── '; color: var(--cyan); }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg-card);
  border: 1px solid rgba(108,43,217,.3);
  padding: 24px; transition: all .3s;
}
.card:hover { border-color: var(--void); transform: translateY(-2px); }
.card .num {
  font-family: 'VT323', monospace; color: var(--plasma);
  font-size: 14px; margin-bottom: 12px;
}
.card h3 {
  font-family: 'Major Mono Display', monospace; font-size: 22px;
  margin-bottom: 12px; text-transform: lowercase; letter-spacing: -.5px;
}
.card p { color: var(--ink-dim); font-size: 14px; }
.card code {
  background: var(--bg-mid); padding: 2px 6px; border-radius: 2px;
  font-family: 'VT323', monospace; color: var(--laser);
}

/* HOW */
.how { margin-bottom: 100px; }
.how ol {
  list-style: none; counter-reset: step;
  display: grid; gap: 16px;
}
.how li {
  counter-increment: step;
  background: var(--bg-card);
  border-left: 3px solid var(--cyan);
  padding: 16px 20px;
  font-size: 15px;
}
.how li::before {
  content: counter(step, decimal-leading-zero);
  font-family: 'VT323', monospace; color: var(--cyan);
  font-size: 14px; margin-right: 12px;
}
.how code { background: var(--bg-mid); padding: 2px 6px; color: var(--laser); }

/* RELEASES TIMELINE */
.releases { margin-bottom: 100px; }
.timeline {
  display: flex; flex-direction: column; gap: 24px;
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute; top: 8px; bottom: 8px; left: 7px;
  width: 2px; background: var(--void);
}
.release {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(108,43,217,.3);
  padding: 20px 24px;
}
.release::before {
  content: '';
  position: absolute; left: -22px; top: 24px;
  width: 12px; height: 12px;
  border-radius: 50%; background: var(--laser);
  box-shadow: 0 0 0 4px var(--bg-deep);
}
.release.upcoming::before { background: var(--ink-dim); }
.rel-date {
  font-family: 'VT323', monospace; color: var(--cyan);
  font-size: 16px; letter-spacing: 1px;
  margin-bottom: 8px;
}
.rel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rel-version {
  font-family: 'Major Mono Display', monospace; font-size: 22px;
  color: var(--ink); letter-spacing: -.5px;
}
.rel-tag {
  font-family: 'VT323', monospace; font-size: 14px;
  padding: 2px 10px; border: 1px solid var(--laser);
  color: var(--laser); border-radius: 2px;
}
.release.upcoming .rel-tag {
  border-color: var(--warn); color: var(--warn);
}
.rel-content p { color: var(--ink-dim); margin-bottom: 8px; }
.rel-content ul {
  list-style: none; padding: 0; margin: 8px 0 16px;
  font-family: 'VT323', monospace; font-size: 16px;
}
.rel-content li {
  padding: 4px 0; color: var(--ink);
}
.rel-content li::before {
  content: '◇ '; color: var(--plasma); margin-right: 6px;
}

/* STATUS */
.status { margin-bottom: 60px; }
.status-line {
  font-family: 'VT323', monospace; font-size: 18px;
  padding: 12px 16px; background: var(--bg-card);
  border-left: 3px solid var(--ink-dim);
}
.status-line.ok { border-left-color: var(--laser); color: var(--laser); }
.status-line.ko { border-left-color: var(--plasma); color: var(--plasma); }

/* FOOTER */
footer {
  position: relative; z-index: 2;
  border-top: 1px solid rgba(108,43,217,.2);
  padding: 48px 32px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 32px; max-width: 1100px; margin: 0 auto;
}
footer h4 {
  color: var(--cyan); font-size: 13px; letter-spacing: 2px;
  margin-bottom: 12px; text-transform: uppercase;
}
footer ul { list-style: none; }
footer li { margin-bottom: 6px; }
footer a { color: var(--ink-dim); text-decoration: none; font-family: 'VT323', monospace; font-size: 17px; }
footer a:hover { color: var(--laser); }
.footer-logo {
  font-family: 'Major Mono Display', monospace; font-size: 22px;
  color: var(--ink); margin-bottom: 8px; letter-spacing: 2px;
}
.footer-logo span { color: var(--plasma); }
.copy {
  grid-column: 1 / -1; border-top: 1px solid rgba(108,43,217,.1);
  padding-top: 16px; margin-top: 16px;
  color: var(--ink-dim); font-size: 13px; font-family: 'VT323', monospace;
}

/* DASHBOARD */
body.dashboard main.dash {
  padding-top: 32px;
}
body.dashboard h1 {
  font-size: clamp(32px, 5vw, 56px); margin-bottom: 24px;
}
.actions { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }

.world-card {
  background: var(--bg-card);
  border: 1px solid rgba(108,43,217,.3);
  padding: 24px 28px;
  margin-bottom: 16px;
  display: grid; grid-template-columns: 1fr auto; gap: 20px;
  align-items: center;
}
.world-card h3 {
  font-family: 'Major Mono Display', monospace; font-size: 28px;
  text-transform: lowercase; letter-spacing: -.5px; margin-bottom: 10px;
}
.world-card .meta {
  color: var(--ink-dim);
  font-size: 17px;
  font-family: 'VT323', monospace;
  line-height: 1.7;
}
.world-card .meta code {
  background: var(--bg-mid); padding: 2px 8px;
  color: var(--laser); font-size: 16px;
}
.world-card .actions-row { display: flex; gap: 10px; }
.world-card .badge {
  display: inline-block; padding: 4px 12px; font-size: 14px;
  font-family: 'VT323', monospace; letter-spacing: 1px;
  border-radius: 2px; margin-right: 8px;
}
.badge.libero { background: var(--laser); color: var(--bg-deep); }
.badge.locked { background: var(--plasma); color: var(--ink); }
.badge.nuovo  { background: var(--cyan); color: var(--bg-deep); }
.badge.role-owner { background: var(--warn); color: var(--bg-deep); }
.badge.role-admin { background: var(--void); color: var(--ink); }
.badge.role-member { background: var(--bg-mid); color: var(--ink-dim); border: 1px solid var(--ink-dim); }
.badge.pending {
  background: var(--warn); color: var(--bg-deep);
  animation: blink 1.5s ease-in-out infinite;
}

/* MODALS */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(5,2,8,.85); z-index: 100;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--void);
  padding: 32px;
  max-width: 500px; width: 100%;
}
.modal-content.wider { max-width: 800px; }
.modal-content h2 {
  font-size: 24px; margin-bottom: 24px;
}
.modal-content h3 {
  font-family: 'VT323', monospace; font-size: 18px;
  color: var(--cyan); margin: 16px 0 8px; letter-spacing: 1px;
}
.modal-content label {
  display: block; margin-bottom: 16px;
  font-family: 'VT323', monospace; color: var(--ink-dim); font-size: 16px;
}
.modal-content label small { color: var(--warn); font-size: 13px; }
.modal-content input[type="text"] {
  display: block; width: 100%; margin-top: 4px;
  padding: 10px 12px; font-size: 15px;
  background: var(--bg-mid); color: var(--ink);
  border: 1px solid rgba(108,43,217,.3);
  font-family: 'Outfit', sans-serif;
}
.modal-content input[type="text"]:focus { border-color: var(--laser); outline: none; }
.preview {
  font-family: 'VT323', monospace; font-size: 15px;
  color: var(--laser); padding: 8px 12px;
  background: var(--bg-mid); margin-bottom: 16px;
}
.info { color: var(--ink-dim); font-size: 13px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }

.member-row, .pending-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(108,43,217,.1);
}
.member-row img, .pending-row img { width: 28px; height: 28px; border-radius: 50%; }
.member-row .name, .pending-row .name { flex: 1; font-family: 'VT323', monospace; font-size: 17px; }
.pending-row .name small { display: block; color: var(--ink-dim); font-size: 13px; }

/* Responsive */
@media (max-width: 700px) {
  header { padding: 12px 16px; flex-wrap: wrap; }
  main { padding: 32px 16px; }
  footer { grid-template-columns: 1fr; padding: 32px 16px; }
  .world-card { grid-template-columns: 1fr; }
  .world-card .actions-row { justify-content: flex-end; }
}

::selection { background: var(--plasma); color: var(--bg-deep); }
