/* ==========================================================================
   Kodelyx Free Tools Portal - Modern Light Mode Design System
   ========================================================================== */

:root {
  /* Light Mode Color Palette (Default) */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-highlight: rgba(99, 102, 241, 0.6);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --primary-500: #4f46e5;
  --primary-600: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.18);
  
  --accent-purple: #9333ea;
  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --gradient-card-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08), transparent 70%);
  
  /* Typography */
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmosphere Subtle Glows */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.bg-glow-1 {
  top: -180px;
  left: 20%;
  background: radial-gradient(circle, #e0e7ff, #c7d2fe);
}

.bg-glow-2 {
  top: 40%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #f3e8ff, #fae8ff);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Announcement Bar */
.announcement-bar {
  background: linear-gradient(90deg, #eef2ff, #faf5ff);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 20;
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.5);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #eef2ff, #f3e8ff);
  border: 1px solid #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-svg {
  width: 24px;
  height: 24px;
  color: #4f46e5;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-dot {
  color: var(--primary-500);
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  border: none;
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.86rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* Hero Section */
.hero-section {
  padding: 70px 0 40px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-full);
  color: #4338ca;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.icon-sparkle {
  width: 15px;
  height: 15px;
  color: #4f46e5;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 70%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Hero Search Bar */
.hero-search-wrapper {
  max-width: 720px;
  margin: 0 auto 28px;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 8px 16px 8px 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  transition: all var(--transition-normal);
}

.search-input-box:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.search-icon {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

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

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 8px;
}

.search-clear-btn:hover {
  color: var(--text-primary);
  background: #f1f5f9;
}

.search-shortcut {
  display: flex;
  align-items: center;
}

.search-shortcut kbd {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Platform Chips */
.platform-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.chip-icon {
  width: 14px;
  height: 14px;
}

.chip:hover {
  background: #f8fafc;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.chip.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
  font-weight: 600;
}

/* Stats Section */
.stats-section {
  padding: 28px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px;
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4f46e5;
  flex-shrink: 0;
}

.stat-icon-wrap i {
  width: 20px;
  height: 20px;
}

.stat-text {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

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

.section-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.sort-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.sort-dropdown {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
}

.sort-dropdown:focus {
  border-color: var(--primary-500);
}

/* Category Tabs */
.category-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
  scrollbar-width: thin;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.cat-emoji {
  font-size: 1rem;
}

.cat-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cat-tab:hover {
  background: #f8fafc;
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.cat-tab.active {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.cat-tab.active .cat-count {
  color: #4338ca;
  font-weight: 700;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* Tool Card */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card-glow);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-md);
}

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

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

.tool-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-icon-box i {
  width: 26px;
  height: 26px;
}

.tool-icon-purple {
  background: #f3e8ff;
  border: 1px solid #e9d5ff;
  color: #9333ea;
}

.tool-icon-blue {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
}

.tool-icon-emerald {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #059669;
}

.tool-icon-amber {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #d97706;
}

.card-title-group {
  flex: 1;
}

.card-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.badge-version {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid #e2e8f0;
}

.badge-free {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-stars {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

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

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.platform-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ptag {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid #e2e8f0;
}

.github-card-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.github-card-link:hover {
  color: var(--primary-500);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-card-action {
  flex: 1;
}

/* No Results Box */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  max-width: 500px;
  margin: 0 auto 60px;
}

.no-results-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-results h3 {
  margin-bottom: 8px;
  font-family: var(--font-heading);
}

.no-results p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

/* Features Section */
.features-section {
  padding: 70px 0;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
}

.section-center-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 48px;
}

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

.feature-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #eef2ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  padding: 40px 0 70px;
}

.cta-box {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

.cta-content h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: #0f172a;
  margin-bottom: 8px;
}

.cta-content p {
  color: var(--text-secondary);
  max-width: 580px;
}

/* FAQ Section */
.faq-section {
  padding: 60px 0 80px;
  border-top: 1px solid var(--border-subtle);
  background: #f8fafc;
}

.faq-container {
  max-width: 800px;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: #a5b4fc;
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary-500);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 24px;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding-bottom: 20px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.6;
}

.faq-answer code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #4338ca;
}

/* Site Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  position: relative;
  z-index: 10;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 380px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 14px 0 18px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #047857;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #059669;
}

.footer-links-group {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

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

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

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-card-sm {
  max-width: 520px;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

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

.modal-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-wrap i {
  width: 32px;
  height: 32px;
}

.modal-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.badge-category {
  font-size: 0.75rem;
  font-weight: 600;
  background: #eef2ff;
  color: #4338ca;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #c7d2fe;
}

.modal-header-text h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 4px;
}

.modal-header-text p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.code-box-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  gap: 12px;
}

.code-box-wrapper code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #4338ca;
  overflow-x: auto;
  white-space: nowrap;
}

.btn-copy-code {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.btn-copy-code:hover {
  background: #f1f5f9;
}

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

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.features-list li i {
  width: 16px;
  height: 16px;
  color: #059669;
  margin-top: 3px;
  flex-shrink: 0;
}

.modal-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.spec-box {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spec-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.text-success {
  color: #059669;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inline-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.modal-actions-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.download-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.download-count-text {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.rating-text {
  color: #d97706;
}

.download-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Request Form */
.request-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-500);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .cta-box {
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .stats-container {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .modal-specs-grid {
    grid-template-columns: 1fr;
  }
  .modal-actions-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .download-btns {
    flex-direction: column;
  }
}
