/* ===== CSS VARIABLES ===== */
:root {
  --bg: #080c14;
  --bg2: #0d1422;
  --bg3: #111927;
  --card: #131d2e;
  --card2: #172035;
  --border: #1e2d45;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #64748b;
  --accent: #3b82f6;
  --accent2: #2563eb;
  --accent-glow: rgba(59,130,246,0.15);
  --green: #22c55e;
  --purple: #a855f7;
  --gold: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --font: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 32px; padding: 0 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 700; }
.brand-icon { color: var(--accent); font-size: 1.2rem; }
.brand .accent { color: var(--accent); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text2); font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }
.mobile-menu { display: none; flex-direction: column; gap: 0; background: var(--bg2); border-top: 1px solid var(--border); }
.mobile-menu a { padding: 14px 24px; color: var(--text2); border-bottom: 1px solid var(--border); }
.mobile-menu.open { display: flex; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px; font-family: var(--font); font-weight: 600;
  font-size: 0.9rem; cursor: pointer; border: none; transition: all var(--transition);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,130,246,0.4); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--card); color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }
.btn-xl { padding: 16px 36px; font-size: 1.1rem; border-radius: 12px; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; border-radius: 6px; }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.w-full { width: 100%; justify-content: center; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 90vh; display: flex; align-items: center;
  overflow: hidden; padding: 60px 0;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 40%, rgba(59,130,246,0.12) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 70%, rgba(168,85,247,0.08) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 2; max-width: 680px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-glow); border: 1px solid rgba(59,130,246,0.3);
  color: var(--accent); padding: 6px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 24px; animation: fadeUp 0.6s ease;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.15;
  margin-bottom: 20px; animation: fadeUp 0.7s ease;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { color: var(--text2); font-size: 1.15rem; margin-bottom: 36px; animation: fadeUp 0.8s ease; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; animation: fadeUp 0.9s ease; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 56px; padding-top: 40px;
  border-top: 1px solid var(--border); animation: fadeUp 1s ease;
}
.stat-num { display: block; font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-lbl { font-size: 0.85rem; color: var(--text3); }
.hero-visual {
  position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
  animation: float 4s ease-in-out infinite;
}
.code-block {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); width: 400px;
}
.code-bar { display: flex; gap: 6px; padding: 12px 16px; background: var(--bg2); }
.code-bar span { width: 12px; height: 12px; border-radius: 50%; background: var(--border); }
.code-bar span:nth-child(1) { background: #ef4444; }
.code-bar span:nth-child(2) { background: #f59e0b; }
.code-bar span:nth-child(3) { background: #22c55e; }
.code-block pre { padding: 24px; font-family: var(--mono); font-size: 0.9rem; line-height: 2; }
.c-k { color: #a78bfa; }
.c-f { color: #60a5fa; }
.c-p { color: #34d399; }

/* ===== SECTION HEADER ===== */
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 40px; }
.section-header h2 { font-size: 1.8rem; font-weight: 700; }
.view-all { color: var(--accent); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }
.view-all:hover { gap: 10px; }

/* ===== CATEGORY GRID ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.cat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; display: block; transition: all var(--transition);
}
.cat-card:hover { border-color: var(--accent); background: var(--card2); transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-icon { font-size: 2rem; color: var(--accent); margin-bottom: 16px; }
.cat-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.cat-card p { font-size: 0.85rem; color: var(--text2); margin-bottom: 12px; }
.cat-count { font-size: 0.8rem; color: var(--text3); font-family: var(--mono); }

/* ===== PRODUCT CARDS ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all var(--transition); display: flex; flex-direction: column;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card.featured { border-color: rgba(245,158,11,0.3); }
.product-card.featured:hover { border-color: var(--gold); }
.product-thumb { position: relative; height: 180px; overflow: hidden; background: var(--bg2); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; color: var(--border); }
.thumb-placeholder.lg { height: 300px; }
.badge-featured {
  position: absolute; top: 12px; right: 12px;
  background: var(--gold); color: #000; font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px;
}
.product-info { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-size: 0.75rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.product-info h3 { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.product-info h3 a:hover { color: var(--accent); }
.product-info p { font-size: 0.85rem; color: var(--text2); flex: 1; }
.product-meta { display: flex; gap: 10px; align-items: center; }
.dl-count { font-size: 0.8rem; color: var(--text3); margin-left: auto; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.price { font-size: 1.1rem; font-weight: 700; color: var(--green); }

/* ===== TAGS ===== */
.tag { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(59,130,246,0.2); padding: 3px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== PAGE HEADER ===== */
.page-header { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 48px 0; }
.page-header h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 8px; }
.page-header p { color: var(--text2); }

/* ===== PRODUCTS PAGE ===== */
.products-page { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
.filter-sidebar { display: flex; flex-direction: column; gap: 20px; }
.filter-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.filter-card h3 { font-size: 0.9rem; font-weight: 600; color: var(--text2); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.search-input { width: 100%; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-family: var(--font); margin-bottom: 10px; }
.search-input:focus { outline: none; border-color: var(--accent); }
.cat-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cat-list a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text2); font-size: 0.9rem; transition: all var(--transition); }
.cat-list a:hover, .cat-list a.active { background: var(--accent-glow); color: var(--accent); }
.empty-state { text-align: center; padding: 80px 24px; color: var(--text3); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1.2rem; color: var(--text2); margin-bottom: 8px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); color: var(--text2); font-weight: 600; transition: all var(--transition); }
.pagination a.active, .pagination a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== PRODUCT DETAIL ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.product-detail-img img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.product-detail-info { display: flex; flex-direction: column; gap: 16px; }
.product-detail-info h1 { font-size: 2rem; font-weight: 700; }
.version-badge { background: var(--accent-glow); color: var(--accent); padding: 4px 12px; border-radius: 50px; font-size: 0.8rem; font-family: var(--mono); display: inline-block; }
.price-tag { font-size: 2rem; font-weight: 700; color: var(--green); }
.product-desc { color: var(--text2); line-height: 1.8; }
.product-stats { display: flex; flex-wrap: wrap; gap: 20px; padding: 16px; background: var(--bg2); border-radius: 10px; }
.product-stats span { font-size: 0.85rem; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.download-area { display: flex; flex-direction: column; gap: 16px; }
.download-link-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.download-link-box p { color: var(--green); font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.link-copy { display: flex; gap: 8px; }
.link-copy input { flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-family: var(--mono); font-size: 0.85rem; }
.download-link-box small { color: var(--text3); font-size: 0.8rem; margin-top: 8px; display: block; }
.no-file-msg { color: var(--text3); display: flex; align-items: center; gap: 8px; padding: 16px; background: var(--card); border-radius: 10px; }
.breadcrumb { font-size: 0.85rem; color: var(--text3); margin-bottom: 16px; }
.breadcrumb a { color: var(--text2); }
.breadcrumb a:hover { color: var(--accent); }
.product-detail-header { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 24px 0; }

/* ===== WHY SECTION ===== */
.why-section { background: var(--bg2); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.why-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; text-align: center; }
.why-card i { font-size: 2rem; color: var(--accent); margin-bottom: 16px; display: block; }
.why-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.why-card p { font-size: 0.85rem; color: var(--text2); }

/* ===== FOOTER ===== */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 48px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; align-items: start; }
.footer-brand p { color: var(--text3); font-size: 0.9rem; margin-top: 8px; }
.footer-links h4 { font-size: 0.85rem; font-weight: 700; color: var(--text2); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links a { display: block; color: var(--text3); font-size: 0.9rem; padding: 4px 0; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--text3); font-size: 0.85rem; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 32px; right: 32px; background: var(--card2); border: 1px solid var(--border); color: var(--text); padding: 14px 24px; border-radius: 10px; opacity: 0; transform: translateY(20px); transition: all 0.3s ease; z-index: 9999; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateY(0); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(-50%); } 50% { transform: translateY(calc(-50% - 12px)); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-visual { display: none; }
  .product-detail { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .products-page { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .section { padding: 48px 0; }
}
