* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

:root {
  --bg: #080b14;
  --panel: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.58);
  --accent1: #22d3ee;
  --accent2: #3b82f6;
  --me: #06b6d4;
  --them: rgba(255, 255, 255, 0.1);
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body.core-mode {
  --bg: radial-gradient(circle at top left, #172554, #020617 45%, #020617);
  --accent1: #22d3ee;
  --accent2: #3b82f6;
  --me: #0891b2;
}

body.pulse-mode {
  --bg: radial-gradient(circle at top left, #831843, #2e1065 45%, #020617);
  --accent1: #f472b6;
  --accent2: #fb923c;
  --me: #ec4899;
}

body.neon-mode {
  --bg: radial-gradient(circle at top left, #064e3b, #020617 45%, #000000);
  --accent1: #5eead4;
  --accent2: #22c55e;
  --me: #34d399;
}

body.cozy-mode {
  --bg: radial-gradient(circle at top left, #78350f, #431407 45%, #120a05);
  --accent1: #fcd34d;
  --accent2: #fb7185;
  --me: #f59e0b;
}

body.velocity-mode {
  --bg: radial-gradient(circle at top left, #111827, #020617 55%, #000000);
  --panel: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --accent1: #60a5fa;
  --accent2: #a855f7;
  --me: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.nav {
  max-width: 1200px;
  margin: auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 24px;
  font-weight: 900;
}

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

.nav-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav-btn,
.primary-btn,
.secondary-btn,
.danger-btn {
  border: none;
  cursor: pointer;
  border-radius: 18px;
  padding: 13px 20px;
  font-weight: 800;
  display: inline-block;
}

.primary-btn {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #020617;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.danger-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.full {
  width: 100%;
  text-align: center;
}

.hero {
  max-width: 1200px;
  margin: auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.tag {
  color: var(--accent1);
  font-weight: 800;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(46px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -4px;
  margin-bottom: 24px;
}

.sub {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Navbar scroll effect */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

/* 3D Globe section */
.globe-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#globe-canvas canvas {
  display: block;
}

.globe-overlay {
  position: relative;
  z-index: 2;
  max-width: 560px;
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
}

.globe-overlay h2 {
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -2px;
  margin: 10px 0 14px;
  text-shadow: 0 4px 30px rgba(2, 6, 23, 0.8);
}

.globe-sub {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  text-shadow: 0 2px 20px rgba(2, 6, 23, 0.9);
}

/* Privacy policy layout */
.privacy-content {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.privacy-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 30px;
}

.privacy-block h2 {
  font-size: 22px;
  margin: 0 0 14px;
  color: var(--accent1);
}

.privacy-block h3 {
  font-size: 16px;
  margin: 18px 0 6px;
  color: #e2e8f0;
}

.privacy-block p,
.privacy-block li {
  color: var(--muted);
  line-height: 1.7;
}

.privacy-block ul {
  margin: 8px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.last-updated {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 18px;
}

.intro {
  font-size: 17px;
  line-height: 1.7;
}

.nav.scrolled {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent1);
}

.nav-btn {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #020617;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-card,
.panel,
.auth-card,
.tutorial-card {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.hero-card {
  padding: 24px;
}

.chat-preview {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #020617;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
}

.bubble {
  max-width: 80%;
  padding: 14px 16px;
  border-radius: 22px;
}

.bubble.left {
  background: rgba(255, 255, 255, 0.1);
}

.bubble.right {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #020617;
  align-self: flex-end;
  font-weight: 700;
}

.section {
  max-width: 1200px;
  margin: auto;
  padding: 70px 24px;
}

.section h2 {
  font-size: 42px;
  margin-bottom: 10px;
}

.section-sub,
.muted {
  color: var(--muted);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.mode-card,
.feature-list p {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 22px;
  border-radius: 24px;
}

.mode-card h3 {
  margin-bottom: 8px;
}

.mode-card.pulse {
  background: rgba(236, 72, 153, 0.13);
}

.mode-card.neon {
  background: rgba(16, 185, 129, 0.13);
}

.mode-card.cozy {
  background: rgba(245, 158, 11, 0.13);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.split p {
  color: var(--muted);
  line-height: 1.7;
}

.feature-list {
  display: grid;
  gap: 12px;
}

footer {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent1);
  font-weight: 700;
}

.hero-illustration {
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.65);
}

.about-section {
  padding-top: 30px;
}

.about-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.about-card h2,
.about-card h1 {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 16px;
}

.about-card p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

.eyebrow {
  display: inline-block;
  color: var(--accent1);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.creator-line {
  color: var(--text) !important;
  font-weight: 700;
  margin-top: 16px;
}

.about-page {
  padding: 24px;
}

.about-grid {
  display: grid;
  gap: 18px;
  max-width: 1000px;
  margin: 28px auto 0;
}

.about-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
}

.about-panel h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.about-panel ul {
  color: var(--muted);
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.privacy-note {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 16px;
  color: var(--muted);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top left, #172554, #020617 55%);
}

.auth-card {
  width: min(460px, 100%);
  padding: 30px;
}

.auth-card h1 {
  font-size: 34px;
  margin: 18px 0 8px;
}

.auth-card p {
  color: var(--muted);
  margin-bottom: 20px;
}

.auth-card input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: white;
  padding: 15px;
  border-radius: 16px;
  outline: none;
  margin-bottom: 12px;
}

.back-link {
  color: var(--accent1);
  font-weight: 800;
}

.small-text {
  font-size: 13px;
  margin-top: 16px;
}

.app-page {
  background: var(--bg);
  padding: 22px;
}

.app-header {
  max-width: 1400px;
  margin: auto auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.app-header h1 {
  font-size: 34px;
}

.app-header p {
  color: var(--muted);
}

.mode-switcher {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.mode-btn {
  padding: 11px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
}

.mode-btn.active {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #020617;
  font-weight: 900;
}

.app-layout {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 18px;
}

.panel {
  padding: 18px;
}

.panel .secondary-btn + .danger-btn {
  margin-top: 10px;
}

.sidebar-title,
.chat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
}

.search-input {
  width: 100%;
  margin: 16px 0;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: white;
  padding: 13px;
  border-radius: 16px;
  outline: none;
}

.chat-list {
  display: grid;
  gap: 10px;
}

.chat-item {
  width: 100%;
  text-align: left;
  border: none;
  padding: 12px;
  border-radius: 18px;
  background: transparent;
  color: white;
  display: flex;
  gap: 12px;
  cursor: pointer;
}

.chat-item:hover,
.chat-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #020617;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.chat-info {
  min-width: 0;
}

.chat-info strong,
.chat-info span {
  display: block;
}

.chat-info span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-panel {
  min-height: 690px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.chat-top {
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.chat-top p {
  color: var(--muted);
  font-size: 14px;
}

.message-area {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message-row {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.message-row.me {
  align-self: flex-end;
  text-align: right;
}

.message-row.them {
  align-self: flex-start;
}

.message {
  padding: 13px 16px;
  border-radius: 22px;
  line-height: 1.4;
}

.message-row.me .message {
  background: var(--me);
  color: white;
  border-top-right-radius: 6px;
}

.neon-mode .message-row.me .message,
.cozy-mode .message-row.me .message {
  color: #020617;
  font-weight: 700;
}

.message-row.them .message {
  background: var(--them);
  border-top-left-radius: 6px;
}

.message-time {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  margin-top: 5px;
}

.message-input-wrap {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
}

.message-input-wrap input {
  flex: 1;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: white;
  padding: 14px;
  border-radius: 18px;
  outline: none;
}

.send-btn {
  border: none;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #020617;
  font-weight: 900;
  padding: 14px 18px;
  border-radius: 18px;
  cursor: pointer;
}

.rightbar {
  display: grid;
  gap: 18px;
}

.current-mode-card {
  margin-top: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #020617;
}

.community-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.community-list button {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 13px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.community-list span {
  color: var(--accent1);
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.tutorial-card {
  width: min(480px, 100%);
  padding: 28px;
}

.tutorial-card h1 {
  font-size: 32px;
  margin-bottom: 12px;
}

.tutorial-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
}

/* PROFILE PAGE + DISCOVER PAGE */

.profile-page,
.discover-page {
  max-width: 1200px;
  margin: auto;
  padding: 30px 20px;
}

.profile-card {
  max-width: 760px;
  margin: auto;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0 30px;
}

.big-avatar {
  width: 100px;
  height: 100px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 900;
  color: #020617;
}

.profile-top h1 {
  font-size: 42px;
}

.profile-top p {
  color: var(--muted);
}

.profile-section {
  margin-bottom: 30px;
}

.profile-section h2,
.discover-section h2 {
  margin-bottom: 14px;
}

.profile-section textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: white;
  padding: 18px;
  resize: vertical;
  outline: none;
}

.theme-grid,
.stats-grid,
.discover-grid {
  display: grid;
  gap: 16px;
}

.theme-grid {
  grid-template-columns: repeat(4, 1fr);
}

.theme-option {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: white;
  padding: 16px;
  border-radius: 18px;
  cursor: pointer;
}

.stats-grid {
  grid-template-columns: repeat(3, 1fr);
}

.stat-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 22px;
  text-align: center;
}

.stat-box strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-box span {
  color: var(--muted);
}

.discover-header {
  margin-bottom: 40px;
}

.discover-header h1 {
  font-size: 56px;
  margin: 16px 0 8px;
}

.discover-header p {
  color: var(--muted);
}

.discover-section {
  margin-bottom: 60px;
}

.discover-grid {
  grid-template-columns: repeat(3, 1fr);
}

.discover-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 28px;
}

.discover-card h3 {
  margin-bottom: 10px;
}

.discover-card p {
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.discover-card.pulse {
  background: rgba(236, 72, 153, 0.13);
}

.discover-card.neon {
  background: rgba(16, 185, 129, 0.13);
}

.discover-card.cozy {
  background: rgba(245, 158, 11, 0.13);
}

/* VELOCITY MODE */

body.velocity-mode .panel,
body.velocity-mode .chat-panel,
body.velocity-mode .sidebar,
body.velocity-mode .discover-card,
body.velocity-mode .theme-option,
body.velocity-mode .stat-box {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(26px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 8px 40px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

body.velocity-mode .chat-item {
  transition: all 0.25s ease;
  border-radius: 22px;
}

body.velocity-mode .chat-item:hover,
body.velocity-mode .chat-item.active {
  transform: translateX(6px);
  background: rgba(255,255,255,0.12);
}

body.velocity-mode .chat-avatar,
body.velocity-mode .avatar,
body.velocity-mode .big-avatar {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 0 22px rgba(139,92,246,0.55);
}

body.velocity-mode .message-row.me .message {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  border-radius: 28px;
  border-top-right-radius: 10px;
  box-shadow: 0 10px 28px rgba(59,130,246,0.35);
  animation: velocityFloat 3s ease-in-out infinite;
}

body.velocity-mode .message-row.them .message {
  background: rgba(255,255,255,0.08);
  border-radius: 28px;
  border-top-left-radius: 10px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(255,255,255,0.05);
}

body.velocity-mode .send-btn,
body.velocity-mode .primary-btn {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 0 22px rgba(139,92,246,0.45);
  transition: all 0.25s ease;
}

body.velocity-mode .send-btn:hover,
body.velocity-mode .primary-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(139,92,246,0.75);
}

body.velocity-mode .message-input-wrap input,
body.velocity-mode .search-input,
body.velocity-mode .auth-card input,
body.velocity-mode textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.25s ease;
}

body.velocity-mode .message-input-wrap input:focus,
body.velocity-mode .search-input:focus,
body.velocity-mode .auth-card input:focus,
body.velocity-mode textarea:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 20px rgba(139,92,246,0.35);
}

body.velocity-mode .mode-btn.active {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  border: none;
}

body.velocity-mode .current-mode-card {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 0 28px rgba(139,92,246,0.4);
}

body.velocity-mode .community-list button {
  background: rgba(255,255,255,0.06);
  transition: all 0.25s ease;
}

body.velocity-mode .community-list button:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.1);
}

body.velocity-mode .tutorial-card,
body.velocity-mode .hero-card,
body.velocity-mode .auth-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(26px);
}

body.velocity-mode .bubble.right {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
}

body.velocity-mode .bubble.left {
  background: rgba(255,255,255,0.08);
}

@keyframes velocityFloat {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-2px);
  }

  100% {
    transform: translateY(0px);
  }
}

@media (max-width: 1000px) {
  .hero,
  .split,
  .app-layout {
    grid-template-columns: 1fr;
  }

  .mode-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rightbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .discover-grid,
  .stats-grid,
  .theme-grid {
    grid-template-columns: 1fr;
  }

  .profile-top {
    flex-direction: column;
    text-align: center;
  }

  .discover-header h1 {
    font-size: 42px;
  }
}

@media (max-width: 650px) {
  .nav,
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 45px;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .app-page {
    padding: 12px;
  }

  .message-row {
    max-width: 88%;
  }
}