/*
 * @file portal.css
 * @description Landing/portal view styles (genesis hero, user-world panel, dev
 *   entry). Consumes theme.css tokens so it flips with dark/light mode.
 * @version-history
 *   v1.2.0 — 2026-06-02 — Component unification (#11): remove the .portal-view
 *     .live-dot override; the live-feed dot now uses canonical <StatusDot>.
 *   v1.1.0 — 2026-06-02 — Component unification (#6 stat cards): remove
 *     .user-stat/.user-stat-label/.user-stat-value; user-world stats use canonical
 *     .stat-card family (kept .user-world-grid wrapper).
 */
/* portal view — scoped under .portal-view */
/* ── Genesis Hero 3D Canvas ── */
.gn-hero-3d {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2.5rem 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #FFF1F0 0%, #FAFAF8 100%);
}
.gn-hero-3d img {
  max-height: 480px;
  width: auto;
  border-radius: 50%;
  animation: badgeFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 6px 24px rgba(232,86,74,.15));
}
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.genesis-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  pointer-events: none;
  z-index: 2;
}
.genesis-corner--tl { top: 10px; left: 10px; border-top: 1px solid rgba(232,86,74,0.2); border-left: 1px solid rgba(232,86,74,0.2); }
.genesis-corner--tr { top: 10px; right: 10px; border-top: 1px solid rgba(232,86,74,0.2); border-right: 1px solid rgba(232,86,74,0.2); }
.genesis-corner--bl { bottom: 10px; left: 10px; border-bottom: 1px solid rgba(232,86,74,0.2); border-left: 1px solid rgba(232,86,74,0.2); }
.genesis-corner--br { bottom: 10px; right: 10px; border-bottom: 1px solid rgba(232,86,74,0.2); border-right: 1px solid rgba(232,86,74,0.2); }

/* tagline + subline under the 3D canvas */
.genesis-text-under {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 1.5rem 2rem;
}
.genesis-tagline {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text);
  max-width: 600px;
  margin: 0 auto 0.75rem;
  font-weight: 700;
  line-height: 1.5;
}
.genesis-subline {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Section divider ── */
.portal-view .section-divider {
  background: var(--border);
}

/* ── Content Group Container ── */
.portal-view .content-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.content-group > *:first-child { margin-top: 0; }
.content-group > *:last-child { margin-bottom: 0; }
.content-group .provocation,
.content-group .oneliners-section,
.content-group .prompt-section {
  max-width: none;
  padding-left: 0; padding-right: 0;
  margin-left: 0; margin-right: 0;
}
.content-group .provocation {
  display: flex; align-items: center; justify-content: center;
  min-height: 6rem; margin-top: 1rem;
}
.content-group .oneliners-header {
  position: absolute; top: 0.65rem; left: 0.85rem;
  margin-bottom: 0;
}

/* ── Live Oneliners ── */
.oneliners-section {
  position: relative; z-index: 1;
  max-width: 520px; margin: 0.75rem auto 0; padding: 0;
}
.oneliners-header {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0;
}
.oneliners-label {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--success);
}
.oneliners-feed {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  max-height: 280px; overflow-y: auto;
  backdrop-filter: none;
}
.oneliner {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem; color: var(--text); line-height: 1.5;
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 0.5rem;
  animation: fadeIn 0.4s ease;
}
.oneliner:last-child { border-bottom: none; }
.oneliner-text { flex: 1; word-break: break-word; }
.oneliner-time { font-size: 0.65rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; margin-top: 0.15rem; }
.oneliners-empty { padding: 1.5rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); font-style: italic; }

/* ── Provocation ── */
.provocation-line1 {
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  font-weight: 800; color: var(--text);
  line-height: 1.4; letter-spacing: -0.01em;
  text-align: center;
}

/* ── Prompt Section ── */
.prompt-section {
  position: relative; z-index: 1;
  max-width: 520px; margin: 1.5rem auto 0;
  padding: 0 1.25rem; text-align: center;
}
.portal-view .prompt-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
}
.portal-view .prompt-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 86, 74, 0.1);
}
.prompt-actions {
  display: flex; justify-content: center; margin-bottom: 1.25rem;
}
.copy-btn {
  padding: 0.6rem 1.8rem;
  background: linear-gradient(135deg, #E8564A 0%, #FF6B6B 100%);
  color: #fff; border: none;
  border-radius: var(--radius-sm, 10px);
  font-size: 0.84rem; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-heart);
  animation: none;
}
.copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 86, 74, 0.35);
}
.copy-btn:active { transform: translateY(0); }
.copy-btn.copied {
  background: linear-gradient(135deg, #10B981, #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  animation: none;
}
.prompt-note {
  font-size: 0.8rem; color: var(--text-dim);
  font-style: italic; margin-top: 0;
  text-align: center; line-height: 1.7;
}

/* ── Expand Button ── */
.expand-section {
  position: relative; z-index: 1;
  text-align: center;
  margin: 3rem auto 0;
  padding: 0 1.25rem;
}
.expand-btn {
  padding: 0.75rem 2rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.9rem; font-weight: 500;
  font-family: var(--font); cursor: pointer;
  transition: all 0.15s;
  box-shadow: none;
  animation: none;
}
.expand-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: transparent;
}

/* ── The World ── */
.world {
  position: relative; z-index: 1;
  max-width: 720px; margin: 0 auto;
  padding: 0 1.25rem;
  animation: worldOpen 0.6s ease;
}
.world-divider {
  text-align: center; margin: 3rem 0 2rem; position: relative;
}
.world-divider::before {
  content: ''; position: absolute;
  top: 50%; left: 0; right: 0; height: 1px;
  background: var(--border);
}
.world-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius, 16px);
  padding: 2rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.world-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.world-card-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;
}
.world-card-desc {
  font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 1rem;
}
.world-card .prompt-box { min-height: 100px; }
.world-card .copy-btn { font-size: 0.85rem; padding: 0.55rem 1.5rem; }
.world-card .prompt-actions { margin-top: 0.6rem; }
.world-card-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
  color: var(--text-dim); font-weight: 500; font-size: 0.9rem;
  text-decoration: none; transition: all 0.15s;
}
.world-card-cta:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.world-register-btn {
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff; border: none;
  border-radius: var(--radius-sm, 10px);
  font-size: 0.9rem; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.world-register-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* ── User world accordion ── */
.user-world { margin-bottom: 1rem; }
.user-world-item {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 14px; margin-bottom: 0.75rem; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.user-world-item[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.user-world-summary {
  cursor: pointer; list-style: none;
  padding: 0.95rem 1.1rem;
  color: var(--text); font-weight: 700;
  letter-spacing: 0.01em;
  display: flex; align-items: center;
  justify-content: space-between; gap: 0.8rem;
}
.user-world-summary::-webkit-details-marker { display: none; }
.user-world-summary::after {
  content: '\25be'; color: var(--accent);
  font-size: 0.9rem; transition: transform 0.25s ease;
}
.user-world-item[open] .user-world-summary::after { transform: rotate(180deg); }
.user-world-content { padding: 0 1.1rem 1rem; }
.user-world-desc {
  font-size: 0.86rem; color: var(--text-dim);
  margin-bottom: 0.85rem; line-height: 1.6;
}
.user-world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem; margin-bottom: 0.8rem;
}
/* .user-stat/.user-stat-label/.user-stat-value removed — portal user-world stats use
   canonical .stat-card / .stat-card-label / .stat-card-value. Unified 2026-06-02 (#6).
   (.user-world-grid wrapper kept.) */
.user-meta {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 0.35rem 0.65rem; margin-bottom: 0.8rem; font-size: 0.82rem;
}
.user-meta-key { color: var(--text-muted); }
.user-meta-value { color: var(--text); word-break: break-word; }
.user-link-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.user-link-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.45rem 0.8rem; border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim); text-decoration: none;
  font-size: 0.8rem; font-weight: 500; transition: all 0.15s;
}
.user-link-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Connect link ── */
.connect-link {
  color: var(--blue, #3B82F6); text-decoration: underline;
  text-underline-offset: 2px; font-size: 0.88rem;
}
.connect-link:hover { color: #1D4ED8; }

/* ── Footer ── */
.portal-view .footer .heart-icon {
  animation: none;
}

/* ── Scrollbar ── */
.oneliners-feed::-webkit-scrollbar { width: 6px; }
.oneliners-feed::-webkit-scrollbar-track { background: transparent; }
.oneliners-feed::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .gn-hero-3d { padding: 2rem 1rem 1.5rem; }
  .gn-hero-3d img { max-height: 220px; }
  .genesis-text-under { padding: 1rem 1rem 0; }
  .expand-btn { padding: 0.6rem 1.5rem; font-size: 0.9rem; }
}
