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

:root {
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #eef2ff;
  --danger: #e11d48;
  --danger-hover: #be123c;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* === Container === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Top Bar === */
.top-bar {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  padding: 8px 0;
  color: var(--text-muted);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar a { color: var(--text-secondary); transition: color 0.2s; }
.top-bar a:hover { color: var(--accent); }

.social-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.social-icon:hover { opacity: 1; }

/* === Header / Navigation === */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  height: 56px;
}

.header__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__left .social-icon {
  width: 24px;
  height: 24px;
}

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

.nav__list {
  display: flex;
  list-style: none;
  gap: 2px;
}

.nav__link {
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--text);
  background: var(--surface-alt);
  text-decoration: none;
}

.nav__link--active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav__link--active:hover {
  color: var(--accent);
  background: var(--accent-light);
}

/* Dropdown */
.nav__item { position: relative; }

.nav__sub {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 6px;
  z-index: 200;
}

.nav__item:hover > .nav__sub { display: block; }

.nav__sub a {
  display: block;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  white-space: nowrap;
}

.nav__sub a:hover {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

/* Hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.nav__toggle:hover { background: var(--surface-alt); }

.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 1px;
  transition: transform 0.3s;
}

/* === Hero Section === */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  text-align: center;
  padding: 80px 24px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.025em;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.8;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* === Product Hero === */
.product-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 64px 24px;
  text-align: center;
}

.product-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.025em;
}

.product-hero p {
  font-size: 1.05rem;
  opacity: 0.8;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.product-hero .buttons-row {
  justify-content: center;
}

/* === Product Cards Grid === */
.products-grid {
  padding: 64px 0;
}

.products-grid h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 40px;
  color: var(--text);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  transition: all 0.2s;
  color: var(--text);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-2px);
  color: var(--text);
}

.card--red {
  background: var(--accent-light);
  border-color: transparent;
}

.card--red:hover {
  border-color: var(--accent);
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-grow: 1;
}

.card__arrow {
  font-size: 1.25rem;
  margin-top: 16px;
  display: block;
  color: var(--accent);
  transition: transform 0.2s;
}

.card:hover .card__arrow { transform: translateX(4px); }

/* === Section === */
.section {
  padding: 64px 0;
}

.section--gray { background: var(--surface-alt); }

.section--green {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
}

.section h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

.section--green h2 { color: #fff; }
.section--gray h2 { color: var(--text); }

/* === Features List === */
.features-list {
  list-style: none;
  padding: 0;
  line-height: 1.8;
}

.features-list li {
  margin-bottom: 8px;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
}

.features-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.6;
}

/* === Benefits === */
.benefits {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 64px 24px;
}

.benefits h2 {
  text-align: center;
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 32px;
  color: #fff;
}

.benefits ul {
  list-style: none;
  padding: 0;
  max-width: 640px;
  margin: 0 auto;
  font-size: 1rem;
}

.benefits li {
  padding: 8px 0 8px 28px;
  position: relative;
  opacity: 0.85;
}

.benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #34d399;
  font-weight: 700;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--white {
  background: #fff;
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}
.btn--white:hover { background: var(--surface-alt); color: var(--text); }

.btn--green {
  background: var(--accent);
  color: #fff;
}
.btn--green:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); }

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--outline:hover { background: var(--accent); color: #fff; }

.btn--red {
  background: var(--danger);
  color: #fff;
}
.btn--red:hover { background: var(--danger-hover); box-shadow: var(--shadow-md); }

.buttons-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* === Screenshots === */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.screenshots img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}

.screenshot-single {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* === Video === */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* === Tables === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.table-clean {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table-clean thead { background: var(--surface-alt); }

.table-clean th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

.table-clean th:not(:first-child) { text-align: center; }

.table-clean td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.table-clean td:not(:first-child) { text-align: center; }

.table-clean tbody tr:last-child td { border-bottom: none; }

.table-clean tbody tr:hover { background: var(--surface-alt); }

/* === Steps === */
.steps { counter-reset: step; }

.steps li {
  list-style: none;
  counter-increment: step;
  padding: 12px 0 12px 48px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.section--green .steps li::before {
  color: #fff;
}

/* === Changelog === */
.changelog { padding: 40px 0; }

.changelog h2 {
  font-size: 1.375rem;
  margin-bottom: 24px;
}

.changelog-entry {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.changelog-entry:last-child { border-bottom: none; }

.changelog-entry h3 {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 600;
}

.changelog-entry ul {
  list-style: disc;
  padding-left: 24px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* === Legal Page === */
.legal-links { list-style: none; }

.legal-links li {
  border-bottom: 1px solid var(--border);
}

.legal-links li:first-child { border-top: 1px solid var(--border); }

.legal-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s;
}

.legal-links a:hover { color: var(--accent); text-decoration: none; }
.legal-links a::after { content: "→"; font-size: 1.1rem; color: var(--text-muted); transition: transform 0.2s; }
.legal-links a:hover::after { transform: translateX(4px); color: var(--accent); }

/* === Donate / Store Section === */
.donate-section {
  text-align: center;
  padding: 40px 24px;
  max-width: 640px;
  margin: 0 auto;
}

.donate-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.donate-section p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1rem;
}

.donate-section .features-list {
  text-align: left;
  max-width: 400px;
  margin: 0 auto 24px;
}

.donate-section .disclaimer {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.payment-widgets {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin: 24px 0;
}

.payment-widgets > div {
  width: 100%;
  max-width: 500px;
}

/* === Slider === */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-alt);
  max-width: 800px;
  margin: 0 auto;
}

.slider__track {
  display: flex;
  transition: transform 0.4s ease;
}

.slider__slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.slider__slide img {
  max-height: 500px;
  width: auto;
  max-width: 100%;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: background 0.2s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.slider__btn:hover {
  background: #fff;
}

.slider__btn--prev { left: 12px; }
.slider__btn--next { right: 12px; }

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
}

.slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.slider__dot--active {
  background: var(--accent);
}

/* === Blog === */
.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 500px;
  transition: box-shadow 0.2s;
}

.blog-card:hover { box-shadow: var(--shadow-md); }

.blog-card__body { padding: 24px; }

.blog-card__title {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.blog-card__meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* === Footer === */
.footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer p { margin-bottom: 6px; }

.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--accent); }

.footer__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 0.8rem;
}

/* === 404 === */
.page-404 {
  text-align: center;
  padding: 120px 24px;
}

.page-404 h1 {
  font-size: 6rem;
  font-weight: 700;
  color: var(--border);
  letter-spacing: -0.05em;
}

.page-404 p {
  font-size: 1.125rem;
  margin: 16px 0 32px;
  color: var(--text-secondary);
}

/* === Responsive === */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__toggle { display: block; }

  .nav__list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    box-shadow: var(--shadow-lg);
  }

  .nav__list.open { display: flex; }

  .nav__link {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .nav__sub {
    position: static;
    box-shadow: none;
    border: none;
    min-width: 0;
    padding: 0 0 0 16px;
  }

  .nav__item:hover > .nav__sub { display: none; }
  .nav__item.open > .nav__sub { display: block; }

  .nav__sub a {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .header .container { position: relative; }

  .hero h1 { font-size: 1.875rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: 56px 24px; }

  .product-hero h1 { font-size: 1.75rem; }
  .product-hero { padding: 48px 24px; }

  .top-bar__left { font-size: 0.75rem; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .products-grid { padding: 40px 0; }
  .top-bar .container { flex-direction: column; gap: 4px; }
  .footer__links { flex-direction: column; gap: 8px; }
}
