/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #667eea;
  --primary-dark: #5a6fd6;
  --primary-light: #8b9cf7;
  --bg: #ffffff;
  --bg-alt: #f8f9fc;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); text-decoration: none; border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo { width: 36px; height: 36px; border-radius: 8px; }
.nav-title { font-size: 20px; font-weight: 700; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--primary); }
.nav-menu-btn {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 5px;
}
.nav-menu-btn span { display: block; width: 22px; height: 2px; background: var(--text); transition: all var(--transition); }
.mobile-menu {
  display: none; flex-direction: column; padding: 16px 24px; gap: 12px;
  background: #fff; border-bottom: 1px solid var(--border);
}
.mobile-menu.active { display: flex; }
.mobile-menu a { color: var(--text); text-decoration: none; font-size: 15px; padding: 8px 0; }
.mobile-menu .btn { text-align: center; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
}

/* ===== Hero ===== */
.hero {
  padding-top: 120px; padding-bottom: 80px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 50%, #f5f0ff 100%);
  overflow: hidden;
}
.hero-content {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-text h1 {
  font-size: 52px; font-weight: 800; line-height: 1.1;
  background: linear-gradient(135deg, #1a1a2e 0%, #667eea 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle { font-size: 18px; color: var(--text-secondary); margin-top: 20px; line-height: 1.7; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-image { display: flex; justify-content: center; }
.screenshot-hero {
  width: 100%; max-width: 560px; border-radius: 16px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-text h1 { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }
}

/* ===== Section ===== */
.section-title { text-align: center; font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.section-subtitle { text-align: center; font-size: 17px; color: var(--text-secondary); margin-bottom: 48px; }

/* ===== Features ===== */
.features { padding: 100px 0; background: var(--bg); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature-card {
  padding: 32px; border-radius: var(--radius); background: var(--bg-card);
  border: 1px solid var(--border); transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 20px;
  background: linear-gradient(135deg, #eef2ff, #e8edff); color: var(--primary);
}
.feature-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ===== Screenshots ===== */
.screenshots { padding: 100px 0; background: var(--bg-alt); }
.screenshots-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.screenshot-card { text-align: center; }
.screenshot-card img {
  width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); transition: transform var(--transition);
}
.screenshot-card img:hover { transform: scale(1.02); }
.screenshot-label { margin-top: 16px; font-size: 15px; font-weight: 600; color: var(--text-secondary); }

@media (max-width: 768px) {
  .screenshots-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== Download ===== */
.download { padding: 100px 0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.download-content { text-align: center; }
.download-content h2 { font-size: 40px; font-weight: 700; margin-bottom: 16px; }
.download-content > p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; }
.download .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }
.download .btn-primary:hover { background: #f0f0f0; }
.download-note { margin-top: 16px; font-size: 14px; opacity: 0.7; }

/* ===== Footer ===== */
.footer { padding: 40px 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer-content { text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.footer-logo { width: 24px; height: 24px; border-radius: 4px; }
.footer-brand span { font-weight: 700; font-size: 16px; }
.footer-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }
.footer-copyright { font-size: 13px; color: var(--text-secondary); }

/* ===== Auth Modal ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  justify-content: center; align-items: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); padding: 40px;
  width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; background: none;
  border: none; font-size: 24px; cursor: pointer; color: var(--text-secondary);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background var(--transition);
}
.modal-close:hover { background: var(--bg-alt); }
.auth-form h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group .optional { font-weight: 400; color: var(--text-secondary); }
.form-group input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  transition: border-color var(--transition); outline: none;
}
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.form-error { color: #dc3545; font-size: 13px; margin-bottom: 12px; display: none; }
.form-error.visible { display: block; }
.form-success { color: #28a745; font-size: 13px; margin-bottom: 12px; display: none; }
.form-success.visible { display: block; }
.form-links { display: flex; justify-content: space-between; margin-top: 16px; }
.form-links a { font-size: 13px; color: var(--primary); text-decoration: none; }
.form-links a:hover { text-decoration: underline; }

/* Verify prompt */
.verify-icon { text-align: center; margin-bottom: 16px; }
#verify-prompt h2 { text-align: center; }
#verify-prompt .auth-subtitle { text-align: center; }

/* ===== User Dropdown ===== */
.account-icon { font-size: 16px; }
.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 150;
  overflow: hidden;
}
.user-dropdown.active { display: block; }
.dropdown-header {
  padding: 16px;
  background: var(--bg-alt);
}
.dropdown-user-email {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}
.dropdown-user-plan {
  margin-top: 8px;
}
.plan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-free {
  background: #f3f4f6;
  color: #6b7280;
}
.plan-plus {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background var(--transition);
  font-family: inherit;
}
.dropdown-item:hover { background: var(--bg-alt); }
.dropdown-icon { font-size: 16px; }

/* Make nav-links relative for dropdown positioning */
.nav-links { position: relative; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .modal { padding: 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .form-links { flex-direction: column; gap: 8px; }
}
