/* ==========================================================================
   ShadCN Light Theme & Modern Minimalist Design Tokens
   Tailored for Smart Tab Cleaner Website
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* ShadCN Slate / Zinc Light Palette */
  --background: #ffffff;
  --foreground: #09090b;
  
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  
  --card: #ffffff;
  --card-foreground: #09090b;
  --card-border: #e4e4e7;
  
  --popover: #ffffff;
  --popover-foreground: #09090b;
  
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #18181b;
  
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --primary-hover: #27272a;
  
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-light: #eff6ff;
  --brand-border: #bfdbfe;
  
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --secondary-hover: #e4e4e7;
  
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container-narrow {
  max-width: 840px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--foreground);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: #52525b;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header .container {
  max-width: 1240px;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--foreground);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-title {
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #71717a;
  background-color: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 1px 6px;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #71717a;
  padding: 6px 2px;
  transition: color 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: var(--foreground);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.header-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .nav-center {
    display: none;
  }
}

/* ShadCN Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 8px 16px;
  line-height: 1.25rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background-color: var(--muted);
  border-color: #d4d4d8;
}

.btn-brand {
  background-color: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.btn-brand:hover {
  background-color: var(--brand-hover);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
}

.badge-outline {
  border-color: var(--border);
  color: #52525b;
  background-color: #fafafa;
}

.badge-brand {
  background-color: var(--brand-light);
  border-color: var(--brand-border);
  color: var(--brand);
}

.badge-success {
  background-color: var(--success-light);
  border-color: var(--success-border);
  color: #047857;
}

/* Cards (ShadCN style) */
.card {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: #d4d4d8;
  box-shadow: var(--shadow-card-hover);
}

.card-header {
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--foreground);
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-pill {
  margin-bottom: 24px;
}

.hero-title {
  max-width: 820px;
  margin: 0 auto 20px;
  font-size: 3.25rem;
  line-height: 1.15;
}

.hero-lead {
  max-width: 640px;
  margin: 0 auto 36px;
  font-size: 1.125rem;
  color: #52525b;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.meta-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 0.8125rem;
  color: #71717a;
}

.meta-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Interactive Preview Window */
.preview-container {
  max-width: 760px;
  margin: 0 auto 80px;
}

.browser-mockup {
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.browser-mockup-header {
  background-color: #fafafa;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #e4e4e7;
}

.window-dot.red { background-color: #fca5a5; }
.window-dot.yellow { background-color: #fde047; }
.window-dot.green { background-color: #86efac; }

.browser-mockup-body {
  padding: 24px;
  background-color: #fbfbfb;
  display: flex;
  justify-content: center;
}

/* Extension Interactive Frame inside mockup */
.extension-frame {
  width: 440px;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  text-align: left;
}

.ext-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background-color: #ffffff;
}

.ext-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ext-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.875rem;
}

.ext-sync-pill {
  font-size: 0.6875rem;
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ext-tabs-nav {
  display: flex;
  gap: 4px;
  background-color: #f4f4f5;
  padding: 3px;
  border-radius: var(--radius);
}

.ext-tab-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #71717a;
  transition: all 0.15s ease;
}

.ext-tab-btn.active {
  background-color: #ffffff;
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ext-content {
  padding: 14px 16px;
  font-size: 0.8125rem;
}

.ext-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: #ffffff;
  transition: border-color 0.15s;
}

.ext-list-item:hover {
  border-color: #d4d4d8;
}

.ext-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  max-width: 250px;
}

.ext-item-title {
  font-weight: 500;
  color: var(--foreground);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ext-item-url {
  font-size: 0.6875rem;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ext-btn-block {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.ext-btn-block:hover {
  background-color: #fecaca;
}

.ext-btn-blocked {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* Feature Grid */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-subtitle {
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.section-title {
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1rem;
  color: #71717a;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background-color: #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.25rem;
}

/* How It Works (Steps) */
.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.step-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

/* Privacy Guarantee Banner */
.privacy-banner {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.privacy-banner-icon {
  font-size: 3rem;
  line-height: 1;
}

.privacy-banner-content h3 {
  margin-bottom: 8px;
}

.privacy-banner-content p {
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

/* FAQ Accordion (ShadCN style) */
.faq-accordion {
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: color 0.15s;
}

.faq-question:hover {
  color: var(--brand);
}

.faq-icon {
  transition: transform 0.2s ease;
  font-size: 1rem;
  color: #71717a;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out, padding 0.25s ease;
  color: #52525b;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

/* CTA Section */
.cta-box {
  background-color: #09090b;
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 64px 32px;
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.cta-box h2 {
  color: #ffffff;
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.cta-box p {
  color: #a1a1aa;
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 1.0625rem;
}

.cta-box .btn-primary {
  background-color: #ffffff;
  color: #09090b;
}

.cta-box .btn-primary:hover {
  background-color: #f4f4f5;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  background-color: #fafafa;
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 320px;
}

.footer-desc {
  font-size: 0.875rem;
  color: #71717a;
  margin-top: 12px;
}

.footer-nav {
  display: flex;
  gap: 64px;
}

.footer-column-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--foreground);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.875rem;
  color: #71717a;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--foreground);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 0.8125rem;
  color: #a1a1aa;
}

/* Policy Pages Layout (ToS & Privacy) */
.legal-wrapper {
  padding: 60px 0 100px;
}

.legal-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
  margin-bottom: 40px;
}

.legal-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: #71717a;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  font-size: 1.125rem;
  margin: 24px 0 12px;
}

.legal-content p {
  font-size: 0.9375rem;
  margin-bottom: 16px;
  color: #3f3f46;
  line-height: 1.7;
}

.legal-content ul, .legal-content ol {
  margin: 0 0 20px 24px;
  color: #3f3f46;
}

.legal-content li {
  margin-bottom: 8px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.permission-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.875rem;
}

.permission-table th, .permission-table td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
}

.permission-table th {
  background-color: #fafafa;
  font-weight: 600;
  color: var(--foreground);
}

.permission-table tr:nth-child(even) {
  background-color: #fcfcfc;
}

.callout {
  border-left: 4px solid var(--brand);
  background-color: var(--brand-light);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.callout p {
  color: #1e40af;
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-container {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 680px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-lead {
    font-size: 1rem;
  }
  .preview-container {
    padding: 0 8px;
  }
  .extension-frame {
    width: 100%;
  }
  .footer-top {
    flex-direction: column;
    gap: 32px;
  }
  .footer-nav {
    flex-direction: column;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .privacy-banner {
    flex-direction: column;
    padding: 24px;
  }
}

/* ==========================================================================
   Multi-language Switcher & Display Rules
   ========================================================================== */

[data-lang="en"] .lang-vi {
  display: none !important;
}

[data-lang="vi"] .lang-en {
  display: none !important;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background-color: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  height: 32px;
  box-sizing: border-box;
}

.lang-switch-btn {
  border: none;
  background: transparent;
  padding: 0 8px;
  height: 26px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #71717a;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.lang-switch-btn:hover {
  color: #09090b;
}

.lang-switch-btn.active {
  background-color: #ffffff;
  color: #09090b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}


