/* ═══════════════════════════════════════════════════════
   THOUGHTIFY — A Sanctuary for Ideas
   Complete Design System
   ═══════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─── */
:root {
  /* Deep warm palette */
  --bg-deepest: #0c0907;
  --bg-deep: #14100c;
  --bg-surface: #1e1813;
  --bg-card: #241d17;
  --bg-card-hover: #2d241d;
  --bg-elevated: #2d241d;
  --bg-auth-card: #1a1410;

  /* Text tones */
  --text-primary: #f0e6d8;
  --text-secondary: #c4b5a0;
  --text-muted: #8a7a68;
  --text-inverse: #0c0907;

  /* Accent — warm amber glow */
  --accent: #d4943a;
  --accent-light: #e8b45a;
  --accent-glow: rgba(212, 148, 58, 0.25);
  --accent-dim: rgba(212, 148, 58, 0.12);

  /* Semantic */
  --danger: #d44a3a;
  --danger-dim: rgba(212, 74, 58, 0.12);
  --success: #5ab46a;
  --success-dim: rgba(90, 180, 106, 0.12);

  /* Borders & dividers */
  --border-subtle: rgba(240, 230, 216, 0.06);
  --border-medium: rgba(240, 230, 216, 0.12);
  --border-accent: rgba(212, 148, 58, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(212, 148, 58, 0.08);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Grain Noise Overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ─── Vignette ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, var(--bg-deepest) 100%);
}

/* ─── Ambient Glows ─── */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  animation: ambientPulse 8s ease-in-out infinite alternate;
}

.ambient-glow--top {
  top: -30vh;
  right: -20vw;
  width: 70vw;
  height: 70vh;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
}

.ambient-glow--bottom {
  top: auto;
  bottom: -20vh;
  right: auto;
  left: -15vw;
  width: 50vw;
  height: 50vh;
  animation-delay: -4s;
  animation-duration: 12s;
}

.ambient-glow--auth {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%);
  animation: ambientPulse 10s ease-in-out infinite alternate;
  opacity: 0.3;
}

@keyframes ambientPulse {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes ambientPulseAuth {
  0% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.15); }
}

/* ═══════════════════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deepest);
  transition: opacity 0.6s var(--ease-out-expo);
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1.5rem;
  display: inline-block;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px var(--accent-glow);
  animation: loadingLogoPulse 1.5s ease-in-out infinite alternate;
  margin: 0 auto 1.5rem;
}

@keyframes loadingLogoPulse {
  0% { box-shadow: 0 0 20px var(--accent-glow); transform: scale(1); }
  100% { box-shadow: 0 0 60px var(--accent-glow); transform: scale(1.05); }
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

.loading-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════════════════
   LANDING VIEW
   ═══════════════════════════════════════════════════════ */
.landing-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  animation: fadeIn 0.6s var(--ease-out-expo) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── Landing Nav ─── */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 0 0;
}

.landing-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 16, 12, 0.7);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: border-color 0.3s var(--ease-out);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.landing-user-signedin {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar--sm {
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-back {
  color: var(--text-muted);
  padding: 0.4rem;
}
.btn-back:hover {
  color: var(--text-primary);
}

/* ─── Hero Section ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1280px;
  margin: 1rem auto 0;
  padding: 2rem 2rem 0;
  min-height: 70vh;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: heroContentIn 1s var(--ease-out-expo) 0.15s both;
}

@keyframes heroContentIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-title-accent {
  color: var(--accent-light);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-actions .btn-primary svg {
  transition: transform 0.25s var(--ease-out);
}
.hero-actions .btn-primary:hover svg {
  transform: translateX(4px);
}

.hero-actions .btn-ghost {
  color: var(--text-muted);
}
.hero-actions .btn-ghost:hover {
  color: var(--text-primary);
}

/* ─── Hero Visual — abstract card composition ─── */
.hero-visual {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroVisualIn 1.2s var(--ease-out-expo) 0.3s both;
}

@keyframes heroVisualIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.hero-glow {
  position: absolute;
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
  animation: ambientPulse 6s ease-in-out infinite alternate;
}

.hero-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  width: 200px;
  box-shadow: var(--shadow-glow), var(--shadow-md);
  transition: transform 0.5s var(--ease-out);
}

.hero-card--1 {
  top: 5%;
  right: 5%;
  transform: rotate(3deg);
  animation: floatCard 8s ease-in-out infinite;
}
.hero-card--2 {
  bottom: 10%;
  right: 25%;
  transform: rotate(-5deg);
  animation: floatCard 10s ease-in-out 2s infinite;
}
.hero-card--3 {
  top: 30%;
  left: 0;
  transform: rotate(-2deg);
  animation: floatCard 9s ease-in-out 4s infinite;
}

@keyframes floatCard {
  0%, 100% { transform: var(--tw-rotate, rotate(0deg)) translateY(0); }
  50% { transform: var(--tw-rotate, rotate(0deg)) translateY(-12px); }
}

.hero-card--1 { --tw-rotate: rotate(3deg); }
.hero-card--2 { --tw-rotate: rotate(-5deg); }
.hero-card--3 { --tw-rotate: rotate(-2deg); }

.hero-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  margin-bottom: 0.75rem;
}

.hero-card-line {
  height: 12px;
  border-radius: 6px;
  background: var(--bg-card-hover);
  margin-bottom: 0.5rem;
}

.hero-card-line--short { width: 60%; }
.hero-card-line--long { width: 100%; }

/* ─── Public Feed Section ─── */
.public-feed-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Feature Cards ─── */
.features {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s var(--ease-out);
  text-align: center;
}

.feature-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.feature-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--accent-light);
  opacity: 0.8;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Landing Footer ─── */
.landing-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.landing-footer-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -1.5rem;
}

.footer-meta {
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════
   AUTH OVERLAY — modal over landing page
   ═══════════════════════════════════════════════════════ */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 9, 7, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayIn 0.35s var(--ease-out-expo) forwards;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  z-index: 2;
}

.auth-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.auth-backdrop {
  position: absolute;
  inset: 0;
}

/* ─── Dashboard Welcome ─── */
.dashboard-welcome {
  text-align: center;
  padding: 2rem 0 1.5rem;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.05s forwards;
  opacity: 0;
}

.dashboard-welcome-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.dashboard-welcome-title span {
  color: var(--accent);
}

.dashboard-welcome-text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   AUTH VIEW
   ═══════════════════════════════════════════════════════ */
.auth-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  animation: authFadeIn 0.8s var(--ease-out-expo) forwards;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  background: var(--bg-auth-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(212, 148, 58, 0.04);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px var(--accent-glow);
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-logo-text span {
  color: var(--accent);
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.auth-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.auth-tab:hover:not(.active) {
  color: var(--text-secondary);
}

/* Auth forms */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.auth-form.active {
  display: flex;
  animation: formSlideIn 0.35s var(--ease-out-expo);
}

@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form .form-group {
  margin-bottom: 0;
}

.auth-error {
  font-size: 0.85rem;
  color: var(--danger);
  min-height: 1.2em;
  line-height: 1.4;
}

.auth-alt {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════
   APP VIEW
   ═══════════════════════════════════════════════════════ */
.app-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.app-view-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Header ─── */
.app-header {
  position: relative;
  z-index: 10;
  padding: 1.5rem 0 0;
  margin-bottom: 0.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  background: rgba(20, 16, 12, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px var(--accent-glow);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--accent);
}

/* ─── Header User ─── */
.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-greeting {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: none;
}

@media (min-width: 600px) {
  .header-greeting {
    display: block;
  }
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 0 12px var(--accent-glow);
}

.btn-logout {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
}

.btn-logout:hover {
  color: var(--danger);
}

.logout-label {
  display: none;
  font-size: 0.8rem;
}

@media (min-width: 600px) {
  .logout-label {
    display: inline;
  }
}

/* ═══════════════════════════════════════════════════════
   BUTTONS (shared)
   ═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--text-inverse);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow), var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid transparent;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
  padding: 0.8rem;
}

.btn-link {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: inherit;
  color: var(--accent-light);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.btn-link:hover {
  color: var(--accent);
}

.btn-collapse {
  padding: 0.4rem;
  transition: transform 0.3s var(--ease-out);
}

.btn-collapse.collapsed {
  transform: rotate(180deg);
}

.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-inverse);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════
   FORM ELEMENTS (shared)
   ═══════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 1rem;
}

.auth-form .form-group {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-input:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ═══════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════ */
.main {
  position: relative;
  z-index: 1;
  padding: 1rem 0 3rem;
}

/* ─── Stats Bar ─── */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  animation: fadeUp 0.8s var(--ease-out-expo) 0.1s forwards;
  opacity: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

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

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-medium);
}

/* ─── Divider ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 2.5rem;
  opacity: 0.4;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-medium), transparent);
}

.divider-ornament {
  color: var(--accent);
  font-size: 0.8rem;
  opacity: 0.6;
  font-family: var(--font-display);
}

/* ─── Section Header ─── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

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

.section-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
}

/* ═══════════════════════════════════════════════════════
   THOUGHT FORM
   ═══════════════════════════════════════════════════════ */
.thought-form-section {
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.2s forwards;
}

.thought-form-wrap {
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out-expo), opacity 0.3s var(--ease-out);
  max-height: 600px;
  opacity: 1;
}

.thought-form-wrap.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.thought-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.thought-form:focus-within {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.thought-form .form-group {
  margin-bottom: 1.25rem;
}

.form-textarea {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  outline: none;
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-textarea:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-hint kbd {
  display: inline-block;
  padding: 0.1em 0.5em;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.form-actions {
  display: flex;
  gap: 0.5rem;
}

/* ═══════════════════════════════════════════════════════
   FEED SECTION
   ═══════════════════════════════════════════════════════ */
.feed-section {
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.25s forwards;
}

/* ─── Feed Tabs ─── */
.feed-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.3rem;
  margin-bottom: 1.75rem;
  width: fit-content;
}

.feed-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.feed-tab svg {
  opacity: 0.5;
  transition: opacity 0.3s var(--ease-out);
}

.feed-tab.active {
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.feed-tab.active svg {
  opacity: 1;
}

.feed-tab:hover:not(.active) {
  color: var(--text-secondary);
}

.feed-tab:hover:not(.active) svg {
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════
   THOUGHTS GRID
   ═══════════════════════════════════════════════════════ */
.thoughts-section {
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.3s forwards;
}

.thoughts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

/* ─── Thought Card ─── */
.thought-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.5rem 1.25rem;
  cursor: default;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  flex-direction: column;
}

.thought-card--clickable {
  cursor: pointer;
}

.thought-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.thought-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.thought-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.thought-card:hover::before {
  opacity: 1;
}

.thought-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.thought-card-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.5em;
  box-shadow: 0 0 8px var(--accent-glow);
}

.thought-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  flex: 1;
}

.thought-card-content {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.thought-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.thought-card-footer-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.thought-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* ─── Card footer actions (like, comment) ─── */
.card-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.05rem;
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.card-action-btn:hover {
  background: var(--bg-surface);
  color: var(--accent-light);
}

.card-action-btn:hover svg {
  transform: scale(1.15);
}

.card-action-btn svg {
  transition: transform 0.2s var(--ease-spring);
}

/* Like heart turns pink on hover / active */
.card-action-btn:first-child:hover {
  color: #e85d75;
  background: rgba(232, 93, 117, 0.08);
}

.card-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: auto;
  padding: 0 0.5rem;
  border-radius: 100px;
}

.card-like-btn .like-icon {
  transition: transform 0.2s var(--ease-spring);
}

.card-like-btn:hover .like-icon {
  transform: scale(1.2);
}

.card-like-btn.liked {
  color: #e85d75;
}

.card-like-btn.liked .like-icon {
  fill: #e85d75 !important;
  stroke: #e85d75 !important;
}

.card-like-btn.liked:hover {
  background: rgba(232, 93, 117, 0.12);
}

.like-count {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 1.5ch;
}

/* ─── "you" tag on own posts in global feed ─── */
.thought-card-author-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

.thought-card-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}

.thought-card:hover .thought-card-actions {
  opacity: 1;
}

.thought-card-actions .btn {
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
}

/* ─── Author Pill ─── */
.thought-card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent-glow);
}

.author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.author-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-username {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.author-username::before {
  content: '@';
}

/* ═══════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  animation: fadeUp 0.8s var(--ease-out-expo) 0.4s forwards;
  opacity: 0;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  line-height: 1;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 360px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   ERROR STATE
   ═══════════════════════════════════════════════════════ */
.error-state {
  text-align: center;
  padding: 4rem 2rem;
  border: 1px dashed var(--danger-dim);
  border-radius: var(--radius-lg);
  animation: fadeUp 0.8s var(--ease-out-expo) 0.4s forwards;
  opacity: 0;
}

.error-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
  line-height: 1;
}

.error-state-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--danger);
  margin-bottom: 0.5rem;
}

.error-state-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 360px;
  margin: 0 auto 1.5rem;
}

/* ═══════════════════════════════════════════════════════
   SKELETON LOADER
   ═══════════════════════════════════════════════════════ */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 200px;
}

.skeleton-line {
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 0.75rem;
}

.skeleton-line--short {
  width: 60%;
}

.skeleton-line--long {
  width: 100%;
}

.skeleton-line--medium {
  width: 80%;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ═══════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 9, 7, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.35s var(--ease-out-expo);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.modal-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-body strong {
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.75rem;
}

/* ═══════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.3rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toastIn 0.4s var(--ease-spring);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 280px;
  max-width: 420px;
}

.toast.success {
  border-color: var(--success);
  box-shadow: 0 0 20px var(--success-dim);
}

.toast.error {
  border-color: var(--danger);
  box-shadow: 0 0 20px var(--danger-dim);
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-removing {
  animation: toastOut 0.3s var(--ease-out) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 0;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 1;
    transform: translateX(40px) scale(0.95);
  }
}

/* ═══════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS (shared)
   ═══════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════
   ORNAMENTAL BORDER
   ═══════════════════════════════════════════════════════ */
.ornamental-border {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  opacity: 0.4;
}

.ornamental-border .line {
  width: 40px;
  height: 1px;
  background: var(--border-medium);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Comprehensive
   ═══════════════════════════════════════════════════════ */

/* ── Tablet & smaller laptops ── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 2rem 1.5rem 0; text-align: center; }
  .hero-subtitle { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .hero-visual { min-height: 260px; order: -1; }
  .hero-title { font-size: 2.6rem; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Phone landscape & large phones ── */
@media (max-width: 768px) {
  .app-view-inner, .public-feed-section, .features { padding: 0 1rem; }
  .landing-nav-inner { padding: 0.6rem 1rem; margin: 0 0.75rem; border-radius: 100px; }
  .app-header { padding: 0.75rem 0 0; }
  .header-inner { padding: 0.55rem 1rem; border-radius: var(--radius-lg); }
  .main { padding: 0.75rem 0 2rem; }
  .logo-text { font-size: 1rem; }
  .section-title { font-size: 1.25rem; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .dashboard-welcome-title { font-size: 1.4rem; }
  .hero { padding: 1.5rem 1rem 0; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-bar { padding: 0.85rem 1rem; gap: 0.75rem; }
  .stat-number { font-size: 1.3rem; }
  .thoughts-grid { grid-template-columns: 1fr; }
  .thought-card { padding: 1.1rem 1.1rem 1rem; }
  .thought-card-actions { opacity: 1; }
  .feed-tabs { width: 100%; justify-content: center; }
  .feed-tab { flex: 1; justify-content: center; padding: 0.5rem 0.6rem; font-size: 0.78rem; }
  .feed-tab svg { width: 14px; height: 14px; }
  .thought-form { padding: 1.1rem; }
  .form-footer { flex-direction: column; align-items: stretch; }
  .form-actions { flex-direction: row; }
  .form-hint { display: none; }
  .auth-card { padding: 2rem 1.25rem; }
  .auth-container { padding: 1rem; }
  .toast-container { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; }
  .toast { min-width: auto; max-width: none; font-size: 0.85rem; }
  .dashboard-welcome { padding: 1.5rem 0 0.75rem; }
  .landing-footer { padding: 0 1rem 1.5rem; }
  .landing-footer-text { font-size: 0.72rem; }
  .features { padding: 0 1rem 2rem; }
  .feature-card { padding: 1.5rem 1.25rem; }
  .empty-state { padding: 2.5rem 1rem; }
  .empty-state-icon { font-size: 2.5rem; }
  .empty-state-title { font-size: 1.2rem; }
  .skeleton-card { height: 160px; padding: 1.1rem; }
}

/* ── Small phones ── */
@media (max-width: 480px) {
  .landing-nav-inner { padding: 0.45rem 0.8rem; margin: 0 0.5rem; }
  .landing-nav-actions .btn { padding: 0.3rem 0.6rem; font-size: 0.7rem; }
  .bottom-tabs { padding: 0.25rem 0.5rem; padding-bottom: 0.25rem; padding-bottom: calc(0.25rem + env(safe-area-inset-bottom)); width: calc(100% - 1.25rem); max-width: 340px; gap: 0.1rem; }
  .bottom-tab { padding: 0.25rem 0.6rem; min-width: 54px; }
  .bottom-tab svg { width: 18px; height: 18px; }
  .bottom-tab-label { font-size: 0.5rem; }
  .bottom-tab.active::after { bottom: 0.15rem; }
  .bottom-tab:not(.active)::after { bottom: 0.15rem; }
  .app-view { padding-bottom: 3.8rem; }
  .hero-title { font-size: 1.6rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-badge { font-size: 0.7rem; padding: 0.25rem 0.75rem; }
  .stats-bar { gap: 0.5rem; padding: 0.7rem 0.75rem; }
  .stat-divider { height: 20px; }
  .stat-number { font-size: 1.1rem; }
  .section-title { font-size: 1.1rem; }
  .section-count { font-size: 0.75rem; padding: 0.2rem 0.7rem; }
  .auth-card { padding: 1.25rem 1rem; border-radius: var(--radius-lg); }
  .auth-logo-text { font-size: 1.3rem; }
  .auth-tab { font-size: 0.78rem; padding: 0.5rem 0.75rem; }
  .modal { padding: 1.25rem; border-radius: var(--radius-md); }
  .thought-card { padding: 0.9rem; }
  .thought-card-footer { flex-wrap: wrap; gap: 0.3rem; }
  .thought-card-title { font-size: 1rem; }
  .thought-card-content { font-size: 0.85rem; -webkit-line-clamp: 3; }
  .author-avatar { width: 24px; height: 24px; font-size: 0.6rem; }
  .card-action-btn { width: auto; height: 32px; padding: 0 0.4rem; gap: 0.2rem; }
  .card-action-btn svg { width: 15px; height: 15px; }
  .card-like-btn { width: auto; padding: 0 0.4rem; }
  .like-count { font-size: 0.7rem; }
  .author-name { font-size: 0.78rem; }
  .author-username { font-size: 0.68rem; }
  .form-input, .form-textarea { padding: 0.7rem 0.85rem; font-size: 0.9rem; }
  .form-textarea { min-height: 90px; }
  .btn { padding: 0.55rem 1rem; font-size: 0.82rem; }
  .feature-card { padding: 1.25rem; }
  .feature-icon { font-size: 1.7rem; }
  .feature-title { font-size: 1rem; }
  .feature-text { font-size: 0.82rem; }
  .toast { padding: 0.7rem 1rem; font-size: 0.8rem; }
}

/* ═══════════════════════════════════════════════════════
   OTP SECTION
   ═══════════════════════════════════════════════════════ */
.otp-section {
  margin-top: 0.5rem;
}

.otp-section .divider {
  margin: 0.75rem 0 1rem;
}

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

.otp-input-row .form-input {
  flex: 1;
  letter-spacing: 0.2em;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  text-align: center;
}

.btn-otp {
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.otp-status {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.4rem;
  min-height: 1.2em;
}

.otp-status.success {
  color: var(--success);
}

.otp-status.error {
  color: var(--danger);
}

.otp-status.info {
  color: var(--accent-light);
}

/* ═══════════════════════════════════════════════════════
   FORGOT PASSWORD — Steps
   ═══════════════════════════════════════════════════════ */
.fp-step { animation: formSlideIn 0.4s var(--ease-out-expo); }
.fp-step-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.4rem;
}
.fp-step-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.fp-step-desc strong { color: var(--text-secondary); }
.fp-otp-input {
  letter-spacing: 0.3em;
  font-family: var(--font-mono);
  font-size: 1.5rem !important;
  text-align: center;
  padding: 1rem !important;
}
.fp-timer {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* ── Password input with eye inside ── */
.pw-input-wrap {
  position: relative;
  width: 100%;
}
.pw-input-wrap .form-input {
  width: 100%;
  padding-right: 2.8rem;
}
.btn-pw-eye {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s var(--ease-out);
  padding: 0;
  line-height: 1;
}
.btn-pw-eye:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* ── Forgot password's password row ── */
.password-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.password-row .form-input { flex: 1; }
.btn-pw-toggle {
  padding: 0.5rem !important;
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0;
  border-radius: var(--radius-sm) !important;
}

/* ── Password strength ── */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.pw-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-deep);
  border-radius: 2px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}
.pw-strength-fill.weak { width: 25%; background: var(--danger); }
.pw-strength-fill.medium { width: 50%; background: #d4943a; }
.pw-strength-fill.strong { width: 75%; background: #5ab46a; }
.pw-strength-fill.very-strong { width: 100%; background: var(--success); }
.pw-strength-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 4ch;
}

/* ── Password requirements ── */
.pw-requirements {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.6rem;
}
.pw-requirements li {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}
.pw-requirements li::before {
  content: '○';
  font-size: 0.6rem;
}
.pw-requirements li.met {
  color: var(--success);
}
.pw-requirements li.met::before {
  content: '●';
}

/* ─── Focus visible ─── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Selection ─── */
::selection {
  background: var(--accent);
  color: var(--text-inverse);
}

/* ═══════════════════════════════════════════════════════
   BOTTOM TAB BAR — Floating Glass Pill
   ═══════════════════════════════════════════════════════ */
.bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin: 0 auto;
  /* ── Stretched pill container (mobile default) ── */
  width: calc(100% - 2.5rem);
  max-width: 380px;
  padding: 0.35rem 0.6rem;
  padding-bottom: 0.35rem;
  padding-bottom: calc(0.35rem + env(safe-area-inset-bottom));
  /* ── Glass materials ── */
  background: rgba(16, 13, 10, 0.55);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(212, 148, 58, 0.08);
  border-top: 1px solid rgba(212, 148, 58, 0.10);
  border-radius: 999px;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  /* ── Entrance animation ── */
  animation: bottomTabsSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: bottom center;
}

/* Wider bar on tablets and desktops — mobile (<=480px) keeps its own compact size */
@media (min-width: 481px) {
  .bottom-tabs {
    width: calc(100% - 4rem);
    max-width: 720px;
    padding: 0.55rem 1rem;
    padding-bottom: 0.55rem;
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom));
    gap: 0.6rem;
  }
  .bottom-tab {
    padding: 0.4rem 2rem;
    gap: 0.08rem;
  }
  .bottom-tab svg {
    width: 24px;
    height: 24px;
  }
  .bottom-tab-label {
    font-size: 0.65rem;
  }
}

@keyframes bottomTabsSlideUp {
  0% {
    opacity: 0;
    transform: translateY(100%) scale(0.92);
    filter: blur(4px);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.bottom-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.3rem 1.25rem;
  min-width: 64px;
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 32px;
  color: rgba(255, 255, 255, 0.30);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bottom-tab:hover {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.04);
}

.bottom-tab.active {
  color: var(--accent-light);
  background: rgba(212, 148, 58, 0.10);
}

.bottom-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.bottom-tab:not(.active)::after {
  content: '';
  position: absolute;
  bottom: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
}

.bottom-tab svg {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 1px transparent);
}

.bottom-tab.active svg {
  transform: scale(1.08);
  filter: drop-shadow(0 0 8px rgba(212, 148, 58, 0.25));
}

.bottom-tab-label {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.75;
  transition: opacity 0.25s ease;
}

.bottom-tab.active .bottom-tab-label {
  opacity: 1;
}

/* Add bottom padding so content isn't hidden behind tabs */
.app-view {
  padding-bottom: 4.5rem;
}
