/* Explore page — chat-based course discovery */

.explore-page {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - 64px);
  padding: 2rem 1rem; gap: 1.5rem;
}

/* ── Orb ── */
.explore-orb-wrap {
  display: flex; flex-direction: column; align-items: center;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.explore-orb {
  position: relative;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.explore-orb-glow {
  position: absolute; inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(59, 130, 246, 0.25) 0%,
    rgba(59, 130, 246, 0.08) 50%,
    transparent 70%);
  animation: exploreGlow 4s ease-in-out infinite;
  transition: inset 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.explore-orb-sphere {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 35% 30%,
    rgba(96, 165, 250, 0.9) 0%,
    rgba(59, 130, 246, 0.85) 30%,
    rgba(37, 99, 235, 0.95) 70%,
    rgba(29, 78, 216, 1) 100%
  );
  box-shadow:
    inset 0 -8px 20px rgba(0, 0, 0, 0.25),
    inset 0 4px 12px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(59, 130, 246, 0.3),
    0 8px 32px rgba(59, 130, 246, 0.3);
  display: flex; align-items: center; justify-content: center;
  animation: exploreIdle 6s ease-in-out infinite;
}

.explore-orb-highlight {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.15) 30%,
    transparent 55%
  );
  pointer-events: none;
}

.explore-orb-mic {
  width: 32px; height: 32px;
  color: rgba(255, 255, 255, 0.9);
  position: relative; z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
  transition: width 0.8s ease, height 0.8s ease;
}

/* Compact orb in results state */
.orb-compact .explore-orb { width: 60px; height: 60px; }
.orb-compact .explore-orb-glow { inset: -10px; }
.orb-compact .explore-orb-mic { width: 18px; height: 18px; }

/* ── Question ── */
.explore-question {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem; font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-align: center;
  min-height: 1.75em;
}
.explore-question::after {
  content: '|'; color: var(--accent);
  font-weight: 300; margin-left: 1px;
  animation: exploreBlink 0.6s step-end infinite;
}
.explore-question.done::after {
  animation: none; opacity: 0;
}

/* ── Input ── */
.explore-input-wrap {
  width: 100%; max-width: 420px;
}
.explore-input {
  width: 100%; padding: 0.875rem 1.25rem;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9375rem; font-family: inherit;
  line-height: 1.5;
  outline: none; resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.explore-input::placeholder { color: var(--text-muted); }
.explore-input:focus {
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08), 0 0 0 3px rgba(59,130,246,0.1);
}

/* ── Results grid ── */
.explore-results {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; width: 100%; max-width: 720px;
}

.explore-card {
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.explore-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  border-color: rgba(59,130,246,0.2);
}

.explore-card-thumb { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.explore-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.explore-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(59,130,246,0.04) 100%);
  font-size: 2rem; font-weight: 700; color: #3b82f6;
}

.explore-card-body { padding: 0.75rem 0.875rem; }
.explore-card-title {
  font-size: 0.875rem; font-weight: 600;
  line-height: 1.3; margin-bottom: 0.25rem;
  color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.explore-card-creator {
  font-size: 0.75rem; color: var(--text-secondary);
  margin-bottom: 0.375rem;
}
.explore-card-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem;
}
.explore-card-level {
  text-transform: capitalize;
  color: var(--text-secondary);
  padding: 0.125rem 0.5rem; border-radius: 999px;
  background: var(--accent-soft);
}
.explore-card-price { font-weight: 600; color: var(--text-primary); }
.explore-card-price--free { color: var(--success); }

/* ── Refine prompt ── */
.explore-refine {
  font-size: 0.875rem; color: var(--text-secondary);
  text-align: center; font-weight: 500;
}

/* ── Loading ── */
.explore-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.explore-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(59,130,246,0.15);
  border-top-color: #3b82f6;
  animation: exploreSpin 0.8s linear infinite;
}

/* ── Animations ── */
@keyframes exploreGlow {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.08); }
}
@keyframes exploreIdle {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.02) translateY(-2px); }
}
@keyframes exploreBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes exploreSpin {
  to { transform: rotate(360deg); }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .explore-results { grid-template-columns: 1fr; max-width: 320px; }
}
