:root {
  --page: #f2f2f6;
  --surface: #ffffff;
  --text: #000000;
  --text-secondary: #4b5565;
  --text-tertiary: #9aa4b2;
  --divider: #cdd5df;
  --line: #e3e8ef;
  --bubble: #eef2f6;
  --gem-top: #36bffa;
  --gem-bottom: #0087c9;
  --gem-card: #49c2fd;
  --gem-button: #32b1f6;
  --claim: #4ac2fc;
  --boost-top: #e378fa;
  --boost-bottom: #ba24d6;
  --super-top: #8099fa;
  --super-bottom: #454de8;
  --cta-top: #fa9652;
  --cta-bottom: #e65466;
  --accent: #ff6688;
  --accent-end: #ff964c;
  --subscription: #fc6883;
  --online: #17b26a;
  --radius-card: 20px;
  --shadow: 0 10px 30px rgba(18, 25, 38, 0.08);
  --font: "Avenir Next", "Avenir", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; }

/* Site header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-brand img.icon { width: 32px; height: 32px; border-radius: 9px; }
.site-brand img.wordmark { height: 22px; width: auto; }

.site-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.site-nav a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
}
.site-nav a:hover { background: var(--surface); color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--text); color: #fff; }

/* Phone mock */

.mock-wrap { display: flex; justify-content: center; padding: 8px 16px 32px; }

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  height: min(820px, calc(100dvh - 90px));
  min-height: 640px;
  background: var(--surface);
  border-radius: 40px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.app-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 8px 16px 0;
  flex-shrink: 0;
}

.app-title { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.app-actions { display: flex; align-items: center; gap: 8px; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.boost-button {
  width: 36px;
  height: 36px;
  background: linear-gradient(180deg, var(--boost-top), var(--boost-bottom));
  box-shadow: inset 0 0 0 2px #fff;
}
.boost-button img { width: 24px; height: 24px; }

.gem-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 40px;
  background: linear-gradient(180deg, var(--gem-top), var(--gem-bottom));
  box-shadow: inset 0 0 0 2px #fff;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.gem-pill img { width: 25px; height: 25px; }
.gem-pill .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d92d20;
  box-shadow: 0 0 0 2px #fff;
}

.app-body { position: relative; flex: 1; min-height: 0; }
.app-body.scroll { overflow-y: auto; }

/* Tab bar (icon-only, like the app) */

.tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-shrink: 0;
  height: 64px;
  padding-bottom: 6px;
  background: var(--surface);
}

.tab { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--text-tertiary); }
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--text); }

/* Toast */

.toast {
  position: absolute;
  left: 50%;
  top: 72px;
  transform: translate(-50%, -12px);
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Reward overlay (same as the in-app gem reward animation) */

.reward-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.reward-overlay.visible { opacity: 1; pointer-events: auto; }
.reward-overlay .sunburst {
  position: absolute;
  width: 400px;
  height: 400px;
  max-width: none;
  animation: spin 12s linear infinite;
  opacity: 0.9;
}
.reward-overlay .sunburst.reverse { animation-direction: reverse; animation-duration: 18s; }
.reward-overlay .gem { position: relative; font-size: 54px; line-height: 1.1; }
.reward-overlay .amount { position: relative; font-size: 34px; font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Buttons shared by mocks */

.gradient-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cta-top), var(--cta-bottom));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.gradient-button[disabled] { background: linear-gradient(180deg, #edf2f5, #e3e8f0); color: var(--text-tertiary); cursor: default; }

/* Content directory (crawlable section) */

.directory {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 56px;
}

.directory > header { margin-bottom: 28px; }
.directory h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 14px; }
.directory h2 { font-size: 22px; letter-spacing: -0.01em; margin: 36px 0 14px; }
.directory p { margin-bottom: 12px; color: #202939; }
.directory p strong { color: var(--text); }

.classification {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
  list-style: none;
}
.classification li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

.entries { display: grid; gap: 12px; }

.entry {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}
.entry .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bubble); }
.entry .entry-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex-shrink: 0;
  background: var(--bubble);
  font-size: 28px;
}
.entry .entry-icon img { width: 48px; height: 48px; }
.entry h3 { font-size: 18px; margin-bottom: 6px; }
.entry p { margin-bottom: 6px; }
.entry .meta { color: var(--text-secondary); font-size: 14px; }
.entry .tags { color: var(--gem-bottom); font-weight: 600; font-size: 14px; margin: 0; }

.screen-links { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.screen-link {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.screen-link:hover { border-color: var(--text); transform: translateY(-2px); }
.screen-link h3 { font-size: 18px; margin-bottom: 6px; }
.screen-link p { color: var(--text-secondary); font-size: 15px; margin: 0; }

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 14px;
}
.site-footer a { color: var(--text-secondary); }

@media (max-width: 480px) {
  .site-header { padding: 12px 16px; gap: 10px; }
  .site-brand img.wordmark { display: none; }
  .site-nav { flex-wrap: nowrap; gap: 2px; }
  .site-nav a { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
  .mock-wrap { padding: 0 0 24px; }
  .phone { border-radius: 0; border-left: 0; border-right: 0; min-height: 600px; height: calc(100dvh - 56px); box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reward-overlay .sunburst { animation: none; }
}
