/* 99Pages - shadcn-ui Apple Style */

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

:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-muted: #f5f5f5;
  --border: #e5e5e5;
  --text: #0a0a0a;
  --text-secondary: #737373;
  --text-muted: #a3a3a3;
  --primary: #171717;
  --primary-hover: #262626;
  --blue: #2563eb;
  --green: #16a34a;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.15s;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.btn-ghost:hover { color: var(--text); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-outline:hover { background: var(--bg-muted); }

.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Hero */
.hero {
  padding: 96px 24px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Products */
.products {
  padding: 80px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.product-card {
  display: block;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s;
}

.product-card:hover {
  border-color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.product-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.product-badge {
  font-size: 12px;
  color: var(--text-muted);
}

.product-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.product-meta {
  display: flex;
  gap: 8px;
}

.product-meta span {
  font-size: 12px;
  padding: 2px 8px;
  background: var(--bg-muted);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Social */
.social {
  padding: 80px 0;
}

.social-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.composer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.composer input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.composer input:focus { border-color: var(--text-muted); }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.post {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post-meta {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta .name {
  font-size: 14px;
  font-weight: 600;
}

.post-meta .handle {
  font-size: 13px;
  color: var(--text-muted);
}

.post-meta .time {
  font-size: 13px;
  color: var(--text-muted);
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--blue);
  color: #fff;
  border-radius: 4px;
}

.post-content {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-actions {
  display: flex;
  gap: 16px;
}

.post-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.post-actions button:hover {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sidebar-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.trending {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trending-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trending-item .tag {
  font-size: 14px;
  color: var(--text);
}

.trending-item .count {
  font-size: 12px;
  color: var(--text-muted);
}

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

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* CTA */
.cta {
  padding: 80px 0;
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.cta h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cta p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Footer */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-logo {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.footer-col p {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 36px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .social-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
}

/* Featured Agents */
.featured { padding: 80px 0; background: var(--bg-card); border-top: 1px solid var(--border); }
.agents-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.agent-card { display: block; padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.2s; }
.agent-card:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.agent-header { display: flex; gap: 10px; margin-bottom: 12px; }
.agent-avatar { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; }
.agent-info { flex: 1; }
.agent-name { font-size: 14px; font-weight: 600; }
.agent-type { font-size: 12px; color: var(--text-muted); }
.agent-rating { text-align: right; }
.agent-rating .stars { font-size: 12px; color: #eab308; }
.agent-rating .rating { font-size: 12px; color: var(--text-muted); margin-left: 4px; }
.agent-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.agent-tags { display: flex; gap: 6px; margin-bottom: 12px; }
.agent-tags span { font-size: 11px; padding: 2px 8px; background: var(--bg-muted); border-radius: 4px; color: var(--text-muted); }
.agent-stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }

/* Tools Section */
.tools-section { padding: 80px 0; }
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-card { display: block; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.2s; }
.tool-card:hover { border-color: var(--text-muted); }
.tool-icon { width: 48px; height: 48px; background: var(--bg-muted); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; color: var(--text-secondary); }
.tool-card h3 { font-size: 15px; margin-bottom: 6px; }
.tool-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.tool-rating { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.tool-rating .stars { color: #eab308; }

/* Articles Section */
.articles-section { padding: 80px 0; background: var(--bg-card); border-top: 1px solid var(--border); }
.articles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.article-card { display: block; padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.2s; }
.article-card:hover { border-color: var(--text-muted); }
.article-meta { display: flex; gap: 8px; margin-bottom: 10px; }
.article-category { font-size: 11px; padding: 2px 8px; background: var(--bg-muted); border-radius: 4px; color: var(--text-muted); }
.article-date { font-size: 11px; color: var(--text-muted); }
.article-card h3 { font-size: 15px; margin-bottom: 8px; }
.article-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* Community Section */
.community-section { padding: 80px 0; }
.community-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.community-card { padding: 32px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.community-stat { margin-bottom: 12px; }
.community-stat .stat-value { display: block; font-size: 36px; font-weight: 700; }
.community-stat .stat-label { font-size: 14px; color: var(--text-muted); }
.community-card p { font-size: 14px; color: var(--text-secondary); }
.view-all { font-size: 14px; color: var(--blue); font-weight: 500; }
.view-all:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .agents-grid, .tools-grid, .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .community-grid { grid-template-columns: 1fr; }
}

/* AEO Section */
.aeo-section { padding: 40px 0 80px; }
.aeo-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 800px; margin: 0 auto; }
.aeo-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.aeo-icon { width: 48px; height: 48px; background: var(--bg-muted); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--blue); flex-shrink: 0; }
.aeo-header h2 { font-size: 20px; margin-bottom: 4px; }
.aeo-header p { font-size: 14px; color: var(--text-secondary); }
.aeo-input-group { display: flex; gap: 12px; margin-bottom: 16px; }
.aeo-input { flex: 1; padding: 12px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px; }
.aeo-input:focus { outline: none; border-color: var(--blue); }
.aeo-features { display: flex; gap: 12px; flex-wrap: wrap; }
.aeo-features span { font-size: 12px; padding: 4px 10px; background: var(--bg-muted); border-radius: 4px; color: var(--text-muted); }
.aeo-results { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.aeo-scores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.score-card { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; text-align: center; }
.score-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.score-value { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.score-bar { height: 8px; background: var(--bg-muted); border-radius: 4px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.aeo-details { margin-bottom: 24px; }
.aeo-detail-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.aeo-detail-item .label { color: var(--text-secondary); }
.aeo-detail-item .value { font-weight: 500; }
.aeo-fixes h3 { font-size: 16px; margin-bottom: 12px; }
.aeo-fix-item { padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.aeo-fix-item .fix-priority { font-size: 11px; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; display: inline-block; }
.aeo-fix-item .fix-priority.high { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.aeo-fix-item .fix-priority.medium { background: rgba(234, 179, 8, 0.1); color: #eab308; }
.aeo-fix-item .fix-priority.low { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.aeo-fix-item .fix-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.aeo-fix-item .fix-desc { font-size: 13px; color: var(--text-secondary); }
