/* ─── EdenGlot Futuristic FX ────────────────────────────────────────────────
   Shared cinematic components. Link after themes.css on every page.        */

/* ── Ambient background ─────────────────────────────────────────────────── */
.eden-bg::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 65% 40% at 15% -5%,  rgba(13,32,96,.55)  0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 105%, rgba(27,90,186,.28) 0%, transparent 55%),
    radial-gradient(ellipse 40% 28% at 50% 52%,  rgba(61,184,255,.04) 0%, transparent 70%);
}
/* Lift all direct body children above the z-index:0 fixed overlay.
   Only sets position when the element isn't already positioned so sticky/fixed navs are unaffected. */
.eden-bg > *:not([style*="position"]) { position: relative; z-index: 1; }
.eden-bg > * { isolation: isolate; }

/* ── Logo orb ───────────────────────────────────────────────────────────── */
.eden-orb {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 8px rgba(61,184,255,.07),
    0 0 32px rgba(61,184,255,.2),
    0 8px 24px rgba(13,32,96,.5);
  animation: eden-orb-breathe 3s ease-in-out infinite;
}
.eden-orb img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.eden-orb.sm { width: 56px; height: 56px; }
.eden-orb.sm img { width: 32px; height: 32px; border-radius: 6px; }
.eden-orb.xs { width: 36px; height: 36px; box-shadow: none; animation: none;
  background: var(--brand-gradient); border-radius: 50%; }
.eden-orb.xs img { width: 20px; height: 20px; border-radius: 4px; }

@keyframes eden-orb-breathe {
  0%,100% { box-shadow: 0 0 0 8px rgba(61,184,255,.07), 0 0 32px rgba(61,184,255,.2), 0 8px 24px rgba(13,32,96,.5); }
  50%      { box-shadow: 0 0 0 14px rgba(61,184,255,.04), 0 0 52px rgba(61,184,255,.3), 0 8px 32px rgba(13,32,96,.6); }
}

/* ── App name gradient text ─────────────────────────────────────────────── */
.eden-name {
  background: var(--brand-gradient-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass panel ─────────────────────────────────────────────────────────── */
.eden-glass {
  background: rgba(17, 20, 24, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(61, 184, 255, 0.12);
  border-radius: 20px;
}
.eden-glass-strong {
  background: rgba(13, 32, 96, 0.28);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(61, 184, 255, 0.22);
  border-radius: 20px;
}

/* ── Brand gradient button ───────────────────────────────────────────────── */
.btn-brand {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--brand-gradient);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #fff; border: none; border-radius: 12px;
  padding: 13px 20px; font-size: .92rem; font-weight: 700;
  letter-spacing: -.01em; cursor: pointer; font-family: inherit;
  box-shadow: 0 0 0 1px rgba(61,184,255,.2), 0 8px 24px rgba(13,32,96,.45);
  transition: background-position 600ms linear, box-shadow 200ms ease, transform 150ms ease;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn-brand::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
  pointer-events: none;
}
.btn-brand:hover {
  background-position: 100% 50%;
  box-shadow: 0 0 0 1px rgba(61,184,255,.4), 0 12px 32px rgba(61,184,255,.22);
}
.btn-brand:active { transform: scale(.97); }
.btn-brand:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }
.btn-brand.full { width: 100%; }

/* ── Outline brand button ───────────────────────────────────────────────── */
.btn-brand-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent;
  border: 1px solid rgba(61,184,255,.35);
  color: var(--brand-sky); border-radius: 12px;
  padding: 12px 20px; font-size: .9rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 200ms, border-color 200ms, box-shadow 200ms, transform 150ms;
  white-space: nowrap;
}
.btn-brand-outline:hover {
  background: rgba(13,32,96,.45);
  border-color: rgba(61,184,255,.6);
  box-shadow: 0 0 0 3px rgba(61,184,255,.08);
}
.btn-brand-outline:active { transform: scale(.97); }
.btn-brand-outline.full { width: 100%; }

/* ── Glass input fields ─────────────────────────────────────────────────── */
.eden-input {
  background: rgba(17,20,24,.6);
  border: 1px solid rgba(61,184,255,.15);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px; font-size: .9rem; font-family: inherit; width: 100%;
  backdrop-filter: blur(8px);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.eden-input::placeholder { color: var(--text-3); }
.eden-input:focus {
  outline: none;
  border-color: rgba(61,184,255,.5);
  box-shadow: 0 0 0 3px rgba(61,184,255,.1), inset 0 0 0 1px rgba(61,184,255,.08);
}

/* ── Brand waveform ─────────────────────────────────────────────────────── */
.eden-wave {
  display: flex; align-items: center; gap: 3px; height: 28px;
}
.eden-wave-bar {
  width: 3px; border-radius: 2px; flex-shrink: 0;
  background: var(--brand-gradient);
  animation: eden-wave-anim 1.2s ease-in-out infinite;
}
.eden-wave-bar:nth-child(1) { animation-duration: 1.1s; animation-delay: 0s; }
.eden-wave-bar:nth-child(2) { animation-duration: 0.9s; animation-delay: .14s; }
.eden-wave-bar:nth-child(3) { animation-duration: 1.3s; animation-delay: .28s; }
.eden-wave-bar:nth-child(4) { animation-duration: 1.0s; animation-delay: .42s; }
.eden-wave-bar:nth-child(5) { animation-duration: 1.2s; animation-delay: .56s; }

@keyframes eden-wave-anim {
  0%,100% { height: 4px;  opacity: .35; }
  50%      { height: 20px; opacity: 1;   }
}

.eden-wave.silent .eden-wave-bar {
  height: 3px !important; animation: none; opacity: .2;
}

/* ── Live status dot ─────────────────────────────────────────────────────── */
.eden-live-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-sky);
  box-shadow: 0 0 0 0 rgba(61,184,255,.5);
  animation: eden-live-pulse 2s ease-out infinite;
}
.eden-live-dot.offline { background: var(--red); animation: none; box-shadow: none; }

@keyframes eden-live-pulse {
  0%  { box-shadow: 0 0 0 0 rgba(61,184,255,.5); }
  70% { box-shadow: 0 0 0 8px rgba(61,184,255,0); }
  100%{ box-shadow: 0 0 0 0 rgba(61,184,255,0); }
}

/* ── Pro tier badge ─────────────────────────────────────────────────────── */
.eden-pro-badge {
  display: inline-flex; align-items: center;
  background: var(--brand-gradient);
  color: #fff;
  font-size: .6rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 20px; flex-shrink: 0;
}

/* ── Back link ──────────────────────────────────────────────────────────── */
.eden-back {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-3); font-size: .82rem; text-decoration: none;
  padding: 6px 0; transition: color .2s;
  position: relative;
}
.eden-back:hover { color: var(--brand-sky); }

/* ── Card entrance animation ─────────────────────────────────────────────── */
.eden-fade-up {
  animation: eden-fade-up .38s cubic-bezier(.22,1,.36,1) both;
}
.eden-fade-up:nth-child(2) { animation-delay: .06s; }
.eden-fade-up:nth-child(3) { animation-delay: .12s; }
.eden-fade-up:nth-child(4) { animation-delay: .18s; }

@keyframes eden-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mode cards (home dashboard) ─────────────────────────────────────────── */
.eden-mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none; color: var(--text);
}
.eden-mode-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--brand-gradient);
  opacity: 0; transition: opacity 200ms;
}
.eden-mode-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.025) 0%, transparent 55%);
  pointer-events: none;
}
.eden-mode-card:hover::before { opacity: 1; }
.eden-mode-card:hover {
  border-color: rgba(61,184,255,.25);
  box-shadow: 0 8px 32px rgba(13,32,96,.4), 0 0 0 1px rgba(61,184,255,.1);
}
.eden-mode-card:active { transform: scale(.985); }
.eden-mode-card.locked { opacity: .65; }
.eden-mode-card.locked:hover { transform: none; box-shadow: none; border-color: var(--border); }
.eden-mode-card.locked:hover::before { opacity: 0; }

.eden-mode-icon {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  background: rgba(13,32,96,.6);
  border: 1px solid rgba(61,184,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: inset 0 1px 0 rgba(61,184,255,.1);
}

.eden-mode-title {
  font-size: .92rem; font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: center; gap: 7px;
  color: var(--brand-sky);
}
.eden-mode-desc { color: var(--text-2); font-size: .79rem; line-height: 1.55; }

.eden-mode-arrow {
  flex-shrink: 0; font-size: 1.1rem;
  background: var(--brand-gradient-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0; transform: translateX(-4px);
  transition: opacity 200ms, transform 200ms;
}
.eden-mode-card:hover .eden-mode-arrow { opacity: 1; transform: translateX(0); }

/* ── Nav brand underline ─────────────────────────────────────────────────── */
.eden-nav-link {
  padding: 5px 12px; border-radius: 8px; border: none;
  cursor: pointer; font-family: inherit; font-size: .82rem; font-weight: 500;
  text-decoration: none; background: transparent; color: var(--text-2);
  transition: color .15s; position: relative; display: inline-flex; align-items: center;
}
.eden-nav-link::after {
  content: ''; position: absolute; bottom: -1px; left: 12px; right: 12px; height: 2px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transition: transform 200ms cubic-bezier(.22,1,.36,1);
}
.eden-nav-link:hover { color: var(--text); }
.eden-nav-link.active { color: var(--brand-sky); font-weight: 700; }
.eden-nav-link.active::after { transform: scaleX(1); }

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.eden-tab-bar {
  display: flex; gap: 0;
  background: rgba(17,20,24,.6); border: 1px solid rgba(61,184,255,.1);
  border-radius: 12px; padding: 4px;
}
.eden-tab {
  flex: 1; padding: 9px 10px; border-radius: 8px;
  font-size: .8rem; font-weight: 600; cursor: pointer; border: none;
  background: transparent; color: var(--text-2); font-family: inherit;
  transition: background .15s, color .15s, box-shadow .15s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.eden-tab.active {
  background: rgba(13,32,96,.7);
  color: var(--brand-sky);
  box-shadow: 0 1px 4px rgba(0,0,0,.3), inset 0 0 0 1px rgba(61,184,255,.15);
}

/* ── Mic orb (broadcast/mic pages) ──────────────────────────────────────── */
.eden-mic-orb {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--brand-gradient);
  background-size: 200% 200%; background-position: 0% 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  box-shadow: 0 0 0 0 rgba(61,184,255,.4), 0 10px 32px rgba(13,32,96,.55);
  transition: background-position 600ms, transform 150ms;
  -webkit-tap-highlight-color: transparent;
}
.eden-mic-orb.recording {
  background-position: 100% 50%;
  animation: eden-mic-ripple 1.8s ease-out infinite;
}
.eden-mic-orb:active { transform: scale(.93); }

@keyframes eden-mic-ripple {
  0%  { box-shadow: 0 0 0 0 rgba(61,184,255,.45), 0 10px 32px rgba(13,32,96,.55); }
  60% { box-shadow: 0 0 0 22px rgba(61,184,255,0), 0 10px 32px rgba(13,32,96,.55); }
  100%{ box-shadow: 0 0 0 0 rgba(61,184,255,0),   0 10px 32px rgba(13,32,96,.55); }
}

/* ── Level meter ─────────────────────────────────────────────────────────── */
.eden-level-bar {
  height: 6px; background: var(--surface-2); border-radius: 3px;
  overflow: hidden; border: 1px solid var(--border);
}
.eden-level-fill {
  height: 100%; width: 0%; border-radius: 3px;
  background: var(--brand-gradient);
  transition: width .08s;
}

/* ── QR glass section ───────────────────────────────────────────────────── */
.eden-qr-section {
  background: rgba(13,32,96,.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(61,184,255,.18);
  border-radius: 20px; padding: 22px;
  display: flex; gap: 20px; align-items: flex-start;
}
.eden-qr-img {
  width: 108px; height: 108px; border-radius: 10px;
  image-rendering: pixelated; flex-shrink: 0;
  background: #fff; padding: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.eden-spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: eden-spin .7s linear infinite; vertical-align: middle; flex-shrink: 0;
}
@keyframes eden-spin { to { transform: rotate(360deg); } }

/* ── Pop modal ───────────────────────────────────────────────────────────── */
.eden-modal-pop {
  animation: eden-pop .22s cubic-bezier(.32,1.2,.6,1);
}
@keyframes eden-pop {
  from { opacity: 0; transform: scale(.88) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Section label ───────────────────────────────────────────────────────── */
.eden-section-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3); margin-bottom: 12px;
}

/* ── Swap button ─────────────────────────────────────────────────────────── */
.eden-swap-btn {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(61,184,255,.3);
  background: rgba(13,32,96,.4);
  color: var(--brand-sky); cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: transform 350ms cubic-bezier(.32,1.2,.6,1), box-shadow 200ms, background 200ms;
}
.eden-swap-btn:hover {
  transform: rotate(180deg);
  background: rgba(13,32,96,.7);
  box-shadow: 0 0 0 3px rgba(61,184,255,.12);
}

/* ── Chat bubbles ────────────────────────────────────────────────────────── */
.eden-bubble-a {
  align-self: flex-start; max-width: 84%;
  background: rgba(13,32,96,.52);
  border: 1px solid rgba(27,90,186,.4);
  border-left: 2px solid var(--brand-sky);
  border-radius: 18px 18px 18px 4px;
  padding: 13px 16px;
  animation: eden-bubble-in-l .22s ease both;
}
.eden-bubble-b {
  align-self: flex-end; max-width: 84%;
  background: rgba(17,20,24,.72);
  border: 1px solid rgba(61,184,255,.2);
  border-right: 2px solid rgba(61,184,255,.5);
  border-radius: 18px 18px 4px 18px;
  padding: 13px 16px; text-align: right;
  animation: eden-bubble-in-r .22s ease both;
}
@keyframes eden-bubble-in-l { from { opacity:0; transform: translateX(-10px); } to { opacity:1; transform:none; } }
@keyframes eden-bubble-in-r { from { opacity:0; transform: translateX(10px); }  to { opacity:1; transform:none; } }

.eden-bubble-who {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--brand-sky); margin-bottom: 5px;
}
.eden-bubble-b .eden-bubble-who { color: var(--text-2); }
.eden-bubble-original   { font-size: .9rem; color: var(--text); line-height: 1.5; }
.eden-bubble-translated { font-size: .8rem; color: var(--text-2); margin-top: 5px; font-style: italic; line-height: 1.45; }
.eden-bubble-time       { font-size: .67rem; color: var(--text-3); margin-top: 7px; }

/* ── Error banner ────────────────────────────────────────────────────────── */
.eden-error {
  background: rgba(42,15,15,.8); border: 1px solid rgba(240,82,82,.3);
  border-radius: 10px; color: var(--red); font-size: .84rem;
  padding: 11px 15px; line-height: 1.5;
}
.eden-info {
  background: rgba(7,20,40,.8); border: 1px solid rgba(61,184,255,.2);
  border-radius: 10px; color: var(--brand-sky); font-size: .84rem;
  padding: 11px 15px; line-height: 1.5;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.eden-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(13,32,96,.92); backdrop-filter: blur(12px);
  color: var(--brand-sky); border: 1px solid rgba(61,184,255,.25);
  padding: 10px 20px; border-radius: 24px; font-size: .84rem; font-weight: 600;
  opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 9999;
  white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.eden-toast.show { opacity: 1; }
