/* ============================================================
   PLANETS ENHANCED — Additive UI Module v1.0
   All rules are NEW. No existing class/ID is overridden.
   ============================================================ */

/* ─── TOP NAVBAR ─────────────────────────────────────────── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 250;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
  background: rgba(1, 8, 18, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 200, 255, 0.12);
  font-family: 'Rajdhani', sans-serif;
}

.nav-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.55);
  flex-shrink: 0;
  margin-right: 32px;
}

.nav-logo span {
  color: #00e5ff;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: rgba(180, 200, 220, 0.65);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-transform: uppercase;
  display: block;
}

.nav-link:hover,
.nav-link.active {
  color: #00e5ff;
  border-color: rgba(0, 229, 255, 0.22);
  background: rgba(0, 229, 255, 0.07);
}

.nav-spacer { flex: 1; }

.nav-avatar {
  flex-shrink: 0;
  margin-left: 16px;
  cursor: pointer;
}

.avatar-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.avatar-ring:hover {
  border-color: rgba(0, 229, 255, 0.85);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e5ff 0%, #7b68ee 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
}

/* Push fixed header down to sit below navbar */
.site-header {
  top: 48px !important;
}

/* ─── LAST VISIT BANNER ──────────────────────────────────── */
.ep-last-visit {
  display: none;
  padding: 5px 10px;
  background: rgba(0, 229, 255, 0.07);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 5px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  color: rgba(160, 210, 255, 0.8);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.ep-last-visit.visible { display: block; }

/* ─── EMOTION BADGE ──────────────────────────────────────── */
.ep-panel-meta {
  padding: 6px 0 4px;
  flex-shrink: 0;
}

.ep-emotion-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ep-emotion-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ep-primary, #00e5ff);
  flex-shrink: 0;
  animation: ep-pulse 2s ease-in-out infinite;
}

@keyframes ep-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.75); }
}

#ep-emotion-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--ep-primary, #00e5ff);
  text-transform: uppercase;
  opacity: 0.85;
}

/* ─── PLANET QUOTE ───────────────────────────────────────── */
.ep-quote-wrap {
  padding: 7px 11px;
  border-left: 2px solid var(--ep-primary, rgba(0, 229, 255, 0.6));
  background: rgba(0, 0, 0, 0.18);
  border-radius: 0 5px 5px 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-style: italic;
  color: rgba(200, 220, 240, 0.82);
  line-height: 1.5;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  margin-bottom: 8px;
}

/* ─── TABS NAVIGATION ────────────────────────────────────── */
.ep-tabs-nav {
  display: flex;
  gap: 3px;
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.ep-tabs-nav::-webkit-scrollbar { display: none; }

.ep-tab-btn {
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: rgba(160, 190, 215, 0.55);
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.ep-tab-btn:hover {
  color: var(--ep-primary, #00e5ff);
  border-color: rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.05);
}

.ep-tab-btn.active {
  color: var(--ep-primary, #00e5ff);
  border-color: var(--ep-primary, rgba(0, 229, 255, 0.45));
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.12);
}

.ep-tab-action {
  color: rgba(255, 200, 80, 0.7) !important;
  border-color: rgba(255, 200, 80, 0.18) !important;
}

.ep-tab-action:hover,
.ep-tab-action.active {
  color: #ffcc44 !important;
  border-color: rgba(255, 204, 68, 0.45) !important;
  background: rgba(255, 204, 68, 0.07) !important;
  box-shadow: 0 0 8px rgba(255, 204, 68, 0.15) !important;
}

/* ─── TAB CONTENT PANELS ─────────────────────────────────── */
.ep-tab-panels {
  flex: 1;
  position: relative;
  overflow-y: auto;
  max-height: 180px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.18) transparent;
}

.ep-tab-panels::-webkit-scrollbar { width: 3px; }
.ep-tab-panels::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.2); border-radius: 2px; }

.ep-tab-panel {
  display: none;
  animation: ep-fade-in 0.22s ease;
}

.ep-tab-panel.active { display: block; }

@keyframes ep-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── LIST ITEMS (symptoms / causes / advice) ────────────── */
.ep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ep-list-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12.5px;
  color: rgba(195, 212, 228, 0.82);
  line-height: 1.45;
  transition: border-color 0.18s ease;
}

.ep-list-item:hover {
  border-color: rgba(0, 229, 255, 0.18);
}

.ep-list-icon {
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── ACTION TAB ─────────────────────────────────────────── */
.ep-section-label {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--ep-primary, #00e5ff);
  opacity: 0.65;
  margin-bottom: 7px;
}

.ep-action-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.ep-action-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 11px;
  background: rgba(255, 204, 68, 0.045);
  border: 1px solid rgba(255, 204, 68, 0.14);
  border-radius: 7px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12.5px;
  color: rgba(220, 212, 195, 0.9);
  line-height: 1.45;
  transition: background 0.18s ease;
}

.ep-action-step:hover {
  background: rgba(255, 204, 68, 0.09);
}

.ep-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 204, 68, 0.18);
  color: #ffcc44;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── BREATHING GUIDE ────────────────────────────────────── */
.ep-breathing {
  padding: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  text-align: center;
}

.ep-breath-circle {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 2px solid var(--ep-primary, #00e5ff);
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ep-primary, #00e5ff);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.12);
  transition: transform 0.5s ease, box-shadow 0.5s ease, opacity 0.5s ease;
}

.ep-breath-circle.inhale {
  transform: scale(1.28);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.38);
}

.ep-breath-circle.hold {
  transform: scale(1.28);
  opacity: 0.65;
}

.ep-breath-circle.exhale {
  transform: scale(0.82);
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.08);
}

.ep-breath-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: rgba(190, 210, 230, 0.75);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.ep-breath-timer {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  color: var(--ep-primary, #00e5ff);
  margin-bottom: 10px;
}

.ep-breath-btn {
  padding: 6px 18px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 18px;
  color: var(--ep-primary, #00e5ff);
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.ep-breath-btn:hover {
  background: rgba(0, 229, 255, 0.16);
}

/* ─── INTERACT TAB / AI INPUT ────────────────────────────── */
.ep-ai-input-wrap { margin-bottom: 10px; }

.ep-ai-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 7px;
  padding: 9px 12px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: rgba(200, 220, 240, 0.9);
  resize: none;
  min-height: 62px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  outline: none;
}

.ep-ai-input::placeholder {
  color: rgba(160, 190, 215, 0.32);
}

.ep-ai-input:focus {
  border-color: var(--ep-primary, rgba(0, 229, 255, 0.45));
  background: rgba(0, 0, 0, 0.35);
}

.ep-ai-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 6px 14px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 5px;
  color: var(--ep-primary, #00e5ff);
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.ep-ai-send-btn:hover {
  background: rgba(0, 229, 255, 0.16);
}

.ep-ai-response {
  display: none;
  margin-top: 8px;
  padding: 9px 11px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 7px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12.5px;
  color: rgba(175, 208, 230, 0.85);
  line-height: 1.55;
}

.ep-ai-response.visible {
  display: block;
  animation: ep-fade-in 0.3s ease;
}

/* Emotion level slider */
.ep-emotion-level { margin-top: 12px; }

.ep-slider-label {
  display: flex;
  justify-content: space-between;
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  color: rgba(160, 190, 215, 0.55);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.ep-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.ep-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ep-primary, #00e5ff);
  box-shadow: 0 0 7px var(--ep-primary, rgba(0, 229, 255, 0.6));
  cursor: pointer;
}

/* ─── SHARED FEELINGS ────────────────────────────────────── */
.ep-feelings-section {
  position: fixed;
  bottom: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 88vw);
  z-index: 28;
  display: none;
  pointer-events: auto;
}

.ep-feelings-section.visible {
  display: block;
  animation: ep-fade-in 0.4s ease;
}

.ep-feelings-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.ep-feelings-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00e5ff;
  animation: ep-pulse 2s infinite;
}

.ep-feelings-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(160, 195, 220, 0.55);
}

.ep-feelings-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 116px;
  overflow-y: auto;
  scrollbar-width: none;
}

.ep-feelings-list::-webkit-scrollbar { display: none; }

.ep-feeling-item {
  padding: 7px 14px;
  background: rgba(1, 8, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12.5px;
  color: rgba(190, 210, 230, 0.75);
  transition: border-color 0.2s ease;
  cursor: default;
}

.ep-feeling-item:hover {
  border-color: rgba(0, 229, 255, 0.18);
}

/* ─── LAST VISITED NAV ITEM ──────────────────────────────── */
.planet-nav-item.ep-last-visited {
  outline: 1px solid rgba(0, 229, 255, 0.35);
  outline-offset: -1px;
  border-radius: 4px;
}

/* ─── PLANET VISUAL THEMES ───────────────────────────────── */

/* MARS — Anger — Strong red, high contrast */
.planet-theme-mars {
  --ep-primary: #ff3b3b;
  --ep-glow: 0 0 32px rgba(255, 59, 59, 0.28), 0 0 68px rgba(255, 59, 59, 0.12);
}

.planet-theme-mars .ep-quote-wrap {
  border-left-color: #ff3b3b;
  animation: ep-glow-mars 2.2s ease-in-out infinite alternate;
}

.planet-theme-mars .ep-tab-btn.active {
  box-shadow: 0 0 10px rgba(255, 59, 59, 0.22);
}

.planet-theme-mars .ep-list-item:hover {
  border-color: rgba(255, 59, 59, 0.28);
}

@keyframes ep-glow-mars {
  from { box-shadow: 0 0 4px rgba(255, 59, 59, 0.08); }
  to   { box-shadow: 0 0 14px rgba(255, 59, 59, 0.28); }
}

/* NEPTUNE — Anxiety — Blue-purple, soft blur */
.planet-theme-neptune {
  --ep-primary: #7b68ee;
  --ep-glow: 0 0 20px rgba(123, 104, 238, 0.22);
}

.planet-theme-neptune .ep-quote-wrap {
  border-left-color: #7b68ee;
}

/* SATURN — Depression — Dark gray, muted, low contrast */
.planet-theme-saturn {
  --ep-primary: #7a6e8a;
  --ep-glow: 0 0 8px rgba(122, 110, 138, 0.14);
}

.planet-theme-saturn .ep-tab-btn.active { box-shadow: none; }
.planet-theme-saturn .ep-emotion-dot    { animation: none; }
.planet-theme-saturn .ep-quote-wrap     { border-left-color: #7a6e8a; }

/* Slightly reduced opacity for depression theme */
#planetPanel.planet-theme-saturn .ep-tab-btn,
#planetPanel.planet-theme-saturn .ep-list-item {
  opacity: 0.88;
}

/* VENUS — Emotional Pain — Warm gold/orange */
.planet-theme-venus {
  --ep-primary: #ffb347;
  --ep-glow: 0 0 20px rgba(255, 179, 71, 0.18);
}

.planet-theme-venus .ep-quote-wrap { border-left-color: #ffb347; }

/* URANUS — Overthinking — Neon cyan, grid pattern, fast transitions */
.planet-theme-uranus {
  --ep-primary: #00e5ff;
  --ep-glow: 0 0 22px rgba(0, 229, 255, 0.22);
}

.planet-theme-uranus .ep-tab-btn        { transition: all 0.1s ease; }
.planet-theme-uranus .ep-quote-wrap     { border-left-color: #00e5ff; }

/* Subtle grid overlay for Uranus */
.planet-theme-uranus .ep-tab-panels::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
  z-index: 0;
}

.planet-theme-uranus .ep-tab-panel { position: relative; z-index: 1; }

/* MERCURY — Loneliness — Pale gray, minimal, spacious */
.planet-theme-mercury {
  --ep-primary: #b4b8c8;
  --ep-glow: 0 0 6px rgba(180, 184, 200, 0.1);
}

.planet-theme-mercury .ep-quote-wrap   { border-left-color: #b4b8c8; opacity: 0.82; }
.planet-theme-mercury .ep-emotion-dot  { animation: none; }
.planet-theme-mercury .ep-list-item    { margin-bottom: 4px; }
.planet-theme-mercury .ep-tab-panel    { padding-top: 8px; }

/* EARTH — Balance — Blue */
.planet-theme-earth {
  --ep-primary: #4a9edf;
  --ep-glow: 0 0 16px rgba(74, 158, 223, 0.18);
}

.planet-theme-earth .ep-quote-wrap { border-left-color: #4a9edf; }

/* JUPITER — Confidence — Gold */
.planet-theme-jupiter {
  --ep-primary: #d4a850;
  --ep-glow: 0 0 20px rgba(212, 168, 80, 0.22);
}

.planet-theme-jupiter .ep-quote-wrap { border-left-color: #d4a850; }

/* ─── PANEL ENHANCED STATE ───────────────────────────────── */
#planetPanel.ep-enhanced {
  transition: box-shadow 0.5s ease;
}

#planetPanel.ep-enhanced .panel-body {
  max-height: 175px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.15) transparent;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 820px) {
  .top-nav { padding: 0 14px; gap: 0; }
  .nav-links { display: none; }

  .ep-feelings-section {
    width: 94vw;
    bottom: 72px;
  }
}
