:root {
  --bg: #090a0f;
  --surface: #121520;
  --surface-hover: #1a1e2e;
  --surface-glass: rgba(18, 21, 32, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(59, 130, 246, 0.6);
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --pinned-gold: #f59e0b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html, body {
  height: 100svh;
  height: 100dvh;
  max-height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse 90% 70% at 50% 0%, #171c2e 0%, #090a0f 80%) fixed;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.font-mono { font-family: var(--font-mono); }

.app-container {
  display: flex;
  flex-direction: column;
  height: 100svh;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  position: relative;
  background: transparent;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
  width: 100%;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 640px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  animation: pulseLight 2s infinite ease-in-out;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.feed-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  width: 100%;
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feed-viewport::-webkit-scrollbar { display: none; }

.feed-stream {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-dim);
  gap: 10px;
}

.bottom-zone {
  flex-shrink: 0;
  width: 100%;
  padding: 10px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  z-index: 30;
}

.bottom-zone-inner {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.composer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.composer-card:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.thought-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  resize: none;
  min-height: 48px;
  max-height: 100px;
}
.thought-input::placeholder { color: var(--text-dim); }

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 8px;
}

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