/* ============================================================
   1hSaved — Styles
   ============================================================ */

:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #EEF2FF;
  --accent: #F59E0B;
  --text: #1F2937;
  --text-light: #6B7280;
  --bg: #FFFFFF;
  --bg-light: #F9FAFB;
  --border: #E5E7EB;
  --success: #10B981;
  --radius: 12px;
}

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

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

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

/* NAV */
.nav {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

/* HERO */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}
.badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}
.highlight {
  color: var(--primary);
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-cta { margin-top: 16px; }
.hero-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}
.btn-copy {
  background: var(--text);
  color: white;
  font-size: 0.85rem;
  padding: 8px 16px;
}
.btn-copy:hover { background: #374151; }
.btn-copy.copied {
  background: var(--success);
}

/* SECTIONS */
.section {
  padding: 64px 0;
}
.bg-light {
  background: var(--bg-light);
}
.section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
}

/* STEPS */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.step-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.step-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 16px;
}
.step-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* FEATURES */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}
.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.feature p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* USE CASES */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.usecase {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.usecase h3 { margin-bottom: 8px; }
.usecase p { font-size: 0.9rem; color: var(--text-light); }

/* CTA */
.cta-section {
  text-align: center;
  background: var(--primary);
  color: white;
}
.cta-section h2 { color: white; }
.cta-section p { color: rgba(255,255,255,0.8); margin-bottom: 24px; font-size: 1.1rem; }
.cta-section .btn-primary {
  background: white;
  color: var(--primary);
}
.cta-section .btn-primary:hover {
  background: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* FOOTER */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner { text-align: center; }
.footer-brand { font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.footer-links a { color: var(--text-light); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }
.footer-note { font-size: 0.8rem; color: var(--text-light); }
.lang-switcher { display: flex; justify-content: center; margin-top: 16px; }
.lang-select { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.8rem; cursor: pointer; color: var(--text-light); font-family: inherit; transition: border-color 0.2s; }
.lang-select:hover { border-color: var(--primary); color: var(--primary); }
.lang-select:focus { outline: none; border-color: var(--primary); }

/* SETUP PAGE */
.setup-hero {
  padding: 48px 0 32px;
  text-align: center;
}
.setup-hero h1 { font-size: 2.2rem; }

.method-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}
.method-tab {
  padding: 12px 28px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.method-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.method-tab:hover:not(.active) { border-color: #ccc; }

.method-content { display: none; }
.method-content.active { display: block; }

.setup-step {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.setup-step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.setup-step-num {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.setup-step-header h3 { font-size: 1.1rem; }
.setup-step p { color: var(--text-light); margin-bottom: 12px; font-size: 0.95rem; }
.setup-step a { color: var(--primary); }
.setup-step a.btn-primary { color: white; }

/* CODE BLOCK */
.code-block {
  background: #1E1E1E;
  color: #D4D4D4;
  border-radius: 8px;
  padding: 16px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
  position: relative;
  margin: 12px 0;
  max-height: 300px;
  overflow-y: auto;
}
.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.code-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

/* EMAIL GATE */
.email-gate {
  display: flex;
  gap: 8px;
  max-width: 100%;
  margin: 0 auto 24px;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
}
.email-gate h3 { margin-bottom: 8px; }
.email-gate p { color: var(--text-light); margin-bottom: 20px; }
.email-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}
.email-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.email-form input:focus { border-color: var(--primary); }
.email-form button {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
}
.email-form button:hover { background: var(--primary-dark); }
.email-success {
  display: none;
  color: var(--success);
  font-weight: 600;
  margin-top: 12px;
}

/* WIZARD STYLES */
#wizard-container {
  max-width: 700px;
  margin: 0 auto;
}
.wizard-step {
  display: none;
}
.wizard-step.active {
  display: block;
}
.wizard-step h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* Wizard checkboxes */
.wizard-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wizard-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: white;
  transition: all 0.2s;
}
.wizard-checkbox:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.wizard-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
}
.wizard-checkbox span {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Notification buttons */
.notification-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.notif-button {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: inherit;
  font-size: 1rem;
}
.notif-button:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}
.notif-button.active {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.rule-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  background: white;
  position: relative;
}
.rule-card:hover {
  border-color: #c7c7c7;
}
.rule-card .rule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.rule-card .rule-number {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
}
.rule-card .rule-remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 4px;
}
.rule-card .rule-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}
.rule-card label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}
.rule-card input[type="text"],
.rule-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
}
.rule-card textarea {
  min-height: 60px;
  resize: vertical;
}
.rule-card .rule-field {
  margin-bottom: 14px;
}

.filter-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.filter-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}
.filter-option:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}
.filter-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.filter-customize { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.filter-customize label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-light); margin-bottom: 4px; margin-top: 8px; }
.filter-customize label:first-child { margin-top: 0; }
.filter-customize textarea { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; font-family: inherit; resize: vertical; }
.filter-option h4 {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.filter-option p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
}

/* TIPS / INFO BOXES */
.tip-box {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.9rem;
  margin: 12px 0;
}
.info-box {
  background: var(--primary-light);
  border: 1px solid #C7D2FE;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.9rem;
  margin: 12px 0;
}

/* CUSTOMIZE / TROUBLESHOOTING */
.content-page {
  padding: 48px 0;
}
.content-page h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}
.content-page .subtitle {
  color: var(--text-light);
  margin-bottom: 40px;
  font-size: 1.05rem;
}
.content-section {
  margin-bottom: 40px;
}
.content-section h2 {
  text-align: left;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.content-section h3 {
  font-size: 1.1rem;
  margin: 16px 0 8px;
}
.content-section p {
  color: var(--text-light);
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.content-section code {
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  background: white;
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.faq-item p {
  margin: 0;
  font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 1.8rem; }
  .features-grid { grid-template-columns: 1fr; }
  .email-form { flex-direction: column; }
  .method-tabs { flex-direction: column; align-items: center; }
}