:root {
  --bg-primary: #07090e;
  --bg-surface: #0f131c;
  --bg-surface-elevated: #141a26;
  --bg-surface-hover: #19202f;
  --border-color: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(245, 158, 11, 0.4);
  
  --accent-primary: #f59e0b;
  --accent-primary-hover: #d97706;
  --accent-glow: rgba(245, 158, 11, 0.14);
  --accent-glow-subtle: rgba(245, 158, 11, 0.05);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --badge-bg: rgba(255, 255, 255, 0.04);
  --badge-border: rgba(255, 255, 255, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hidden {
  display: none !important;
}

/* Background Atmosphere */
.bg-glow {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, 900px);
  height: 480px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, rgba(7, 9, 14, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 9, 14, 0.85);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 0.85rem 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.brand-badge {
  background: var(--accent-primary);
  color: #000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.22rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.6px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.5px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.nav-btn {
  text-decoration: none;
  color: var(--text-primary);
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  border-color: var(--accent-primary);
  background: var(--accent-glow-subtle);
}

/* Hero Section */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #34d399;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 0.85rem;
  line-height: 1.15;
}

.hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

/* Filter Controls */
.filter-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
  width: 100%;
}

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

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

.search-box input {
  width: 100%;
  padding: 0.9rem 2.8rem 0.9rem 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-surface-elevated);
}

.search-clear {
  position: absolute;
  right: 1rem;
  font-size: 1.35rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  line-height: 1;
}

.search-clear:hover {
  color: var(--text-primary);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.pill {
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.82rem;
  font-family: inherit;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.pill:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-surface-elevated);
}

.pill.active {
  background: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.28);
}

/* Main Content & Grid */
.main-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.25rem 4.5rem;
  flex: 1;
}

.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.65rem;
}

.grid-header.spaced {
  margin-top: 3.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.tool-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-normal), border-color var(--transition-normal), background var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}

.tool-card.soon {
  border-style: dashed;
  opacity: 0.75;
}

.tool-card.soon:hover {
  transform: none;
  border-color: var(--border-color);
  background: var(--bg-surface);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.platform-badge, .version-badge, .tag {
  font-family: 'JetBrains Mono', monospace;
}

.platform-badge {
  font-size: 0.72rem;
  padding: 0.22rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--text-secondary);
}

.version-badge {
  font-size: 0.72rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.version-badge.soon {
  color: var(--text-muted);
}

.tool-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.tool-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.15rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 0.7rem;
  padding: 0.18rem 0.42rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: auto;
}

.btn-primary, .btn-secondary {
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-md);
  text-align: center;
  flex: 1;
  transition: all var(--transition-fast);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-primary);
  color: #000;
  border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

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

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-light);
}

.btn-disabled {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  cursor: default;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.empty-icon {
  font-size: 2.2rem;
  margin-bottom: 0.85rem;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.btn-reset {
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 1.1rem;
  font: 600 0.82rem inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

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

/* Tool Page Specific */
.crumbs {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.crumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--accent-primary);
}

.tp-head {
  margin-bottom: 2rem;
}

.tp-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.tp-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.tp-tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 65ch;
  margin-bottom: 1.35rem;
}

.tp-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.tp-actions .btn-primary, .tp-actions .btn-secondary {
  flex: 0 0 auto;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
}

.tp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

.tp-main section, .panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}

.tp-main h2, .panel h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 0.85rem;
}

.tp-main p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
  max-width: 75ch;
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.feat {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.015);
}

.feat b {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

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

.steps {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.steps a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.steps a:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}

.steps a span {
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  white-space: nowrap;
}

.log {
  border-left: 2px solid var(--border-color);
  padding-left: 0.9rem;
  margin-bottom: 1rem;
}

.log b {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--accent-primary);
}

.log ul {
  margin: 0.35rem 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.tp-side {
  position: sticky;
  top: 4.8rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
}

.info-row:last-child {
  border: 0;
}

.info-row span:first-child {
  color: var(--text-muted);
}

.info-row span:last-child {
  text-align: right;
  word-break: break-word;
}

.dl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: all var(--transition-fast);
}

.dl:hover {
  border-color: var(--accent-primary);
  background: var(--accent-glow-subtle);
}

.dl small {
  display: block;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.72rem;
}

.credit {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.4rem 0;
}

.credit a {
  color: var(--accent-primary);
  text-decoration: none;
}

.credit a:hover {
  text-decoration: underline;
}

.credit span {
  color: var(--text-muted);
}

.notfound {
  text-align: center;
  padding: 4rem 1rem;
}

/* ============================================================
   Footer Section (Clean 2-Column Links & Heart Icon)
   ============================================================ */
.footer {
  background: #05070a;
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 1.75rem;
  position: relative;
  z-index: 10;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr;
  gap: 3.5rem;
  margin-bottom: 2.8rem;
  align-items: start;
}

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  justify-content: end;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin: 0.8rem 0 1rem;
  max-width: 320px;
}

.footer-status {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 1.1rem;
  color: var(--text-primary);
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-heart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.heart-icon {
  color: #ef4444;
  font-size: 0.85rem;
  display: inline-block;
  animation: pulse-heart 2s infinite ease-in-out;
}

@keyframes pulse-heart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================ */

@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .tp-layout {
    grid-template-columns: 1fr;
  }
  .tp-side {
    position: static;
  }
}

@media (max-width: 768px) {
  .footer-links-group {
    justify-content: start;
    gap: 1.8rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }
  
  .navbar {
    padding: 0.75rem 0;
  }
  
  .nav-links .nav-link {
    display: none;
  }
  
  .hero {
    padding: 2.2rem 0 1.5rem;
  }

  .category-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0.35rem 0.2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .category-pills::-webkit-scrollbar {
    display: none;
  }

  .pill {
    flex-shrink: 0;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tool-card {
    padding: 1.15rem;
  }

  .card-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tp-actions {
    width: 100%;
  }

  .tp-actions .btn-primary, .tp-actions .btn-secondary {
    flex: 1 1 100%;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 440px) {
  .footer-links-group {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}