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

:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-card-hover: #16161f;
  --border: #1e1e2a;
  --border-hover: #2a2a3a;
  --text: #e0e0e8;
  --text-muted: #7a7a8e;
  --text-dim: #4a4a5e;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.15);
  --green: #00d68f;
  --green-glow: rgba(0, 214, 143, 0.15);
  --orange: #ff9f43;
  --blue: #0abde3;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Animated Background ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -2;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.bg-glow-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-glow);
  top: -100px;
  right: -100px;
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: var(--green-glow);
  bottom: -100px;
  left: -100px;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.logo-exe {
  color: var(--accent-light);
  font-family: var(--mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.nav-github {
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.nav-github:hover {
  opacity: 1;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
}

.hero-content {
  max-width: 720px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 32px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.title-line {
  display: block;
  color: #fff;
}

.title-gradient {
  background: linear-gradient(135deg, var(--accent-light), var(--green), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(108, 92, 231, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: #fff;
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.03);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  font-family: var(--mono);
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ===== Section Common ===== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-light);
  margin-bottom: 16px;
  opacity: 0.8;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Extensions Grid ===== */
.extensions {
  padding: 80px 24px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.extensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.ext-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.ext-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.ext-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.ext-card:hover .ext-card-glow {
  opacity: 1;
}

.ext-card-soon {
  border-style: dashed;
  opacity: 0.6;
}

.ext-card-soon:hover {
  opacity: 0.8;
  transform: none;
}

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

.ext-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ext-icon-freshdesk {
  background: linear-gradient(135deg, #ff9f43, #ee5a24);
  color: #fff;
}

.ext-icon-mouse {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
}

.ext-icon-focus {
  background: linear-gradient(135deg, #e74c3c, #e67e22);
  color: #fff;
}

.ext-icon-notes {
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  color: #fff;
}

.ext-icon-clear {
  background: linear-gradient(135deg, #00d68f, #00b87c);
  color: #fff;
}

.ext-icon-soon {
  background: var(--border);
  color: var(--text-dim);
}

.ext-badge-version {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.ext-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.ext-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.ext-features {
  list-style: none;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ext-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.ext-features li svg {
  color: var(--green);
  flex-shrink: 0;
}

.ext-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ext-tag {
  padding: 4px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== About Section ===== */
.about {
  padding: 80px 24px 100px;
  background: linear-gradient(180deg, transparent, rgba(108, 92, 231, 0.03), transparent);
}

.about-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 60px;
}

.about-principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.principle {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
  transition: all 0.3s;
}

.principle:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.principle-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent-light);
}

.principle h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.principle p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Upgrade / Pricing Section ===== */
.upgrade {
  padding: 80px 24px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.upgrade-inner {
  text-align: center;
}

.pricing-card {
  max-width: 480px;
  margin: 0 auto 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--accent-light));
}

.pricing-header {
  margin-bottom: 32px;
}

.pricing-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
}

.pricing-header h3 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.price-amount {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  font-family: var(--mono);
  line-height: 1;
}

.price-period {
  font-size: 14px;
  color: var(--text-dim);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.pricing-features li svg {
  flex-shrink: 0;
}

.pricing-btn {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 16px;
  margin-bottom: 16px;
}

.pricing-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.pricing-how {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.pricing-how h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.how-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: left;
}

.how-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(108, 92, 231, 0.2);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Comparison Table */
.pricing-comparison {
  max-width: 520px;
  margin: 0 auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

.comparison-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  color: var(--text-muted);
}

.comparison-table td {
  color: var(--text-muted);
}

.comparison-table .highlight {
  background: rgba(46, 204, 113, 0.04);
  color: #fff;
}

.comparison-table th.highlight {
  color: var(--green);
}

.check-cell {
  color: var(--green) !important;
  font-weight: 600;
}

.cross-cell {
  color: var(--text-dim) !important;
  opacity: 0.5;
}

/* ===== Footer ===== */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-dim);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .nav-links a:not(.nav-github) {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-stats {
    gap: 20px;
  }

  .extensions {
    padding: 60px 16px 80px;
  }

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

  .about-principles {
    grid-template-columns: 1fr;
  }
}

/* ===== Clickable Card Hint ===== */
.ext-card-clickable {
  cursor: pointer;
}

.ext-click-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s ease;
}

.ext-card-clickable:hover .ext-click-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Screenshot Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 820px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: var(--border);
  color: #fff;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
  padding-right: 48px;
}

.modal-gallery {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.modal-gallery img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 65vh;
}

.modal-gallery img.hidden {
  display: none;
}

.modal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.modal-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-nav-btn:hover {
  background: var(--border);
  color: #fff;
}

.modal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.modal-counter {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  min-width: 50px;
  text-align: center;
}

/* Hide nav when only 1 screenshot */
.modal-nav.single {
  display: none;
}

@media (max-width: 640px) {
  .modal {
    padding: 20px;
    width: 95%;
    border-radius: 12px;
  }

  .modal-title {
    font-size: 17px;
    margin-bottom: 16px;
  }

  .modal-gallery img {
    max-height: 50vh;
  }
}

/* ===== Animations ===== */
.ext-card,
.principle,
.hero-badge,
.hero-title .title-line,
.hero-subtitle,
.hero-actions,
.hero-stats {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.hero-badge { animation-delay: 0.1s; }
.hero-title .title-line:nth-child(1) { animation-delay: 0.2s; }
.hero-title .title-line:nth-child(2) { animation-delay: 0.3s; }
.hero-subtitle { animation-delay: 0.4s; }
.hero-actions { animation-delay: 0.5s; }
.hero-stats { animation-delay: 0.6s; }

.ext-card:nth-child(1) { animation-delay: 0.1s; }
.ext-card:nth-child(2) { animation-delay: 0.2s; }
.ext-card:nth-child(3) { animation-delay: 0.3s; }
.ext-card:nth-child(4) { animation-delay: 0.4s; }
.ext-card:nth-child(5) { animation-delay: 0.5s; }
.ext-card:nth-child(6) { animation-delay: 0.6s; }

.principle:nth-child(1) { animation-delay: 0.1s; }
.principle:nth-child(2) { animation-delay: 0.2s; }
.principle:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
