/* =========================================
   NOXIASOUNDS — Global Styles
   Dark Purple Night Sky + Glassmorphism
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Outfit:wght@200;300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --night-deep:     #0a0514;
  --night-mid:      #110a2a;
  --night-warm:     #1a0f35;
  --purple-dark:    #2a1155;
  --purple-mid:     #4a1fa8;
  --purple-warm:    #7c3aed;
  --purple-glow:    #9d5cff;
  --rose-warm:      #c084fc;
  --gold-warm:      #f5c842;
  --star-white:     rgba(255,255,255,0.9);

  --glass-bg:       rgba(255,255,255,0.04);
  --glass-bg-hover: rgba(255,255,255,0.08);
  --glass-border:   rgba(255,255,255,0.10);
  --glass-border-strong: rgba(157,92,255,0.35);
  --glass-shadow:   0 8px 32px rgba(0,0,0,0.45);
  --glass-blur:     blur(18px);

  --text-primary:   #f0e8ff;
  --text-secondary: rgba(220,200,255,0.7);
  --text-muted:     rgba(180,160,220,0.5);

  --font-display:   'Cormorant Garamond', serif;
  --font-body:      'Outfit', sans-serif;

  --radius-sm:  12px;
  --radius-md:  20px;
  --radius-lg:  32px;
  --radius-xl:  48px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--night-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Night Sky Background ── */
.night-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,58,237,0.30) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(74,31,168,0.25) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(42,17,85,0.40) 0%, transparent 60%),
    linear-gradient(165deg, #0e0720 0%, #0a0514 40%, #12062e 70%, #0a0514 100%);
  pointer-events: none;
}

/* nebula blobs */
.night-bg::before {
  content: '';
  position: absolute;
  top: 15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 420px;
  max-height: 420px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: nebulaDrift 18s ease-in-out infinite alternate;
}

.night-bg::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -5%;
  width: 45vw;
  height: 45vw;
  max-width: 350px;
  max-height: 350px;
  background: radial-gradient(circle, rgba(192,132,252,0.10) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  animation: nebulaDrift 22s ease-in-out infinite alternate-reverse;
}

@keyframes nebulaDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, -30px) scale(1.08); }
}

/* ── Star Canvas (JS-driven) ── */
#star-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Page Layer ── */
.page-layer {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

/* ── Glassmorphism Card ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}

.glass-strong {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border-strong);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ── Buttons ── */
.btn-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-glow:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--purple-warm) 0%, var(--purple-mid) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 16px 44px;
  box-shadow: 0 0 24px rgba(124,58,237,0.50), 0 4px 16px rgba(0,0,0,0.4);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 40px rgba(124,58,237,0.75), 0 8px 24px rgba(0,0,0,0.5);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: var(--radius-xl);
  padding: 14px 36px;
}

.btn-ghost:hover {
  border-color: var(--glass-border-strong);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(157,92,255,0.20);
}

/* ── Typography ── */
.display-title {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.body-text {
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ── Floating orb decoration ── */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
}

.orb-1 {
  width: 6px; height: 6px;
  background: var(--rose-warm);
  box-shadow: 0 0 12px 4px rgba(192,132,252,0.6);
  animation: orbFloat 6s ease-in-out infinite;
}

.orb-2 {
  width: 4px; height: 4px;
  background: var(--gold-warm);
  box-shadow: 0 0 10px 3px rgba(245,200,66,0.5);
  animation: orbFloat 9s ease-in-out infinite reverse;
}

.orb-3 {
  width: 5px; height: 5px;
  background: #a5f3fc;
  box-shadow: 0 0 10px 3px rgba(165,243,252,0.5);
  animation: orbFloat 7s ease-in-out infinite 2s;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.8; }
  33%  { transform: translateY(-18px) translateX(8px); opacity: 1; }
  66%  { transform: translateY(-8px) translateX(-12px); opacity: 0.6; }
}

/* ── Shooting star ── */
.shooting-star {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0) 100%);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  animation: shoot 3.5s ease-out infinite;
}

@keyframes shoot {
  0%   { opacity: 0; transform: translateX(0) translateY(0) rotate(-30deg); width: 0; }
  5%   { opacity: 1; }
  30%  { opacity: 0.8; width: 120px; }
  60%  { opacity: 0; transform: translateX(200px) translateY(120px) rotate(-30deg); width: 60px; }
  100% { opacity: 0; }
}

/* ── Utility ── */
.w-100 { width: 100%; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--purple-mid); border-radius: 4px; }


/* ══════════════════════════════════════════
   GLOBAL SMOOTH TRANSITIONS
══════════════════════════════════════════ */

/* View transitions */
.view-content {
  animation: viewIn 0.42s cubic-bezier(0.22,1,0.36,1) both;
}

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

/* All interactive elements get smooth transitions */
button, a, input[type="range"] {
  transition-duration: 0.22s;
  transition-timing-function: cubic-bezier(0.22,1,0.36,1);
}

/* Page-level transition when router swaps views */
#main-content {
  transition: opacity 0.18s ease;
}

/* ══════════════════════════════════════════
   MOBILE FORM FONT SIZE FIX
   iOS zooms in when input font-size < 16px.
   Setting 16px on all inputs prevents this.
══════════════════════════════════════════ */

@media (max-width: 768px) {
  input,
  textarea,
  select,
  .co-input,
  .modal-input,
  #pl-name-input,
  #pl-edit-input,
  #ep-name,
  #ep-email,
  #cp-current,
  #cp-new,
  #cp-confirm,
  #da-password {
    font-size: 16px !important;
    /* 16px is the iOS threshold — below this Safari auto-zooms */
  }
}