/* Modern futuristic design system — glowing space + glassmorphism */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-void:      #050507;
  --bg-deep:      #0b0b0d;
  --bg-panel:     #111113;
  --bg-panel-2:   #17171a;
  --bg-hover:     #222226;

  --line:         rgba(255, 255, 255, 0.08);
  --line-strong:  rgba(255, 255, 255, 0.18);

  --text-hi:      #ffffff;
  --text-mid:     #d4d4d8;
  --text-low:     #a1a1aa;

  --accent:       #ffffff;
  --accent-hi:    #ffffff;
  --pink:         #e4e4e7;
  --pink-hi:      #f4f4f5;

  --success:      #4ade80;
  --danger:       #f87171;
  --warn:         #fbbf24;

  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    18px;

  --shadow-glow:  0 0 20px rgba(255, 255, 255, 0.08);
  --shadow-card:  0 8px 30px rgba(0, 0, 0, 0.6);

  --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-void);
  color: var(--text-hi);
  font-family: var(--font-body);
  min-height: 100vh;
}

body {
  background-color: #040405;
  background-image:
    radial-gradient(circle 900px at 50% -200px, rgba(255, 255, 255, 0.22), transparent 75%),
    radial-gradient(circle 600px at 50% 120%, rgba(255, 255, 255, 0.08), transparent 75%),
    linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* petal ambience */
.petal-field {
  display: none !important;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel-2);
  color: var(--text-hi);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--pink));
  border: none;
  color: #000000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.22);
  transform: translateY(-2px) scale(1.02);
}

.btn-icon {
  width: 46px;
  height: 46px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}
.btn-icon.lg {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(228, 228, 231, 0.95));
  color: #000000;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.12);
}
.btn-icon.lg:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.22);
}

.btn-danger { border-color: rgba(248, 113, 113, 0.3); }
.btn-danger:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: var(--danger);
  box-shadow: 0 4px 15px rgba(248, 113, 113, 0.2);
}

/* cards / panels */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-low);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.02em; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mid);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.badge.live { background: rgba(74, 222, 128, 0.1); color: var(--success); border-color: rgba(74, 222, 128, 0.2); }
.badge.live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* toast */
#toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-panel-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  font-weight: 600;
  animation: toast-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 320px;
  backdrop-filter: blur(10px);
}
.toast.error { border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }
.toast.success { border-color: rgba(74, 222, 128, 0.4); color: var(--success); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(15px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Custom styled inputs */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  border: none;
}
input[type=range]::-webkit-slider-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--text-hi);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -5px;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  transition: transform 0.1s ease;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
