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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --accent-light: #67e8f9;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 30px -5px rgba(15, 23, 42, 0.10), 0 8px 16px -8px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 0 1px rgba(37, 99, 235, 0.08), 0 8px 24px -8px rgba(37, 99, 235, 0.20);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --gradient-soft: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
}

/* ====== Background Decoration ====== */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  top: -100px;
  right: -100px;
}

.bg-glow-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  top: 300px;
  left: -150px;
}

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

/* ====== Navbar ====== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

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

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text);
  background: var(--border-light);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.nav-search {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 38px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-kbd {
  position: absolute;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  pointer-events: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ====== Hero ====== */
.hero {
  padding: 100px 24px 0;
  text-align: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero-container {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-gradient-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Floating icons */
.floating-icons {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 700px;
  height: 300px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.fl-icon {
  position: absolute;
  font-size: 40px;
  opacity: 0.12;
  animation: floatIcon 5s ease-in-out infinite;
}

.fl-icon:nth-child(1) { top: 10%; left: 5%; }
.fl-icon:nth-child(2) { top: 25%; right: 5%; }
.fl-icon:nth-child(3) { top: 55%; left: 10%; }
.fl-icon:nth-child(4) { top: 15%; left: 45%; }
.fl-icon:nth-child(5) { top: 55%; right: 15%; }
.fl-icon:nth-child(6) { top: 40%; left: 80%; }

@keyframes floatIcon {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(var(--dx), var(--dy)) rotate(var(--dr)); }
  66% { transform: translate(calc(var(--dx) * -0.5), calc(var(--dy) * -0.7)) rotate(calc(var(--dr) * -0.5)); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

.hero-title {
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.12;
  margin-bottom: 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero search */
.hero-search {
  margin-bottom: 56px;
}

.hero-search-box {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.hero-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-lg);
}

.hs-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.hero-search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 10px 14px;
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.hero-search-box input::placeholder {
  color: var(--text-muted);
}

.hs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--gradient);
  border-radius: 11px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.hs-btn:hover {
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.hero-search-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.hint-tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--border-light);
  border-radius: 100px;
  transition: all 0.2s ease;
}

.hint-tag:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

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

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 28px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: var(--gradient-soft);
  color: var(--primary);
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

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

/* ====== Section Styles ====== */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.section-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  padding: 2px 8px;
  border-radius: 5px;
  vertical-align: middle;
  margin-left: 8px;
  letter-spacing: 0.5px;
}

.see-all-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  transition: gap 0.2s ease;
}

.see-all-link:hover {
  gap: 8px;
}

/* ====== Featured Section ====== */
.featured-section {
  padding: 60px 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.featured-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  opacity: 0.04;
  transform: translate(40%, -40%);
  transition: all 0.4s ease;
  pointer-events: none;
}

.featured-card:nth-child(1)::after { background: #2563eb; }
.featured-card:nth-child(2)::after { background: #7c3aed; }
.featured-card:nth-child(3)::after { background: #06b6d4; }
.featured-card:nth-child(4)::after { background: #f43f5e; }

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.featured-card:hover::after {
  opacity: 0.08;
  transform: translate(30%, -30%) scale(1.2);
}

.featured-icon-wrap {
  flex-shrink: 0;
}

.featured-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.featured-rank {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.featured-body {
  flex: 1;
  min-width: 0;
}

.featured-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-version {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.featured-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.featured-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.featured-meta-item svg {
  opacity: 0.6;
}

/* ====== Recent Section ====== */
.recent-section {
  padding: 40px 0;
}

.recent-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.recent-scroll::-webkit-scrollbar {
  height: 4px;
}

.recent-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.recent-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.recent-card {
  flex: 0 0 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  scroll-snap-align: start;
  position: relative;
}

.recent-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.recent-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.recent-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
}

.recent-card-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.recent-card-version {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.recent-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-card-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.recent-card-date .date-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* ====== Section Headers ====== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ====== Categories ====== */
.categories-section {
  padding: 40px 0;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.chip-count {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.06);
}

.chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ====== Sort Bar ====== */
.sort-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.sort-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 7px;
  transition: all 0.2s ease;
}

.sort-btn:hover {
  color: var(--text);
}

.sort-btn.active {
  background: var(--gradient);
  color: #fff;
}

/* ====== Software Grid ====== */
.software-section {
  padding: 20px 0 60px;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.software-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.software-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.software-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.software-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  position: relative;
}

.card-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-version {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--border-light);
  color: var(--text-secondary);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

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

.card-platform {
  display: flex;
  gap: 4px;
}

.platform-icon {
  font-size: 14px;
  opacity: 0.6;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--gradient);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Card entrance animation */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.software-card {
  animation: cardFadeIn 0.4s ease-out both;
}

/* ====== Empty State ====== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text-secondary);
}

/* ====== About Section ====== */
.about-section {
  padding: 60px 0 80px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.about-badge {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  border-radius: 100px;
  margin-bottom: 16px;
}

.about-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.about-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-soft);
  color: var(--primary);
  flex-shrink: 0;
}

.feature-name {
  font-size: 15px;
  font-weight: 600;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* Terminal Window */
.terminal-window {
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px -15px rgba(15, 23, 42, 0.3);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
}

.terminal-body .line {
  color: #e2e8f0;
}

.prompt {
  color: #06b6d4;
}

.comment {
  color: #64748b;
}

.success {
  color: #22c55e;
}

.cursor {
  display: inline-block;
  width: 8px;
  color: #06b6d4;
  animation: blink 1s step-end infinite;
}

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

/* ====== Footer ====== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 280px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

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

.footer-tech .heart {
  color: #ef4444;
}

.footer-links-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-link {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.admin-link:hover {
  color: var(--primary);
}

/* ====== Modal ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-muted);
  background: var(--border-light);
  z-index: 1;
  transition: all 0.2s ease;
}

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

.modal-content {
  padding: 32px;
}

.modal-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.modal-version {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.info-item {
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.info-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.modal-tags .tag {
  font-size: 12px;
  padding: 4px 10px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
}

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

/* ====== Back to Top ====== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  box-shadow: var(--shadow);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 24px;
  background: var(--text);
  color: #fff;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ====== Category Password Modal ====== */
.pwd-modal {
  max-width: 400px;
  text-align: center;
}

.pwd-modal-body {
  padding: 40px 32px 32px;
}

.pwd-lock-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(6,182,212,0.1));
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}

.pwd-title {
  font-size: 20px; font-weight: 700; margin-bottom: 8px;
  color: var(--text);
}

.pwd-subtitle {
  font-size: 14px; color: var(--text-muted); margin-bottom: 24px;
}

.pwd-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  text-align: center;
  letter-spacing: 2px;
  transition: border-color 0.2s;
}

.pwd-input:focus {
  border-color: var(--primary);
}

.pwd-error {
  font-size: 13px; color: #ef4444; margin-top: 10px; min-height: 18px;
}

.pwd-submit {
  width: 100%; margin-top: 16px; justify-content: center;
}

/* Locked category chip */
.chip.chip-locked {
  position: relative;
}

.chip-locked .chip-lock {
  font-size: 11px;
  margin-left: 2px;
  opacity: 0.7;
}

.chip-locked.unlocked .chip-lock {
  display: none;
}

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

  .about-card {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 2px;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-search {
    display: none;
  }

  .hero {
    padding: 64px 20px 0;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
  }

  .stat-divider {
    display: none;
  }

  .hero-title {
    font-size: 34px;
    letter-spacing: -1px;
  }

  .hero-search-box {
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px;
  }

  .hero-search-box input {
    order: -1;
    width: 100%;
  }

  .hs-btn {
    width: 100%;
    justify-content: center;
  }

  .floating-icons {
    display: none;
  }

  .featured-card {
    padding: 22px;
    gap: 16px;
  }

  .featured-icon {
    width: 52px;
    height: 52px;
    font-size: 24px;
    border-radius: 14px;
  }

  .featured-name {
    font-size: 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .modal-info-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer-links-row {
    flex-direction: column;
    gap: 6px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 48px 16px 0;
  }

  .hero-title {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-badge {
    font-size: 12px;
  }

  .featured-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .featured-meta {
    justify-content: center;
  }

  .about-card {
    padding: 24px;
  }
}
