/* ============================================
   PhotoIDE — Professional AI Image Editor
   Warm theme consistent with samai.cc ecosystem
   ============================================ */

:root {
  --bg-body: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #FFF9F0;
  --bg-code: #292524;
  --bg-code-inline: #FEF3C7;
  --bg-hero-gradient-1: #FFF1F2;
  --bg-hero-gradient-2: #FFE4E6;
  --bg-hero-gradient-3: #FECDD3;

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

  --accent: #E11D48;
  --accent-hover: #BE123C;
  --accent-light: #FFE4E6;
  --accent-subtle: #FFF1F2;

  --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 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.version {
  font-size: 0.7rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.navbar-links a:hover {
  color: var(--accent);
}

.lang-switch {
  opacity: 0.7;
  font-size: 0.8rem !important;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lang-switch:hover {
  opacity: 1;
  border-color: var(--accent);
}

/* ====== Hero Section ====== */
.hero {
  background: linear-gradient(135deg, var(--bg-hero-gradient-1), var(--bg-hero-gradient-2), var(--bg-hero-gradient-3));
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}

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

.hero-badge {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-badge code {
  font-family: var(--font-mono);
  background: var(--bg-code);
  color: #E7E5E4;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.highlight {
  background: linear-gradient(135deg, var(--accent), #F43F5E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
}

/* ====== Hero Stats ====== */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

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

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

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

/* ====== Sections ====== */
.section {
  padding: 4rem 1.5rem;
}

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

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

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

/* ====== Features Grid ====== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

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

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

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 0.5rem;
}

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

/* ====== Screenshots ====== */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

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

.screenshot-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent-light), var(--bg-hero-gradient-2));
}

.screenshot-caption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

/* ====== Tech Grid ====== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

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

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

.tech-card .name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

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

/* ====== Platform Grid ====== */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

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

.platform-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-1px);
}

.platform-card .icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.platform-card .name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ====== Install Section ====== */
.install-block {
  background: var(--bg-code);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.install-block code {
  color: #E7E5E4;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
}

.install-block .comment {
  color: #78716C;
}

.install-block .keyword {
  color: #F43F5E;
}

.install-block .string {
  color: #FDE68A;
}

.install-block .copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #A8A29E;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.install-block .copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ====== CTA Section ====== */
.cta-section {
  text-align: center;
  padding: 4rem 1.5rem;
  background: linear-gradient(135deg, var(--bg-hero-gradient-1), var(--bg-hero-gradient-2));
}

.cta-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ====== Footer ====== */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

.footer a {
  color: var(--accent);
  font-weight: 500;
}

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

  .navbar-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

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

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

  .hero p {
    font-size: 0.95rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hero-stat .number {
    font-size: 1.5rem;
  }

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

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

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

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

@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem 2.5rem;
  }

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

  .section {
    padding: 3rem 1rem;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }
}
