/* =============================================
   AppScreens — Landing Pages Shared CSS
   ============================================= */

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

:root {
  --bg: #0d0d14;
  --bg2: #13131f;
  --bg3: #1a1a2e;
  --surface: #1e1e30;
  --surface2: #252540;
  --border: #2a2a45;
  --accent: #6c63ff;
  --accent2: #8b85ff;
  --accent-glow: rgba(108, 99, 255, 0.25);
  --green: #22c55e;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --text-faint: #5555778;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.5);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; margin-bottom: 0.5em; }
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3em; }
p { color: var(--text-muted); }

/* =============================================
   NAVIGATION
   ============================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 20, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 58px;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

.nav-cta {
  padding: 7px 16px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--accent2);
  text-decoration: none;
  transform: translateY(-1px);
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .site-nav { gap: 16px; }
}

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 80px 24px 72px;
  background: linear-gradient(160deg, #13131f 0%, #1a1a2e 50%, #0d0d14 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hero-android {
  background: linear-gradient(160deg, #0f1f0f 0%, #1a2e1a 50%, #0d0d14 100%);
}

.hero-guide {
  background: linear-gradient(160deg, #1a1400 0%, #2e2200 50%, #0d0d14 100%);
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(108, 99, 255, 0.4);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--text);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 32px var(--accent-glow);
  margin-bottom: 28px;
}

.cta-btn:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 4px 40px var(--accent-glow);
  text-decoration: none;
  color: #fff;
}

.hero-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hero-sizes span {
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =============================================
   TABLE OF CONTENTS
   ============================================= */
.toc {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  padding: 0 24px;
  max-width: 960px;
  margin: 0 auto;
}

.toc-list a {
  display: block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.toc-list a:hover {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

/* =============================================
   FEATURES
   ============================================= */
.features-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.features-section h2 {
  text-align: center;
  margin-bottom: 40px;
  color: var(--text);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.feature-card h3 { color: var(--text); margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; }

/* =============================================
   SIZES TABLE SECTION
   ============================================= */
.sizes-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.sizes-section h2,
.content-section h2 {
  color: var(--text);
  margin-bottom: 12px;
}

.section-sub {
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.sizes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sizes-table th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.sizes-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}

.sizes-table tr:last-child td { border-bottom: none; }

.sizes-table tr.highlight td {
  background: rgba(108, 99, 255, 0.06);
  color: var(--text);
}

.sizes-table tr:hover td { background: var(--surface); }

.table-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-req { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-opt { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-auto { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-legacy { background: rgba(100,100,120,0.15); color: #8888aa; border: 1px solid rgba(100,100,120,0.3); }

/* =============================================
   HOW-TO STEPS
   ============================================= */
.howto-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.howto-section h2 {
  text-align: center;
  color: var(--text);
  margin-bottom: 40px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step-num {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
}

.step-body h3 { color: var(--text); margin-bottom: 6px; }
.step-body p { font-size: 0.93rem; }

/* =============================================
   TIPS
   ============================================= */
.tips-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.tips-section h2 {
  text-align: center;
  color: var(--text);
  margin-bottom: 40px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.tip-card h3 { color: var(--text); margin-bottom: 8px; font-size: 1rem; }
.tip-card p { font-size: 0.92rem; }

/* =============================================
   COMPARE
   ============================================= */
.compare-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.compare-section h2 {
  color: var(--text);
  margin-bottom: 24px;
}

/* =============================================
   CONTENT SECTIONS (guide page)
   ============================================= */
.content-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

/* Summary boxes */
.summary-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.summary-box {
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid;
}

.summary-required {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.3);
}

.summary-recommended {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.3);
}

.summary-pro {
  background: rgba(108,99,255,0.08);
  border-color: rgba(108,99,255,0.3);
}

.summary-box-icon { font-size: 1.6rem; margin-bottom: 10px; }
.summary-box h3 { color: var(--text); margin-bottom: 8px; font-size: 1rem; }
.summary-box p { font-size: 0.9rem; }

/* Cascade diagram */
.cascade-diagram {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 28px 0;
}

.cascade-node {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--radius);
  width: 100%;
}

.cascade-primary {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.35);
}

.cascade-secondary {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.35);
}

.cascade-ipad {
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.35);
}

.cascade-node strong { color: var(--text); font-size: 1rem; }
.cascade-node span { font-size: 0.88rem; color: var(--text-muted); }

.cascade-arrow {
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Info box */
.info-box {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-top: 20px;
}

.info-box strong { color: #fbbf24; }

/* =============================================
   FAQ
   ============================================= */
.faq-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.faq-section h2 {
  color: var(--text);
  margin-bottom: 32px;
}

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

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] { border-color: var(--accent); }

.faq-item summary {
  padding: 18px 20px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  font-size: 0.97rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent2);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] summary::after {
  content: '×';
}

.faq-item p {
  padding: 0 20px 18px;
  font-size: 0.93rem;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.faq-item strong { color: var(--text); }

/* =============================================
   CTA SECTION
   ============================================= */
.cta-section {
  padding: 80px 24px;
  text-align: center;
  background: linear-gradient(160deg, var(--bg3) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 {
  color: var(--text);
  margin-bottom: 12px;
}

.cta-section p {
  max-width: 500px;
  margin: 0 auto 28px;
  font-size: 1rem;
}

.cta-sub-links {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cta-sub-links a { color: var(--text-muted); }
.cta-sub-links a:hover { color: var(--accent2); }

/* =============================================
   RELATED
   ============================================= */
.related-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.related-section h2 {
  color: var(--text);
  margin-bottom: 28px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
  color: inherit;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.related-icon { font-size: 1.8rem; margin-bottom: 12px; }
.related-card h3 { color: var(--text); margin-bottom: 6px; font-size: 1rem; }
.related-card p { font-size: 0.88rem; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
  .hero { padding: 56px 20px 48px; }
  .features-grid, .tips-grid, .related-grid, .summary-boxes { grid-template-columns: 1fr; }
  .step { flex-direction: column; gap: 12px; }
  .cascade-node { flex-direction: column; gap: 4px; align-items: flex-start; }
}
