/* ============================================
   PhoneIDE — Claude Code Warm Daytime Theme
   ============================================ */

:root {
  /* Warm palette inspired by Claude Code's daytime theme */
  --bg-body: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #FFF9F0;
  --bg-code: #292524;
  --bg-code-inline: #FEF3C7;
  --bg-hero-gradient-1: #FEF3C7;
  --bg-hero-gradient-2: #FFEDD5;
  --bg-hero-gradient-3: #FDE68A;

  --text-primary: #1C1917;
  --text-secondary: #78716C;
  --text-muted: #A8A29E;
  --text-code: #E7E5E4;
  --text-on-accent: #FFFFFF;

  --accent: #D97706;
  --accent-hover: #B45309;
  --accent-light: #FEF3C7;
  --accent-subtle: #FFFBEB;

  --border: #E7E5E4;
  --border-light: #F5F5F4;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 8px 30px rgba(28, 25, 23, 0.08);

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;

  --max-width: 1120px;
  --nav-height: 60px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

/* ====== Navigation ====== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.navbar-brand img {
  width: 30px;
  height: 30px;
}

.navbar-brand .version {
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 20px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--text-on-accent);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.btn-lg {
  padding: 12px 28px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
}

/* ====== Hero ====== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 60px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 70% 20%, var(--bg-hero-gradient-1), transparent),
    radial-gradient(ellipse 500px 350px at 20% 50%, var(--bg-hero-gradient-2), transparent),
    radial-gradient(ellipse 400px 300px at 50% 80%, var(--bg-hero-gradient-3), transparent);
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero-badge code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 480px;
  margin: 56px auto 0;
}

.hero-stat .number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.hero-stat .label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ====== Sections ====== */
.section {
  padding: 80px 24px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ====== Feature Cards ====== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s;
}

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

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  background: var(--accent-light);
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ====== Code/Terminal Block ====== */
.terminal {
  background: var(--bg-code);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.terminal-dot.red { background: #FF5F57; }
.terminal-dot.yellow { background: #FEBC2E; }
.terminal-dot.green { background: #28C840; }

.terminal-body {
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-code);
  overflow-x: auto;
}

.terminal-body .prompt {
  color: #FBBF24;
  user-select: none;
}

.terminal-body .cmd {
  color: #E7E5E4;
}

.terminal-body .comment {
  color: #78716C;
}

.terminal-body .output {
  color: #A8A29E;
}

/* ====== Install Tabs ====== */
.tabs {
  max-width: 720px;
  margin: 0 auto;
}

.tab-list {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.tab-btn.active {
  background: var(--accent);
  color: var(--text-on-accent);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ====== Tech Stack Grid ====== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.tech-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}

.tech-card:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.tech-card .name {
  font-size: 0.9rem;
  font-weight: 700;
}

.tech-card .desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ====== Platform Grid ====== */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}

.platform-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.2s;
}

.platform-card:hover {
  border-color: var(--accent);
}

.platform-card .icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.platform-card .name {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ====== API Table ====== */
.api-table {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
}

.api-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.api-row:last-child {
  border-bottom: none;
}

.api-row:hover {
  background: var(--accent-subtle);
}

.api-method {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  min-width: 52px;
  text-align: center;
  margin-right: 16px;
}

.api-method.get {
  background: #DCFCE7;
  color: #166534;
}

.api-method.post {
  background: #DBEAFE;
  color: #1E40AF;
}

.api-path {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-right: 20px;
  flex-shrink: 0;
}

.api-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: auto;
}

/* ====== CTA Section ====== */
.cta-section {
  background: var(--bg-code);
  color: var(--text-code);
  padding: 80px 24px;
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #F5F0EB;
}

.cta-section p {
  color: #A8A29E;
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.cta-section .cta-code {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: #FBBF24;
  margin-bottom: 28px;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cta-actions .btn-primary {
  background: #FBBF24;
  color: #1C1917;
}
.cta-actions .btn-primary:hover {
  background: #F59E0B;
  color: #1C1917;
}

.cta-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.2);
  color: #E7E5E4;
}
.cta-actions .btn-outline:hover {
  border-color: #FBBF24;
  color: #FBBF24;
}

/* ====== Footer ====== */
.footer {
  background: var(--bg-code);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px;
  text-align: center;
}

.footer p {
  font-size: 0.82rem;
  color: #78716C;
}

.footer a {
  color: #A8A29E;
}
.footer a:hover {
  color: #FBBF24;
}

/* ====== Page Layout ====== */
.page-content {
  min-height: calc(100vh - var(--nav-height) - 80px);
}

/* ====== Breadcrumb ====== */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  margin: 0 6px;
}

/* ====== Screenshots ====== */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.screenshot-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.25s;
  background: var(--bg-surface);
}

.screenshot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.screenshot-card img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    box-shadow: var(--shadow-md);
  }

  .navbar-links.open {
    display: flex;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .section {
    padding: 48px 20px;
  }

  .tab-list {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .api-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .api-path {
    margin-right: 0;
  }

  .api-desc {
    margin-left: 0;
  }
}
