/* Mari Duel! — shared futuristic space theme */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Exo+2:wght@400;500;600;700;800&display=swap');

:root {
  --void: #04050d;
  --deep: #0a0f2b;
  --deep-2: #121a45;
  --panel: rgba(14, 20, 56, .62);
  --panel-solid: #0f1640;
  --line: rgba(120, 200, 255, .22);
  --line-strong: rgba(120, 220, 255, .5);
  --text: #e8f1ff;
  --muted: #9aaad0;
  --cyan: #3ef2ff;
  --magenta: #ff3ec8;
  --violet: #9d7bff;
  --lime: #b6ff3e;
  --amber: #ffb84d;
  --red: #ff4d6d;
  --green: #3dffa8;
  --accent: var(--cyan);
  --radius: 18px;
  --font-display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Exo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 60% at 15% 110%, rgba(255, 62, 200, .22), transparent 60%),
    radial-gradient(ellipse 70% 60% at 90% -10%, rgba(62, 242, 255, .18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 60% 60%, rgba(157, 123, 255, .14), transparent 70%),
    linear-gradient(180deg, var(--void) 0%, var(--deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; }

a { color: var(--cyan); }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: .02em; }

/* Neon logo wordmark */
.logo {
  font-family: var(--font-display); font-weight: 900; margin: 0; line-height: 1; letter-spacing: .04em;
  background: linear-gradient(92deg, var(--cyan) 0%, #fff 45%, var(--magenta) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(62, 242, 255, .35));
  text-decoration: none;
}
.logo .bang { color: var(--magenta); -webkit-text-fill-color: var(--magenta); }

/* Glass panel */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 20px 50px rgba(0, 0, 0, .35);
}

/* Buttons */
.btn {
  --c: var(--accent);
  appearance: none; border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); cursor: pointer;
  font: 700 15px/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: #04050d; background: var(--c);
  padding: 13px 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent), inset 0 -3px 0 rgba(0, 0, 0, .2);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 0 34px color-mix(in srgb, var(--c) 60%, transparent), inset 0 -3px 0 rgba(0, 0, 0, .2); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; filter: grayscale(.5); }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .09); }
.btn.small { padding: 9px 14px; font-size: 12px; }
.btn.big { padding: 18px 34px; font-size: 20px; }
.btn.icon { padding: 9px; width: 38px; height: 38px; font-size: 16px; }
.btn.magenta { --c: var(--magenta); color: #fff; }
.btn.lime { --c: var(--lime); }
.btn.danger { --c: var(--red); color: #fff; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* Forms */
label.field { display: grid; gap: 6px; font-weight: 700; font-size: 14px; color: var(--muted); }
input, select, textarea {
  font: 600 16px var(--font-body); color: var(--text); width: 100%;
  background: rgba(4, 6, 20, .6); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(62, 242, 255, .18); }
textarea { font: 500 14px/1.45 ui-monospace, 'Cascadia Mono', Consolas, monospace; resize: vertical; min-height: 140px; }
select option { background: var(--panel-solid); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font: 700 12px var(--font-display); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .05);
}

.muted { color: var(--muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: var(--panel-solid); border: 1px solid var(--cyan); color: var(--text);
  padding: 12px 20px; border-radius: 999px; font-weight: 700; max-width: calc(100vw - 32px); text-align: center;
  box-shadow: 0 0 30px rgba(62, 242, 255, .3);
}

@keyframes pop-in { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); } 50% { box-shadow: 0 0 46px color-mix(in srgb, var(--c) 80%, transparent); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

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