/* ================================================================
   Genesis Softwares — Main Styles (v3.1)
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-1: #8b5cf6;
  --brand-2: #3b82f6;
  --brand-3: #6366f1;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
  --grad-soft: linear-gradient(135deg, rgba(139,92,246,.12), rgba(59,130,246,.12));

  --bg: #07080f;
  --bg-2: #0d0f18;
  --bg-3: #131624;
  --card: #10131e;
  --card-hover: #151928;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(139, 92, 246, 0.4);
  --text: #f0f2f8;
  --text-dim: #9ca3b8;
  --text-mute: #5f6478;
  --shadow: 0 20px 60px rgba(0,0,0,.5);
  --glow: 0 0 60px rgba(139, 92, 246, 0.35);
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #ffffff;
  --bg-3: #eef0f6;
  --card: #ffffff;
  --card-hover: #f9fafc;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(139, 92, 246, 0.4);
  --text: #0e1220;
  --text-dim: #4a5060;
  --text-mute: #8a90a0;
  --shadow: 0 20px 60px rgba(60, 80, 160, .12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ========== BACKGROUND ========== */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(139,92,246,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  z-index: -2;
  mask-image: radial-gradient(ellipse at 50% 20%, black 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, black 0%, transparent 65%);
}
.bg-glow {
  position: fixed; width: 600px; height: 600px; border-radius: 50%;
  filter: blur(140px); z-index: -1; opacity: 0.35; pointer-events: none;
}
.bg-glow-1 { top: -150px; left: -150px; background: #8b5cf6; animation: float 25s ease-in-out infinite; }
.bg-glow-2 { top: 200px; right: -150px; background: #3b82f6; animation: float 25s ease-in-out infinite reverse; }
[data-theme="light"] .bg-glow { opacity: 0.2; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(60px, 60px); }
}

/* ========== ICONS ========== */
.icon-chip {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-soft);
  border: 1px solid var(--border-hover);
  color: var(--brand-1);
  flex-shrink: 0;
  line-height: 0;
}
.icon-chip > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.icon-chip svg {
  width: 20px; height: 20px;
  stroke-width: 2;
  display: block;
}

/* ========== HEADER ========== */
.header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(7, 8, 15, 0.75);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease;
}
[data-theme="light"] .header { background: rgba(255, 255, 255, 0.8); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo-img {
  width: 36px; height: 36px; border-radius: 9px; object-fit: cover;
  display: block;
}
.logo-img.logo-light { display: none; }
[data-theme="light"] .logo-img.logo-dark { display: none; }
[data-theme="light"] .logo-img.logo-light { display: block; }

.logo-fallback {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--grad);
  display: none; align-items: center; justify-content: center;
  font-weight: 900; color: white; font-size: 20px;
  box-shadow: var(--glow);
}
.logo-fallback.active { display: flex; }

.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-title { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; }
.logo-sub { font-size: 10px; color: var(--text-mute); font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; }

.nav { display: flex; gap: 2px; }
.nav-link {
  padding: 8px 14px; border-radius: 8px; text-decoration: none;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  transition: all 0.2s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }

.header-actions { display: flex; gap: 10px; align-items: center; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); transform: rotate(15deg); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.header-search {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px; height: 38px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; width: 260px;
  transition: all 0.25s;
}
.header-search:focus-within { border-color: var(--border-hover); background: var(--card-hover); }
.header-search span { display: inline-flex; align-items: center; }
.header-search svg { width: 14px; height: 14px; color: var(--text-mute); flex-shrink: 0; }
.header-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 13px;
  min-width: 0;
}
.header-search input::placeholder { color: var(--text-mute); }
.header-search kbd {
  padding: 2px 6px; border-radius: 4px;
  background: var(--bg-3); border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--text-mute); font-weight: 500;
  flex-shrink: 0;
}

/* ========== CATEGORY BAR ========== */
.category-bar {
  border-top: 1px solid var(--border);
  background: rgba(13, 15, 24, 0.6);
  backdrop-filter: blur(12px);
}
[data-theme="light"] .category-bar { background: rgba(238, 240, 246, 0.7); }

.category-bar-inner {
  display: flex; gap: 4px;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 8px 24px;
  scrollbar-width: none;
}
.category-bar-inner::-webkit-scrollbar { display: none; }
.category-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.category-chip svg { width: 15px; height: 15px; stroke-width: 1.8; opacity: 0.85; }
.category-chip:hover { color: var(--text); background: var(--card); }
.category-chip.active {
  background: var(--grad-soft); color: var(--text);
  border-color: var(--border-hover);
}
.category-chip.active svg { color: var(--brand-1); opacity: 1; }
.category-chip-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  color: var(--text-mute);
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}
[data-theme="light"] .category-chip-count { background: rgba(0,0,0,0.05); }
.category-chip.active .category-chip-count {
  background: rgba(139, 92, 246, 0.2);
  color: var(--brand-1);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 100px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn span { display: inline-flex; align-items: center; }
.btn svg { width: 15px; height: 15px; stroke-width: 2; }
.btn-primary {
  background: var(--grad); color: white;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--border-hover); background: var(--card); }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ========== HERO V2 ========== */
.hero-v2 { padding: 60px 0 40px; }
.hero-v2-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: start;
}

.hero-v2-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s ease;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.hero-v2-desc {
  font-size: 15px; color: var(--text-dim);
  max-width: 480px; margin-bottom: 28px;
  line-height: 1.6;
  animation: fadeInUp 0.7s ease 0.1s backwards;
}

.hero-search {
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px; height: 52px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; max-width: 480px;
  margin-bottom: 20px;
  transition: all 0.25s;
  animation: fadeInUp 0.7s ease 0.15s backwards;
}
.hero-search:focus-within { border-color: var(--border-hover); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.08); }
.hero-search span { display: inline-flex; align-items: center; }
.hero-search svg { width: 16px; height: 16px; color: var(--text-mute); }
.hero-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 14px;
}
.hero-search input::placeholder { color: var(--text-mute); }
.hero-search kbd {
  padding: 3px 8px; border-radius: 5px;
  background: var(--bg-3); border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--text-mute); font-weight: 500;
}

.hero-v2-tags {
  display: flex; gap: 20px; margin-bottom: 32px; flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.2s backwards;
}
.hero-v2-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); font-weight: 500;
}
.hero-v2-tag span { display: inline-flex; align-items: center; }
.hero-v2-tag svg { width: 14px; height: 14px; color: var(--brand-1); }
.hero-v2-tag.green svg { color: #10d876; }
.hero-v2-tag.blue svg { color: var(--brand-2); }

.hero-v2-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.25s backwards;
}

/* Hero side list */
.hero-v2-right {
  display: flex; flex-direction: column; gap: 12px;
  animation: fadeInUp 0.7s ease 0.3s backwards;
}

.side-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none; color: var(--text);
  transition: all 0.25s ease;
}
.side-item:hover {
  border-color: var(--border-hover);
  transform: translateX(-4px);
  background: var(--card-hover);
}
.side-item-img {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--grad-soft);
  object-fit: cover;
  flex-shrink: 0;
}
.side-item-info { flex: 1; min-width: 0; }
.side-item-name {
  font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-item-meta {
  font-size: 12px; color: var(--text-mute); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-item-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.side-item-rating {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600;
}
.side-item-rating svg { width: 12px; height: 12px; color: #fbbf24; fill: #fbbf24; }
.side-item-dl {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mute);
  transition: all 0.2s;
}
.side-item:hover .side-item-dl { color: var(--brand-1); }
.side-item-dl svg { width: 14px; height: 14px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== SECTION HEADS ========== */
.section-head-v2 {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.section-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-head-left > div:last-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-head-left h2 {
  font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
  margin: 0;
}
.section-head-left p {
  font-size: 13px; color: var(--text-mute); margin: 2px 0 0 0; line-height: 1.3;
}

.section-arrows { display: flex; gap: 6px; }
.arrow-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.arrow-btn:hover { color: var(--text); border-color: var(--border-hover); }
.arrow-btn svg { width: 16px; height: 16px; }

/* ========== TRENDING ========== */
.trending { padding: 40px 0; }
.trending-scroll { overflow: hidden; margin: 0 -12px; padding: 4px 12px; }
.trending-track {
  display: flex; gap: 16px;
  scroll-behavior: smooth;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
}
.trending-track::-webkit-scrollbar { display: none; }

.trending-card {
  flex: 0 0 300px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none; color: var(--text);
  transition: all 0.3s ease;
  display: flex; gap: 14px;
  cursor: pointer;
  align-items: flex-start;
}
.trending-card:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
  transform: translateY(-3px);
}
.trending-card-img {
  width: 56px; height: 56px; border-radius: 10px;
  background: var(--grad-soft); object-fit: cover;
  flex-shrink: 0;
}
.trending-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.trending-card-name {
  font-size: 14px; font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trending-card-cat {
  font-size: 11px;
  color: var(--brand-1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.trending-card-tags {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap;
}
.trending-card-tag {
  font-size: 11px;
  color: var(--text-mute);
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.trending-card-tag svg { width: 10px; height: 10px; }

/* ========== CATALOG ========== */
.catalog { padding: 40px 0; }

.catalog-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.catalog-search {
  flex: 1;
  min-width: 240px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; height: 46px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.25s;
}
.catalog-search:focus-within { border-color: var(--border-hover); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.08); }
.catalog-search span { display: inline-flex; align-items: center; }
.catalog-search svg { width: 15px; height: 15px; color: var(--text-mute); flex-shrink: 0; }
.catalog-search input {
  flex: 1;
  background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 14px;
  min-width: 0;
}
.catalog-search input::placeholder { color: var(--text-mute); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.filter-chip {
  padding: 8px 16px; border-radius: 8px;
  background: transparent; border: none;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.filter-chip:hover { color: var(--text); }
.filter-chip.active { background: var(--grad); color: white; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35); }

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text);
  position: relative;
  animation: cardIn 0.5s ease backwards;
  display: flex; flex-direction: column;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--card-hover);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.12);
}

.product-card-image {
  aspect-ratio: 16 / 10;
  background: var(--grad-soft);
  position: relative; overflow: hidden;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card-image img { transform: scale(1.06); }
.product-card-image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,8,15,.85), transparent 55%);
}

.product-card-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(0,0,0,.65); backdrop-filter: blur(10px);
  color: white; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  z-index: 2;
}
.product-card-badge.cheat { background: rgba(139, 92, 246, 0.9); }
.product-card-badge.crack { background: rgba(59, 130, 246, 0.9); }

.product-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.product-card-icon {
  width: 32px; height: 32px; border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--grad-soft);
}
.product-card-head-text { flex: 1; min-width: 0; }
.product-card-cat { font-size: 10px; color: var(--brand-1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.product-card-title { font-size: 15px; font-weight: 700; margin-top: 2px; letter-spacing: -0.01em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card-desc {
  font-size: 13px; color: var(--text-dim); margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}

.product-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-mute);
}
.product-card-downloads { display: flex; align-items: center; gap: 5px; }
.product-card-downloads svg { width: 12px; height: 12px; }
.product-card-rating { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text-dim); }
.product-card-rating svg { width: 12px; height: 12px; color: #fbbf24; fill: #fbbf24; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-dim); }
.empty-icon-wrap {
  width: 72px; height: 72px; margin: 0 auto 16px;
  border-radius: 20px;
  background: var(--grad-soft); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-1);
}
.empty-icon-wrap svg { width: 32px; height: 32px; stroke-width: 1.5; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; color: var(--text); }

/* ========== LATEST ========== */
.latest-section { padding: 40px 0; }
.latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.latest-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none; color: var(--text);
  transition: all 0.25s ease;
}
.latest-item:hover { border-color: var(--border-hover); background: var(--card-hover); transform: translateX(4px); }
.latest-item-img {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--grad-soft); object-fit: cover;
  flex-shrink: 0;
}
.latest-item-info { flex: 1; min-width: 0; }
.latest-item-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-item-meta { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.latest-item-badge {
  padding: 3px 8px; border-radius: 5px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  flex-shrink: 0;
}
.latest-item-badge.new { background: rgba(16, 216, 118, 0.15); color: #10d876; }
.latest-item-badge.updated { background: rgba(139, 92, 246, 0.15); color: var(--brand-1); }

/* ========== ABOUT V2 ========== */
.about-v2 { padding: 60px 0 80px; }
.about-v2-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature-tile {
  padding: 28px 24px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s;
  position: relative; overflow: hidden;
}
.feature-tile::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-soft); opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.feature-tile:hover::before { opacity: 1; }
.feature-tile:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.feature-tile-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad); color: white;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
  position: relative; z-index: 1;
}
.feature-tile-icon svg { width: 20px; height: 20px; }
.feature-tile h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; position: relative; z-index: 1; }
.feature-tile p { font-size: 13px; color: var(--text-dim); position: relative; z-index: 1; }

/* ========== FOOTER ========== */
.footer { padding: 60px 0 24px; border-top: 1px solid var(--border); margin-top: 40px; background: var(--bg-2); }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-desc { font-size: 13px; color: var(--text-dim); max-width: 300px; }
.footer-col h4 { font-size: 12px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text); }
.footer-col a {
  display: block; color: var(--text-dim); text-decoration: none;
  padding: 4px 0; font-size: 13px; transition: color 0.2s;
}
.footer-col a:hover { color: var(--brand-1); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-mute);
}

/* ========== PRODUCT PAGE ========== */
.product-page { padding: 32px 0 80px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-dim); text-decoration: none;
  padding: 8px 14px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
  margin-bottom: 32px;
  transition: all 0.2s;
}
.back-link:hover { color: var(--text); border-color: var(--border-hover); }
.back-link span { display: inline-flex; align-items: center; }
.back-link svg { width: 14px; height: 14px; }

.product-hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px;
  margin-bottom: 56px;
  animation: fadeInUp 0.5s ease;
}
.product-hero-media {
  aspect-ratio: 16/10; border-radius: 16px; overflow: hidden;
  background: var(--grad-soft); border: 1px solid var(--border);
  position: relative;
}
.product-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.product-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px; border-radius: 6px;
  background: rgba(0,0,0,.65); backdrop-filter: blur(10px);
  color: white; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
}

.product-hero-info { display: flex; flex-direction: column; justify-content: center; }
.product-hero-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.product-hero-icon {
  width: 56px; height: 56px; border-radius: 14px;
  object-fit: cover;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.product-meta { display: flex; gap: 10px; margin-bottom: 0; flex-wrap: wrap; }
.product-category {
  padding: 4px 12px; border-radius: 100px;
  background: var(--grad-soft); color: var(--brand-1);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  border: 1px solid var(--border-hover);
}
.product-version {
  padding: 4px 12px; border-radius: 100px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; font-family: 'JetBrains Mono', monospace;
}
.product-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 100px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 12px; font-weight: 500;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #10d876; box-shadow: 0 0 8px #10d876; }

.product-title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; line-height: 1.1; }
.product-desc { font-size: 15px; color: var(--text-dim); margin-bottom: 28px; }

.product-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 28px;
  padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
}
.product-stat { text-align: center; }
.product-stat-val { font-size: 20px; font-weight: 800; }
.product-stat-lbl { font-size: 10px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }

.product-content { display: grid; grid-template-columns: 1fr; gap: 32px; max-width: 900px; }
.content-block h2 { font-size: 22px; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.01em; }
.content-block p {
  color: var(--text-dim); font-size: 15px; line-height: 1.75;
  white-space: pre-wrap;  /* Preserve line breaks in descriptions */
  word-wrap: break-word;
}

.features-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px;
}
.features-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px;
  transition: all 0.2s;
}
.features-list-item:hover { border-color: var(--border-hover); }
.check-mark {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
}
.check-mark svg { width: 10px; height: 10px; stroke-width: 3; }

/* ========== MODAL ========== */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.active { display: flex; animation: modalIn 0.25s ease; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
}
.modal-content {
  position: relative;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow);
  animation: modalContentIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-content-large { max-width: 900px; }
@keyframes modalContentIn {
  from { opacity: 0; transform: translateY(15px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.modal-close:hover { background: var(--grad); color: white; }
.modal-close svg { width: 14px; height: 14px; }

.modal-header { padding: 26px 28px 18px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.modal-header p { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

.modal-tabs { display: flex; padding: 0 28px; border-bottom: 1px solid var(--border); gap: 4px; }
.modal-tab {
  padding: 14px 18px; background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  font-family: inherit;
  position: relative;
  transition: color 0.2s;
}
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--text); }
.modal-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--grad); border-radius: 2px;
}

.modal-body { padding: 22px 28px 26px; }
.modal-tab-content { display: none; animation: fadeIn 0.25s ease; }
.modal-tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.script-box {
  background: #0a0b12; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  margin-bottom: 12px;
}
[data-theme="light"] .script-box { background: #14161f; border-color: rgba(255,255,255,0.1); }
.script-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.script-lang {
  display: inline-flex; align-items: center; gap: 6px;
  color: #a4a8b8; font-size: 12px; font-weight: 600;
}
.script-lang span { display: inline-flex; align-items: center; }
.script-lang svg { width: 13px; height: 13px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 7px;
  background: var(--grad); color: white;
  border: none; cursor: pointer;
  font-size: 12px; font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
}
.copy-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(139,92,246,.4); }
.copy-btn.copied { background: #10d876; }
.copy-btn span { display: inline-flex; align-items: center; }
.copy-btn svg { width: 12px; height: 12px; }
.script-code {
  padding: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; line-height: 1.6;
  color: #d0d3e0;
  white-space: pre-wrap; word-break: break-all;
}
.script-note {
  padding: 11px 14px; border-radius: 9px;
  background: var(--grad-soft);
  border: 1px solid var(--border-hover);
  font-size: 13px; color: var(--text-dim);
  display: flex; align-items: center; gap: 8px;
}
.script-note span { display: inline-flex; align-items: center; }
.script-note svg { width: 15px; height: 15px; color: var(--brand-1); flex-shrink: 0; }

.instruction-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.instruction-list li { display: flex; gap: 14px; align-items: flex-start; }
.instruction-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px;
  background: var(--grad); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.instruction-list h4 { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.instruction-list p { font-size: 13px; color: var(--text-dim); }
kbd {
  padding: 2px 6px; border-radius: 4px;
  background: var(--card); border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
}

.video-wrapper {
  position: relative; aspect-ratio: 16/9;
  border-radius: 10px; overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .hero-v2-grid { grid-template-columns: 1fr; gap: 40px; }
  .header-search { width: 200px; }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .header-search { display: none; }
  .hero-v2 { padding: 40px 0 20px; }
  .product-hero { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .section-head-v2 { flex-direction: column; align-items: flex-start; }
  .catalog-toolbar { flex-direction: column; align-items: stretch; }
  .filters { justify-content: center; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .header-inner { height: 60px; }
  .logo-text { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .product-stats-row { grid-template-columns: 1fr; }
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 13px 18px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-weight: 500; font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 2000;
  transform: translateY(100px); opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; align-items: center; gap: 8px;
}
.toast svg { width: 16px; height: 16px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(16, 216, 118, 0.5); }
.toast.success svg { color: #10d876; }
.toast.error { border-color: rgba(255, 92, 92, 0.5); }
.toast.error svg { color: #ff5c5c; }
.toast.info { border-color: rgba(139, 92, 246, 0.5); }
.toast.info svg { color: var(--brand-1); }
