/* style_b4e9k2p7m.css */
/* EphemeralChat */
/* Global dark-theme stylesheet covering layout, components, and animations. */

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface2: #1a1a24;
  --border: #2a2a3a;
  --accent: #7c6ff7;
  --accent-glow: rgba(124,111,247,0.3);
  --text: #e8e8f0;
  --text-muted: #6b6b80;
  --danger: #f75f6f;
  --success: #4ade80;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter','Segoe UI',system-ui,sans-serif;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.landing-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,111,247,0.12) 0%, transparent 70%);
}

.landing-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.logo-mark { display: flex; gap: 6px; align-items: center; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.logo-dot:nth-child(2) { opacity: 0.6; width: 8px; height: 8px; }
.logo-dot:nth-child(3) { opacity: 0.3; width: 6px; height: 6px; }

.brand { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.tagline { color: var(--text-muted); font-size: 0.95rem; }

.alert-error {
  background: rgba(247,95,111,0.1);
  border: 1px solid rgba(247,95,111,0.3);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.action-group { display: flex; flex-direction: column; gap: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover { background: #8d82f9; box-shadow: 0 0 36px var(--accent-glow); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.hidden { display: none !important; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.join-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.feature-list li { font-size: 0.8rem; color: var(--text-muted); padding-left: 1.25rem; position: relative; }
.feature-list li::before { content: '✦'; position: absolute; left: 0; color: var(--accent); font-size: 0.65rem; top: 3px; }

.room-body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 1rem;
}

.header-left { display: flex; align-items: center; gap: 0.6rem; }
.brand-sm { font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em; }
.header-center { display: flex; align-items: center; gap: 0.5rem; flex: 1; justify-content: center; }
.space-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.space-id-display { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }
.header-right { display: flex; align-items: center; gap: 0.75rem; }
.member-indicator { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--text-muted); }
.member-icon { color: var(--success); font-size: 0.6rem; }
.logo-dot.pulse { animation: pulse-glow 2s ease-in-out infinite; }

.room-layout { display: flex; flex: 1; overflow: hidden; }

.sidebar {
  width: 200px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-title { padding: 1rem 1rem 0.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

.member-list { list-style: none; flex: 1; overflow-y: auto; padding: 0.25rem 0; }
.member-list li { padding: 0.4rem 1rem; font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.member-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.member-list li.is-you { color: var(--text); }

.sidebar-footer { padding: 0.75rem 1rem; border-top: 1px solid var(--border); }
.encryption-badge { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; color: var(--text-muted); }

.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

.messages-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.messages-wrap::-webkit-scrollbar { width: 4px; }
.messages-wrap::-webkit-scrollbar-track { background: transparent; }
.messages-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  opacity: 0.5;
  padding: 2rem;
}

.message-row {
  display: flex;
  flex-direction: column;
  max-width: 72%;
  gap: 0.25rem;
  animation: msg-in 0.3s ease;
  transition: opacity 4s ease;
}

.message-row.is-mine { align-self: flex-end; align-items: flex-end; }
.message-row.is-theirs { align-self: flex-start; align-items: flex-start; }

.message-meta { font-size: 0.72rem; color: var(--text-muted); display: flex; gap: 0.5rem; align-items: center; }

.message-bubble {
  padding: 0.65rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

.is-mine .message-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.is-theirs .message-bubble { background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.message-bubble.decrypting { background: var(--surface2); color: var(--text-muted); font-style: italic; font-size: 0.8rem; border: 1px solid var(--border); }

.fade-track {
  height: 2px;
  width: 80px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.fade-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.9s ease;
  opacity: 0.7;
}

.compose-bar {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.name-row { display: flex; gap: 0.5rem; align-items: center; }

.input-name {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-name:focus { border-color: var(--accent); }

.compose-row { display: flex; gap: 0.5rem; align-items: flex-end; }

.input-message {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-family: var(--font);
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  max-height: 120px;
  line-height: 1.5;
}

.input-message:focus { border-color: var(--accent); }
.input-message:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-send {
  width: 42px; height: 42px;
  padding: 0;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.btn-send svg { width: 18px; height: 18px; }
.btn-send:hover { background: #8d82f9; }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 9999; }

.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  animation: slide-in 0.25s ease;
  max-width: 320px;
}

.toast.toast-error { border-color: rgba(247,95,111,0.4); color: var(--danger); }

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px var(--accent); opacity: 1; }
  50% { box-shadow: 0 0 14px var(--accent); opacity: 0.5; }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Admin ───────────────────────────────────────────────────────────────── */

.admin-wrap { display: flex; flex-direction: column; min-height: 100vh; }

.admin-body { padding: 2rem; display: flex; flex-direction: column; gap: 2rem; max-width: 1200px; width: 100%; margin: 0 auto; }

.admin-refresh-label { font-size: 0.75rem; color: var(--text-muted); }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.admin-section { display: flex; flex-direction: column; gap: 0.75rem; }
.admin-section-header { display: flex; align-items: center; justify-content: space-between; }
.admin-section-title { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th { padding: 0.65rem 1rem; text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--surface2); }

.table-empty { text-align: center; color: var(--text-muted); padding: 2rem !important; }

.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.55rem; border-radius: 99px; font-size: 0.72rem; font-weight: 600; }
.badge-empty { background: rgba(107,107,128,0.15); color: var(--text-muted); }
.badge-expired { background: rgba(247,95,111,0.12); color: var(--danger); }
.mono { font-family: monospace; font-size: 0.8rem; color: var(--text-muted); }

/* ── About ───────────────────────────────────────────────────────────────── */

.about-wrap { min-height: 100vh; background: radial-gradient(ellipse at 50% 0%, rgba(124,111,247,0.08) 0%, transparent 60%); padding: 2rem 1.5rem; }
.about-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 2.5rem; }

.about-nav { display: flex; align-items: center; justify-content: space-between; }
.about-back { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.about-back:hover { color: var(--text); }

.about-header { display: flex; flex-direction: column; gap: 0.75rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.about-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.about-lead { color: var(--text-muted); font-size: 1rem; line-height: 1.7; max-width: 560px; }

.about-section { display: flex; flex-direction: column; gap: 1rem; }
.about-h2 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.6rem; }
.about-h2-icon { font-style: normal; font-size: 1rem; }
.about-section p { color: var(--text-muted); line-height: 1.75; font-size: 0.9rem; }
.about-section p strong { color: var(--text); }
.about-section code { font-family: monospace; font-size: 0.82em; background: var(--surface2); border: 1px solid var(--border); padding: 0.1em 0.4em; border-radius: 4px; color: var(--accent); }

.about-url-demo { display: flex; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.65rem 1rem; font-family: monospace; font-size: 0.82rem; gap: 0; }
.url-part { padding: 0.15rem 0; }
.url-origin { color: var(--text-muted); }
.url-path { color: var(--text); }
.url-fragment { color: var(--accent); }

.about-algo-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.algo-item { display: flex; align-items: baseline; gap: 1rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); }
.algo-item:last-child { border-bottom: none; }
.algo-name { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; width: 130px; flex-shrink: 0; }
.algo-value { font-size: 0.85rem; color: var(--text); font-family: monospace; }

.about-steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 1rem; align-items: flex-start; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.step-text { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }
.step-text strong { color: var(--text); }

.about-list { display: flex; flex-direction: column; gap: 0.6rem; padding-left: 0; list-style: none; }
.about-list li { font-size: 0.875rem; color: var(--text-muted); padding-left: 1.25rem; position: relative; line-height: 1.65; }
.about-list li::before { content: '✦'; position: absolute; left: 0; color: var(--accent); font-size: 0.6rem; top: 4px; }
.about-list li strong { color: var(--text); }
.about-list li code { font-family: monospace; font-size: 0.82em; background: var(--surface2); border: 1px solid var(--border); padding: 0.1em 0.4em; border-radius: 4px; color: var(--accent); }

.about-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.about-table th { padding: 0.65rem 1rem; text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.about-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.about-table tbody tr:last-child td { border-bottom: none; }
.cell-no { color: var(--danger); }
.cell-yes { color: var(--text-muted); }

.about-footer { padding-top: 1rem; border-top: 1px solid var(--border); display: flex; }

.about-link { text-align: center; font-size: 0.8rem; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.about-link:hover { color: var(--accent); }
