/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --accent: #06b6d4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --free: #9ca3af;
  --basic: #06b6d4;
  --pro: #6366f1;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-sm: 8px;
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ===== Utility ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; } .mt-8 { margin-top: 64px; }
.mb-2 { margin-bottom: 16px; } .mb-4 { margin-bottom: 32px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 600; cursor: pointer; border: none;
  transition: all .2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 16px 36px; font-size: 18px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-google {
  background: #fff; color: var(--gray-700); border: 1px solid var(--gray-300);
  font-weight: 500; padding: 12px 24px;
}
.btn-google:hover { border-color: var(--gray-400); box-shadow: var(--shadow-sm); }
.btn-google img { width: 20px; height: 20px; }

/* ===== Navbar ===== */
.navbar {
  background: #fff; border-bottom: 1px solid var(--gray-200);
  padding: 16px 0; position: sticky; top: 0; z-index: 100;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand {
  font-size: 22px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 10px;
}
.navbar-brand svg { width: 28px; height: 28px; }
.navbar-links { display: flex; align-items: center; gap: 32px; }
.navbar-links a { color: var(--gray-600); font-weight: 500; font-size: 15px; }
.navbar-links a:hover { color: var(--primary); }

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px; text-align: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdfa 100%);
}
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 20px; color: var(--gray-500); max-width: 600px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== Features ===== */
.features { padding: 80px 0; }
.features h2 { text-align: center; font-size: 32px; margin-bottom: 48px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 28px; }
.feature-card {
  background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center; transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--gray-500); font-size: 15px; }

/* ===== Demo / Upload Area ===== */
.demo-area { padding: 60px 0; background: #fff; }
.demo-box {
  max-width: 640px; margin: 0 auto; background: var(--gray-50);
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 48px 32px; text-align: center; transition: all .2s;
  cursor: pointer;
}
.demo-box.drag-over { border-color: var(--primary); background: var(--primary-light); }
.demo-box.has-image { border-style: solid; }
.demo-box .icon { font-size: 48px; margin-bottom: 12px; }
.demo-box h3 { font-size: 20px; margin-bottom: 8px; }
.demo-box p { color: var(--gray-500); font-size: 14px; margin-bottom: 16px; }
.demo-preview { display: none; gap: 20px; margin-top: 24px; align-items: center; justify-content: center; }
.demo-preview.show { display: flex; flex-wrap: wrap; }
.demo-preview img { max-width: 280px; max-height: 280px; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.demo-preview .arrow { font-size: 32px; color: var(--gray-400); }
.processing .spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Pricing ===== */
.pricing { padding: 80px 0; background: var(--gray-50); }
.pricing h2 { text-align: center; font-size: 32px; margin-bottom: 8px; }
.pricing .subtitle { text-align: center; color: var(--gray-500); margin-bottom: 48px; font-size: 18px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; max-width: 960px; margin: 0 auto; }
.pricing-card {
  background: #fff; border-radius: var(--radius); padding: 36px 28px;
  box-shadow: var(--shadow); text-align: center; position: relative;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  border: 2px solid var(--primary); transform: scale(1.05);
}
.pricing-card.featured:hover { transform: scale(1.05) translateY(-4px); }
.pricing-card .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 4px 16px;
  border-radius: 20px; font-size: 13px; font-weight: 600;
}
.pricing-card .plan-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.pricing-card .plan-desc { font-size: 14px; color: var(--gray-500); margin-bottom: 20px; }
.pricing-card .price {
  font-size: 44px; font-weight: 800; margin-bottom: 4px;
}
.pricing-card .price .currency { font-size: 24px; vertical-align: super; }
.pricing-card .price-period { font-size: 14px; color: var(--gray-400); margin-bottom: 8px; }
.pricing-card .yearly-price { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }
.pricing-card .features { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.pricing-card .features li {
  padding: 8px 0; border-bottom: 1px solid var(--gray-100);
  font-size: 15px; color: var(--gray-700);
}
.pricing-card .features li:last-child { border-bottom: none; }
.pricing-card .features li .check { color: #10b981; margin-right: 8px; }
.pricing-card .features li .cross { color: var(--gray-300); margin-right: 8px; }
.pricing-card.free .price { color: var(--free); }
.pricing-card.basic .price { color: var(--basic); }
.pricing-card.pro .price { color: var(--pro); }

/* ===== Footer ===== */
.footer {
  padding: 40px 0; background: var(--gray-900); color: var(--gray-400); text-align: center;
}
.footer a { color: var(--gray-300); }
.footer a:hover { color: #fff; }

/* ===== Login Page ===== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 80px); padding: 40px 24px; }
.login-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 48px 40px; max-width: 420px; width: 100%; text-align: center;
}
.login-card h1 { font-size: 28px; margin-bottom: 8px; }
.login-card p { color: var(--gray-500); margin-bottom: 32px; }
.login-card .divider {
  display: flex; align-items: center; gap: 16px; color: var(--gray-400);
  margin: 24px 0; font-size: 14px;
}
.login-card .divider::before, .login-card .divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

/* ===== Dashboard ===== */
.dashboard { padding: 40px 0; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.dashboard h1 { font-size: 28px; }
.dashboard .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; margin-bottom: 32px; }
.dashboard .stat-card {
  background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  text-align: center;
}
.dashboard .stat-card .number { font-size: 32px; font-weight: 800; color: var(--primary); }
.dashboard .stat-card .label { font-size: 14px; color: var(--gray-500); margin-top: 4px; }

/* ===== Drop Zone ===== */
.drop-zone { cursor: pointer; }
.drop-zone input[type="file"] { display: none; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; padding: 16px 24px;
  border-radius: var(--radius-sm); color: #fff; font-weight: 500;
  z-index: 1000; opacity: 0; transform: translateY(10px);
  transition: all .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
.toast.info { background: var(--primary); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 17px; }
  .pricing-card.featured { transform: none; }
  .pricing-card.featured:hover { transform: translateY(-4px); }
  .navbar-links { gap: 16px; }
  .navbar-links a { font-size: 14px; }
  .demo-preview img { max-width: 200px; }
}
