:root {
  --bg-primary: #070913;
  --bg-card: rgba(18, 22, 41, 0.75);
  --bg-card-hover: rgba(28, 35, 65, 0.85);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(139, 92, 246, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Cosmic Ambient & Canvas */
#mystery-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  top: -10%;
  left: 15%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
}

.glow-2 {
  top: 40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
}

.glow-3 {
  bottom: -10%;
  left: 30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.15) 0%, transparent 70%);
}

/* App Wrapper */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(13, 17, 34, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 50px;
  margin-bottom: 48px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--accent-purple);
}

.brand-tld {
  font-size: 0.75rem;
  padding: 2px 7px;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  color: #c084fc;
  font-weight: 600;
  font-family: var(--font-mono);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.curiosity-pill {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.visitor-counter-pill {
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
  transition: all 0.2s ease;
}

.visitor-counter-pill:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.visitor-label {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
}

.visitor-number {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseAnim 2s infinite ease-in-out;
}

@keyframes pulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 52px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c084fc;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #c084fc 0%, #38bdf8 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dynamic-unknown {
  color: #fbbf24;
  border-bottom: 2px dashed rgba(251, 191, 36, 0.6);
  padding-bottom: 2px;
  cursor: pointer;
  display: inline-block;
  transition: color 0.2s ease;
}

.dynamic-unknown:hover {
  color: #fef08a;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Curiosity Search / Interactive Bar */
.search-container {
  position: relative;
  max-width: 650px;
  margin: 0 auto 16px;
}

.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(18, 24, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 40px;
  padding: 6px 8px 6px 20px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), 0 0 30px -10px rgba(139, 92, 246, 0.2);
  transition: all 0.3s ease;
}

.search-bar-wrap:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.35);
}

.search-prefix {
  font-weight: 700;
  font-size: 1rem;
  color: #c084fc;
  padding-right: 8px;
  user-select: none;
  white-space: nowrap;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  outline: none;
  min-width: 140px;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.btn-magic {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-magic:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-magic:active {
  transform: translateY(1px);
}

/* Quick prompt pills */
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.prompt-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

.prompt-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.prompt-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #fff;
  border-color: rgba(139, 92, 246, 0.4);
}

/* Filter Bar */
.filter-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 30px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chip.active {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

.catalog-counter {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* Products Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.product-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent, #8b5cf6), transparent);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: var(--card-accent, var(--border-hover));
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 30px -10px var(--card-accent-glow, rgba(139, 92, 246, 0.3));
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--card-icon-bg, rgba(139, 92, 246, 0.15));
  border: 1px solid var(--card-icon-border, rgba(139, 92, 246, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.card-question {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card-question span.highlight {
  color: var(--card-accent, #38bdf8);
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
}

/* Feature bullets */
.card-highlights {
  list-style: none;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.card-highlights li {
  font-size: 0.82rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-highlights li:last-child {
  margin-bottom: 0;
}

.card-highlights li svg {
  color: var(--card-accent, #10b981);
  flex-shrink: 0;
}

/* Card Action */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-card-launch {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--card-btn-bg, #8b5cf6);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-card-launch:hover {
  filter: brightness(1.15);
  box-shadow: 0 8px 24px -5px var(--card-accent-glow, rgba(139, 92, 246, 0.4));
  transform: translateY(-1px);
}

.btn-card-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-preview:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Curiosity Oracle / Mini Interactive Tool */
.oracle-box {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.7), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.oracle-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.oracle-heading {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.oracle-heading span {
  color: #a855f7;
}

.oracle-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.btn-oracle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-oracle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.4);
}

.oracle-card-display {
  background: rgba(10, 14, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.oracle-mystery-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.oracle-curiosity-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oracle-target-link {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #c084fc;
  text-decoration: none;
}

.oracle-target-link:hover {
  text-decoration: underline;
}

/* Suggestion / Request Modal */
.suggest-box {
  background: rgba(18, 22, 41, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.suggest-box h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.suggest-box p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 20px;
  font-size: 0.95rem;
}

.suggest-form {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  gap: 10px;
}

.suggest-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 10px 18px;
  color: #fff;
  font-family: inherit;
  outline: none;
}

.suggest-form input:focus {
  border-color: #8b5cf6;
}

.suggest-form button {
  background: #38bdf8;
  color: #070913;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggest-form button:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
}

/* Footer */
footer {
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand {
  color: var(--text-muted);
}

.developer-credit {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.developer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.developer-link:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

.dev-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-email {
  color: #a855f7;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-purple);
}

/* Modal for Preview */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #0d1124;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 950px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #131832;
}

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-url {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
}

.modal-header-actions {
  display: flex;
  gap: 8px;
}

.modal-iframe-wrap {
  flex: 1;
  position: relative;
  background: #000;
}

.modal-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.iframe-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: #0a0d1d;
  color: var(--text-muted);
}

/* Toast notification */
.toast-msg {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #10b981;
  color: #fff;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  z-index: 2000;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .oracle-inner {
    grid-template-columns: 1fr;
  }
  .suggest-form {
    flex-direction: column;
  }
  .suggest-form button {
    width: 100%;
  }
}
