/* ============================================================
   LB-Boundless Public Site Styles
   ============================================================ */

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

:root {
  --bg: #0f0f13;
  --surface: #18181d;
  --surface2: #1f1f26;
  --text: #e4e4e7;
  --text2: #a1a1aa;
  --accent: #818cf8;
  --accent2: #c084fc;
  --border: #27272a;
  --radius: 8px;
  --max-w: 960px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--text); line-height: 1.3; }
h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p, li { color: var(--text2); }
ul, ol { padding-left: 1.5rem; margin: 0.5rem 0 1rem; }
li { margin-bottom: 0.4rem; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* --- Header / Nav --- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

.nav-container { padding-top: 0; padding-bottom: 0; }

.main-nav {
  display: flex; align-items: center; gap: 0.25rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0;
}

.main-nav a {
  display: inline-block; padding: 0.5rem 0.85rem; border-radius: var(--radius);
  color: var(--text2); font-size: 0.9rem; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { background: var(--surface2); color: var(--text); text-decoration: none; }
.main-nav a.active { color: var(--accent); }
.main-nav a.logo { font-weight: 700; color: var(--text); font-size: 1.05rem; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* --- Footer --- */
.site-main { flex: 1; }

.site-footer {
  margin-top: 3rem; padding: 2.5rem 0;
  background: var(--surface); border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-brand strong { display: block; font-size: 1.1rem; margin-bottom: 0.25rem; }
.footer-brand p { font-size: 0.9rem; margin: 0; }

.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.9rem; }

.footer-info p { font-size: 0.85rem; margin-bottom: 0.25rem; }
.footer-info .copyright { margin-top: 0.75rem; color: var(--text2); }

/* --- Hero --- */
.hero {
  text-align: center; padding: 4rem 0 3rem;
}
.hero h1 { font-size: 2.8rem; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.75rem; }
.hero-subtitle { font-size: 1.25rem; font-weight: 500; color: var(--text); margin-bottom: 0.75rem; }
.hero-desc { font-size: 1rem; max-width: 600px; margin: 0 auto 1.5rem; }
.hero-badge { display: inline-block; background: rgba(129,140,248,0.15); color: var(--accent); font-size: 0.85rem; padding: 0.35rem 1rem; border-radius: 20px; border: 1px solid rgba(129,140,248,0.3); margin-bottom: 1.5rem; }

.btn-download {
  display: inline-block; padding: 0.75rem 2rem; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface2); color: var(--text2); cursor: not-allowed;
}

/* --- Sections --- */
section { padding: 2.5rem 0; }
section:nth-child(even) { background: var(--surface); }

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

.feature-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.feature-card h3 { color: var(--text); font-size: 1.05rem; }
.feature-card p { font-size: 0.9rem; margin: 0; }

.data-local ul, .douyin ul, .workflow ol, .status ul {
  max-width: 720px;
}
.workflow-steps { list-style: none; padding: 0; counter-reset: step; }
.workflow-steps li { counter-increment: step; display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.workflow-steps li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.workflow-steps li strong { display: block; color: var(--text); margin-bottom: 0.15rem; }
.workflow-steps li span { font-size: 0.9rem; color: var(--text2); }

/* --- Legal Pages --- */
.page-article { padding: 2rem 0 3rem; }
.page-article .updated { color: var(--text2); font-size: 0.9rem; margin-bottom: 1.5rem; }

.page-article section { background: transparent; padding: 0 0 1rem 0; }
.page-article h2 { font-size: 1.25rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }

.info-table { width: 100%; max-width: 480px; border-collapse: collapse; margin: 0.5rem 0 1.5rem; }
.info-table td { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.info-table td:first-child { color: var(--text); width: 30%; }

.faq-item { margin-bottom: 1.25rem; }
.faq-item h3 { font-size: 1rem; color: var(--text); }

.warning { color: #fbbf24; font-size: 0.9rem; }

/* --- OAuth Result Pages --- */
.oauth-result-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; text-align: center; padding: 3rem 0;
}

.oauth-result-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 3rem 2.5rem; max-width: 420px; width: 100%;
}

.oauth-result-card h1 {
  font-size: 1.5rem; margin: 1rem 0 0.5rem;
}

.oauth-success-icon, .oauth-error-icon {
  margin-bottom: 0.5rem;
}

.oauth-result-desc {
  font-size: 1rem; color: var(--text); margin-bottom: 0.5rem;
}

.oauth-result-hint {
  font-size: 0.9rem; color: var(--text2); margin-bottom: 1rem;
}

.oauth-result-close {
  font-size: 0.8rem; color: var(--border); margin-top: 1rem;
}

.oauth-result-auto-close {
  font-size: 0.85rem; color: var(--text2); margin-bottom: 1rem;
  animation: oauth-fade-in 0.4s ease;
}

.oauth-close-btn {
  display: inline-block; padding: 0.6rem 2rem; font-size: 0.95rem; font-weight: 500;
  border-radius: var(--radius); border: 1px solid var(--accent);
  background: rgba(129,140,248,0.1); color: var(--accent); cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 0.75rem;
}
.oauth-close-btn:hover {
  background: rgba(129,140,248,0.2); border-color: var(--accent2);
}

.oauth-result-manual-close {
  font-size: 0.8rem; color: var(--text2); margin-top: 0.25rem;
}

@keyframes oauth-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Error Page --- */
.error-page { text-align: center; padding: 5rem 0; }
.error-page h1 { font-size: 4rem; background: linear-gradient(135deg, #f87171, var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.error-page p { margin: 1rem 0; }
.error-page a { font-weight: 600; }

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-desc { font-size: 0.95rem; }
  .main-nav { gap: 0; padding: 0.35rem 0; }
  .main-nav a { padding: 0.45rem 0.6rem; font-size: 0.82rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .page-article .info-table { font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 1.7rem; }
  .main-nav a { padding: 0.4rem 0.5rem; font-size: 0.78rem; }
  .main-nav a.logo { font-size: 0.9rem; }
}
