:root {
  --blue: #1565C0;
  --blue-light: #1976D2;
  --blue-dark: #0D47A1;
  --orange: #FF6D00;
  --orange-light: #FF8F00;
  --bg: #F0F4FF;
  --surface: #FFFFFF;
  --surface2: #EEF2FF;
  --text: #0D1B2A;
  --text-muted: #546E7A;
  --border: #CFD8DC;
  --teal: #00897B;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== APP LAYOUT ===== */
.app-layout {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.left-sidebar,
.right-sidebar {
  display: none;
}

.content-column {
  min-width: 0;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 2;
}

.load-more-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 24px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}

.load-more-btn:hover {
  background: var(--blue-light);
  box-shadow: 0 6px 20px rgba(21, 101, 192, 0.35);
}

.load-more-btn:active {
  transform: scale(0.97);
}

.load-more-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (min-width: 1024px) {
  .load-more-wrap {
    padding-bottom: 32px;
  }
}

@media (min-width: 768px) {
  .app-layout {
    padding: 20px;
    padding-bottom: 40px;
  }
}

@media (min-width: 1024px) {
  .app-layout {
    grid-template-columns: 240px minmax(0, 700px);
    gap: 24px;
    align-items: start;
    padding: 24px;
    padding-bottom: 40px;
  }
  .left-sidebar {
    display: block;
    position: sticky;
    top: 88px;
  }
  .bottom-nav {
    display: none !important;
  }
  .app-layout { padding-bottom: 24px; }
}

@media (min-width: 1280px) {
  .app-layout {
    grid-template-columns: 260px minmax(0, 720px) 320px;
    gap: 28px;
  }
  .right-sidebar {
    display: block;
    position: sticky;
    top: 88px;
  }
}

@media (min-width: 1600px) {
  .app-layout {
    max-width: 1500px;
    grid-template-columns: 280px minmax(0, 760px) 340px;
  }
}

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--surface);
  color: var(--text);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.top-bar-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.top-bar-logo {
  height: 32px;
  width: auto;
  border-radius: 6px;
  flex-shrink: 0;
}
.top-bar-brand h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  margin: 0;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-bar .back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface2);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.top-bar .back-btn:hover {
  background: var(--border);
  color: var(--blue-dark);
}
.top-bar .back-btn:active {
  transform: scale(0.94);
}
.back-btn-icon {
  width: 20px;
  height: 20px;
  display: block;
  margin-right: 1px;
}
html.dark-mode .top-bar .back-btn {
  color: #90CAF9;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { background: var(--border); }
.theme-toggle:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

@media (min-width: 1024px) {
  .top-bar {
    padding: 16px 32px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  }
}

/* ===== CARDS & COMPONENTS ===== */
.card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
@media (min-width: 1024px) {
  .card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .post-card:hover {
    transform: translateY(-2px);
  }
}

.card-header {
  display: flex; align-items: center; padding: 16px 20px 12px; gap: 12px;
}
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-placeholder {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; color: white;
}
.username { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px; color: var(--text); }
.meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 12px; }
.tag {
  padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
  background: var(--surface2); color: var(--blue);
}
.tag-pinned {
  background: #FFF3E0;
  color: #E65100;
}

.post-img {
  width: 100%; max-height: 400px; object-fit: cover; display: block;
}

.post-content { padding: 12px 20px; }
.post-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: clamp(16px, 1.5vw, 20px);
  margin-bottom: 8px; line-height: 1.4; color: var(--text);
}
.post-text {
  font-size: clamp(14px, 1.2vw, 15.5px);
  line-height: 1.6; color: var(--text-muted);
}
.post-text.collapsed {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.card-actions {
  display: flex; align-items: center; padding: 12px 20px; gap: 8px;
  border-top: 1px solid var(--border);
}
.action-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.action-btn:hover { background: var(--surface2); color: var(--blue); }

/* ===== SIDEBARS ===== */
.sidebar-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-title {
  font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700;
  margin-bottom: 16px; color: var(--text);
}
.sidebar-nav { display: flex; flex-direction: column; gap: 8px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text);
  transition: background 0.2s;
}
.sidebar-link:hover { background: var(--surface2); color: var(--blue); }
.trending-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; }
.trending-name { font-size: 14px; font-weight: 500; color: var(--text); }
.trending-count, .trending-meta { font-size: 12px; color: var(--text-muted); }

.cta-card { background: linear-gradient(135deg, #0D47A1, #1565C0); color: white; text-align: center; border: none; }
.cta-card .sidebar-title { color: white; margin-bottom: 8px; }
.cta-card .sidebar-text { font-size: 13px; color: rgba(255,255,255,0.9); margin-bottom: 16px; line-height: 1.5; }
.sidebar-cta {
  display: inline-block; background: white; color: var(--blue);
  padding: 10px 20px; border-radius: 20px; font-weight: 700; font-size: 14px;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); display: flex;
  border-top: 1px solid var(--border);
  z-index: 90; padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 8px; gap: 4px; color: var(--text-muted);
  font-size: 11px; font-weight: 600;
}
.nav-item.active { color: var(--blue); }
.nav-icon { font-size: 20px; }

/* TABS */
.tabs { display: flex; gap: 16px; padding: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--text-muted); padding-bottom: 8px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--text); border-bottom-color: var(--blue); }

.filter-bar { display: flex; gap: 8px; padding-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.chip { padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface); white-space: nowrap; }
.chip.active { background: var(--blue); color: white; border-color: var(--blue); }

/* Comments */
.comments-section { padding: 24px; }
.comment { display: flex; gap: 12px; margin-bottom: 16px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: white; flex-shrink: 0; }
.comment-bubble { background: var(--surface2); padding: 12px 16px; border-radius: 4px 16px 16px 16px; }
.comment-user { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px; margin-bottom: 4px; color: var(--text); }
.comment-text { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
/* ===== POST CARD CLICKABILITY ===== */
.post-card,
.card {
  position: relative;
}

.card-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.post-card :is(
  a:not(.card-link-overlay),
  button,
  input,
  select,
  textarea,
  .action-btn,
  .tag,
  .chip,
  .menu-btn,
  .dropdown,
  .interactive
) {
  position: relative;
  z-index: 2;
}

.post-card {
  cursor: pointer;
}

.post-card:hover {
  transform: translateY(-2px);
}

@media (hover: none) {
  .post-card:hover {
    transform: none;
  }
}

.card-link-overlay:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

/* ===== DARK MODE ===== */
html.dark-mode {
  --bg: #07111F;
  --surface: #0F1B2D;
  --surface2: #16243A;
  --text: #F8FAFC;
  --text-muted: #A7B4C6;
  --border: rgba(148, 163, 184, 0.22);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.35);
}

html.dark-mode .download-badge {
  color: #90CAF9;
}

html.dark-mode .tag-pinned {
  background: rgba(255, 109, 0, 0.18);
  color: #FFAB91;
}

html.dark-mode .nav-item.active {
  color: #90CAF9;
}

html.dark-mode .top-bar {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

html.dark-mode .knowledge-hubs-header {
  background:
    radial-gradient(circle at top right, rgba(25, 118, 210, 0.22), transparent 45%),
    radial-gradient(circle at bottom left, rgba(255, 109, 0, 0.14), transparent 40%),
    var(--surface2);
}

html.dark-mode .hub-topic-icon {
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.22), rgba(0, 137, 123, 0.18));
}

html.dark-mode .hub-topic-card:hover .hub-topic-chevron {
  color: #90CAF9;
}

body {
  transition: background-color 0.3s, color 0.3s;
}
.card, .top-bar, .sidebar-card, .bottom-nav, .hub-topic-card, .feature-card, .store-btn {
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

/* ===== SHARED PAGE UTILITIES ===== */
.page-hero-card {
  padding: 24px;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at top right, rgba(25, 118, 210, 0.10), transparent 50%),
    var(--surface);
}

html.dark-mode .page-hero-card {
  background:
    radial-gradient(circle at top right, rgba(25, 118, 210, 0.18), transparent 50%),
    var(--surface);
}

.page-hero-title {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.3;
}

.page-hero-title-sm {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 0;
}

.page-hero-text {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(21, 101, 192, 0.3);
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--blue-light);
}

.comments-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent 0%, var(--surface) 80%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 24px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* Make cards with onclick show hand cursor */
.card[onclick] {
  cursor: pointer;
}
.card[onclick]:hover {
  background-color: var(--surface2);
}

/* ===== KNOWLEDGE HUBS (TOPICS) ===== */
.knowledge-hubs-card {
  padding: 0;
  overflow: hidden;
}

.knowledge-hubs-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 20px;
  background:
    radial-gradient(circle at top right, rgba(25, 118, 210, 0.14), transparent 45%),
    radial-gradient(circle at bottom left, rgba(255, 109, 0, 0.10), transparent 40%),
    var(--surface2);
  border-bottom: 1px solid var(--border);
}

.knowledge-hubs-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}

.knowledge-hubs-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.2;
}

.knowledge-hubs-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 42ch;
}

.knowledge-hubs-count {
  margin-left: auto;
  align-self: flex-start;
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--surface);
  border: 1px solid var(--border);
}

html.dark-mode .knowledge-hubs-count {
  color: #90CAF9;
}

.knowledge-hubs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.hub-topic-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hub-topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: var(--shadow-soft);
  background: var(--surface2);
}

.hub-topic-card:active {
  transform: translateY(0);
}

.hub-topic-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.12), rgba(0, 137, 123, 0.12));
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.hub-topic-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hub-topic-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  line-height: 1.3;
}

.hub-topic-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.hub-topic-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}

.hub-topic-card:hover .hub-topic-chevron {
  color: var(--blue);
  transform: translateX(2px);
}

@media (min-width: 768px) {
  .knowledge-hubs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
  }
}

@media (hover: none) {
  .hub-topic-card:hover {
    transform: none;
  }
}

/* ===== DOWNLOAD PAGE ===== */
.download-page {
  background: var(--bg);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  position: relative;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.download-page::before,
.download-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.download-page::before {
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(21, 101, 192, 0.18) 0%, transparent 70%);
  animation: pulseGlow 8s infinite alternate;
}

.download-page::after {
  bottom: 10%;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 137, 123, 0.12) 0%, transparent 70%);
}

html.dark-mode .download-page::before {
  background: radial-gradient(circle, rgba(25, 118, 210, 0.28) 0%, transparent 70%);
}

html.dark-mode .download-page::after {
  background: radial-gradient(circle, rgba(0, 137, 123, 0.18) 0%, transparent 70%);
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(20px, 20px); }
}

.download-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
  padding: 60px 20px 100px;
  max-width: 1400px;
  margin: 0 auto;
}

.download-content {
  flex: 1;
  max-width: 600px;
  text-align: center;
  margin-bottom: 60px;
}

.download-hero {
  background:
    radial-gradient(circle at top left, rgba(25, 118, 210, 0.20), transparent 35%),
    radial-gradient(circle at bottom right, rgba(255, 109, 0, 0.14), transparent 35%),
    var(--bg);
  color: var(--text);
}

html.dark-mode .download-hero {
  background:
    radial-gradient(circle at top left, rgba(25, 118, 210, 0.28), transparent 35%),
    radial-gradient(circle at bottom right, rgba(255, 109, 0, 0.18), transparent 35%),
    var(--bg);
}

.download-badge {
  background: var(--surface2);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
}

.download-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 10px var(--blue-light);
}

.download-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html.dark-mode .download-hero h1 {
  background: linear-gradient(135deg, var(--text) 0%, #90CAF9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.download-hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 40px;
  font-weight: 300;
}

.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: center;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 28px;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  max-width: 280px;
}

.store-btn:hover {
  background: var(--surface2);
  transform: translateY(-4px);
  border-color: var(--blue);
  box-shadow: var(--shadow-soft);
}

.store-btn span {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-btn small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.store-btn strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.store-btn.ios .store-icon::before { content: ''; font-size: 32px; line-height: 1; }
.store-btn.android .store-icon { font-size: 28px; }

.mockup-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.phone-mockup {
  width: 300px;
  height: 600px;
  background: #0D1B2A;
  border: 10px solid #1A2634;
  border-radius: 40px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  transform: rotateY(-15deg) rotateX(5deg);
  transform-style: preserve-3d;
  animation: floatPhone 6s ease-in-out infinite;
  overflow: hidden;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 25px;
  background: #1A2634;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 20;
}

@keyframes floatPhone {
  0% { transform: translateY(0) rotateY(-15deg) rotateX(5deg); }
  50% { transform: translateY(-20px) rotateY(-12deg) rotateX(7deg); }
  100% { transform: translateY(0) rotateY(-15deg) rotateX(5deg); }
}

.download-features {
  padding: 60px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.feature-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-8px);
  background: var(--surface2);
  border-color: var(--blue);
}

.feature-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.2), rgba(0, 137, 123, 0.2));
  border: 1px solid var(--border);
}

.feature-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.download-layout .top-bar {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.download-layout .top-bar-brand h1 {
  color: var(--text) !important;
}

.download-layout .back-btn {
  background: var(--surface2);
  color: var(--blue);
}

html.dark-mode .download-layout .back-btn {
  color: #90CAF9;
}

.download-layout .back-btn:hover {
  background: var(--border);
}

.download-layout .theme-toggle {
  background: var(--surface2);
  border-color: var(--border);
}

.download-chrome {
  position: relative;
  z-index: 20;
}

@media (min-width: 480px) {
  .store-buttons { flex-direction: row; justify-content: center; }
}

@media (min-width: 768px) {
  .download-features {
    grid-template-columns: repeat(3, 1fr);
    padding: 80px 40px;
  }
}

@media (min-width: 1024px) {
  .download-page {
    padding-bottom: 0;
  }
  .download-container {
    flex-direction: row;
    justify-content: space-between;
    padding: 100px 40px;
    gap: 60px;
    align-items: center;
  }
  .download-content {
    text-align: left;
    margin-bottom: 0;
  }
  .store-buttons { justify-content: flex-start; }
  .download-layout .bottom-nav { display: none !important; }
}
