@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 40%, #16213e 70%, #1e1e3f 100%);
  color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.01em;
  min-height: 100vh;
}

/* iOS design tokens (motion, rings, spacing) */
:root {
  --ios-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ios-ease-inout: cubic-bezier(0.37, 0, 0.63, 1);
  --ios-fast: 180ms;
  --ios-mid: 240ms;
  --ios-ring: #0a84ff;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 12px 30px rgba(0,0,0,0.24);
}

/* Smooth animations everywhere */
* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background layers */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.bg-gradient {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 40%, #16213e 70%, #1e1e3f 100%);
  opacity: 1;
}

.bg-mesh {
  background: 
    radial-gradient(ellipse 90% 60% at 20% 20%, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.1) 40%, rgba(99, 102, 241, 0.02) 70%, transparent 85%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(59, 130, 246, 0.03) 80%, transparent 90%),
    radial-gradient(ellipse 80% 55% at 40% 60%, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.08) 45%, rgba(99, 102, 241, 0.02) 75%, transparent 88%);
  opacity: 0.8;
  filter: hue-rotate(0deg) saturate(0.8);
  animation: gradientShift 25s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: filter;
}

/* Animated background elements */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

/* Enhanced floating particles */
.floating-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(99, 102, 241, 0.4);
  border-radius: 50%;
  animation: float 15s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
  transform: translateZ(0);
}

.floating-particle:nth-child(2n) {
  width: 3px;
  height: 3px;
  background: rgba(59, 130, 246, 0.3);
  animation-duration: 20s;
  animation-delay: -4s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-particle:nth-child(3n) {
  width: 5px;
  height: 5px;
  background: rgba(99, 102, 241, 0.35);
  animation-duration: 25s;
  animation-delay: -8s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced gradient animation */
@keyframes gradientShift {
  0% {
    filter: hue-rotate(0deg) saturate(0.8);
  }
  50% {
    filter: hue-rotate(5deg) saturate(0.85);
  }
  100% {
    filter: hue-rotate(0deg) saturate(0.8);
  }
}

/* Enhanced float animation */
@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-20px) translateX(0);
    opacity: 0;
  }
}

/* Navigation bar with notch design */
.nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 300px;
  max-width: 600px;
  background: rgba(29, 29, 31, 0.6);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 20px 20px;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav:hover {
  background: rgba(29, 29, 31, 0.75);
  backdrop-filter: blur(25px) saturate(180%);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  gap: 24px;
  position: relative;
}

/* Hidden state from JS */
.nav.nav--hidden { 
  transform: translateX(-50%) translateY(-120%); 
}

.nav ul { display: none; }
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-search { 
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-search.collapsed {
  width: 40px;
}

.nav-search.expanded {
  width: 280px;
}

.nav-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-search-icon svg {
  width: 16px;
  height: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-search.expanded .nav-search-icon {
  left: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.nav-search.expanded .nav-search-icon svg {
  transform: scale(1.1);
}

.nav-actions input[type="search"] {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: scale(0.8);
}

.nav-search.expanded input[type="search"] {
  opacity: 1;
  transform: scale(1);
  padding-left: 44px;
}

.nav-search.collapsed input[type="search"] {
  padding-left: 40px;
  cursor: pointer;
}

.nav-actions input[type="search"]:focus {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}
.nav-actions input::placeholder { color: rgba(226,232,240,0.7); }
.nav-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(29,29,31,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  margin-top: 8px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.nav-results .result-item { display:flex; align-items:center; gap:10px; padding:10px 12px; color:#fff; cursor:pointer; text-decoration:none; }
.nav-results .result-item:hover { background: rgba(255,255,255,0.06); }
.nav-results .icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.28);
  font-size: 18px;
  line-height: 1;
  color: #fff;
}
.nav-results .title { font-weight:600; font-size:14px; }
.nav-results .desc { font-size:12px; color:#cbd5e1; }

.nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 16px;
  border-radius: 12px;
  opacity: 0.9;
}

.nav a:not(.logo):hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  opacity: 1;
  transform: translateY(-1px);
}

.nav .logo {
  font-weight: 800;
  font-size: 22px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 1;
  padding: 8px 0;
  letter-spacing: -0.02em;
  margin-right: auto;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}



.nav .logo:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Refresh button for development */
.refresh-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 8px;
  line-height: 1;
  vertical-align: middle;
  flex-shrink: 0;
}

.refresh-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: scale(1.1);
}

.refresh-btn:active {
  transform: scale(0.95);
}

/* Offline indicator */
.offline-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  color: #22c55e;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.offline-indicator:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.35);
  transform: scale(1.05);
}

.offline-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

/* Layout */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px 0; /* reduced from 80px to 40px to reduce wasted space */
  position: relative;
}

/* Ensure tool listings stretch full width so grids align left */
.container > .content-section {
  align-self: stretch;
  width: 100%;
}

/* Hero section - simple and beautiful */
.hero {
  text-align: center;
  padding: 100px 40px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-title {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 25%, #e2e8f0 50%, #cbd5e1 75%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.typing-text {
  display: inline-block;
  white-space: nowrap;
  margin-right: 8px;
}

.typing-cursor {
  display: inline-block;
  width: 4px;
  height: 1.3em;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  margin-left: 4px;
  animation: blink-caret 0.75s step-end infinite;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

@keyframes blink-caret {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

.hero-subtitle {
  font-size: 1.75rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 56px;
  line-height: 1.4;
  font-weight: 500;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.5s forwards;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.02em;
}

.hero-actions {
  margin-bottom: 60px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 2s forwards;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  padding: 18px 36px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: inline-block;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.offline-badge {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 0.3em;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  margin-left: 16px;
  vertical-align: middle;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  animation: pulse 2s infinite;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 1;
  width: 100%;
  text-align: center;
  transition: opacity 0.3s ease;
}

.scroll-indicator.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

.scroll-dot {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: pulse 2s infinite 3.5s;
}

.scroll-arrow {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.7);
  animation: bounce 2s infinite 3.5s;
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUpScroll {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.feature-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: inline-block;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.offline-badge {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 0.4em;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  margin-left: 16px;
  vertical-align: middle;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  animation: pulse 2s infinite;
}





.content-section {
  position: relative;
  padding: 120px 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0 auto 28px;
  padding: 0 16px;
  max-width: 1600px;
  width: 100%;
  justify-content: start;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.cards-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced card animations */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transform-style: preserve-3d;
  perspective: 1000px;
  cursor: pointer;
  will-change: transform;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.22s ease-out, transform 0.22s ease-out;
}

.glass-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Clean hover effect */
/* Fix hover animation: isolate transform to avoid transition-conflicts */
.glass-card.visible:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px) scale(1.03);
}

/* Animated filtering states */
.glass-card.filter-hide {
  opacity: 0 !important;
  transform: translateY(12px) scale(0.98) !important;
  pointer-events: none;
}





.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}



.glass-card:hover::before,
.glass-card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.28);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-radius: 16px;
  transition: opacity 0.3s ease;
}

.glass-card:hover .card-icon::before {
  opacity: 0.8;
}

.glass-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.card-description {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.4;
  font-weight: 400;
}

/* Tools headings */
.tools-heading {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  opacity: 0.9;
  max-width: 1600px;
  margin: 18px auto 8px;
  padding: 0 16px;
  position: relative;
  transition: all 0.3s ease;
}



/* CTA */
.cta-section {
  text-align: center;
  padding: 60px 24px; /* reduced from 100px to 60px */
  max-width: 900px; /* increased from 800px */
  margin: 140px auto 0; /* increased from 80px to 140px top margin to push content down more */
}

.cta-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.cta-description {
  font-size: 20px;
  color: #cbd5e1;
  margin-bottom: 40px; /* reduced from 48px to 40px */
  line-height: 1.5;
  font-weight: 400;
}

.button-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Enhanced button animations */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

/* Enhanced button animations */
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
  left: 100%;
}

/* Enhanced button animations */
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

/* Enhanced button animations */
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* Footer */
.footer {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 24px; /* reduced from 48px to 40px */
  text-align: center;
  margin-top: 80px; /* reduced from 120px to 80px */
}

.footer p {
  color: #94a3b8;
  font-size: 16px;
  font-weight: 500;
}

/* Tool pages */
.tool-container {
  width: 100%;
  max-width: 1200px;
  margin: 100px auto 40px;
  padding: 0 16px;
  animation: toolPageEnter var(--ios-mid) var(--ios-ease-out);
}

/* Enhanced tool card animations */
.tool-card {
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(160%);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* Enhanced tool card animations */
.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 20px 44px rgba(0,0,0,0.28);
}

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

/* Sticky topbar inside tools for iOS large-title feel */
.tool-topbar {
  position: sticky;
  top: 76px; /* below nav */
  z-index: 10;
  padding: 8px 12px;
  margin: -8px 10px 8px 10px;
  background: linear-gradient(180deg, rgba(17,24,39,0.28), rgba(17,24,39,0.12));
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.tool-subtitle { color:#94a3b8; font-weight:500; margin-top:-6px; }

.tool-header .tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.32);
}

/* Ensure older pages that used .card-icon in headers match .tool-icon */
.tool-header .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.tool-header h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.tool-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Wider layouts for specific tools that benefit from more space */
.tool-body .calendar,
.tool-body .compressor,
.tool-body .notepad {
  max-width: none;
  width: 100%;
}

/* Calendar specific - make it wider */
.tool-body .calendar .calendar-grid {
  max-width: none;
  width: 100%;
}

/* Calculator - center it but make it larger */
.tool-body .calculator {
  max-width: 960px;
  margin: 0 auto;
}

/* File compressor - utilize full width */
.tool-body .compressor .upload-area {
  max-width: none;
  width: 100%;
}

/* Notepad - give more breathing room */
.tool-body .notepad {
  max-width: 900px;
  margin: 0 auto;
}

/* Unified inputs across tool pages, even when not wrapped in .control-row */
.tool-body textarea,
.tool-body input[type="text"],
.tool-body input[type="number"],
.tool-body input[type="file"],
.tool-body select {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 12px 16px;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--ios-fast) var(--ios-ease-out), border-color var(--ios-fast) var(--ios-ease-out), box-shadow var(--ios-fast) var(--ios-ease-out), transform var(--ios-fast) var(--ios-ease-out);
}

.tool-body textarea::placeholder,
.control-row textarea::placeholder,
.tool-body input::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

.tool-body textarea:focus,
.tool-body input[type="text"]:focus,
.tool-body input[type="number"]:focus,
.tool-body input[type="file"]:focus,
.tool-body select:focus {
  border-color: var(--ios-ring);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.16);
}

/* Ensure select dropdowns use light popup with dark text */
select,
.tool-body select,
.control-row select {
  color-scheme: light;
}

/* Default option list colors (most browsers) */
select option,
.tool-body select option,
.control-row select option,
select optgroup {
  background-color: #ffffff;
  color: #111827; /* slate-900 */
}

/* Selected/hovered option emphasis */
select option:checked,
select option:focus,
select option:hover {
  background-color: #f3f4f6; /* gray-100 */
  color: #111827;
}

/* Disabled options */
select option:disabled {
  color: rgba(17, 24, 39, 0.5);
}

/* Consistent textarea sizing and typography */
.tool-body textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  font-family: 'Inter', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.5;
}

.control-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* Minimal, consistent toolbar for the first control row on tool pages */
.toolbar {
  /* Minimal, no extra container visuals */
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 6px 0;
  gap: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Segmented control for format */
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}
.segmented button {
  appearance: none;
  background: transparent;
  color: #cbd5e1;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 180ms var(--ios-ease-out), background 180ms var(--ios-ease-out);
}
.segmented button.active, .segmented button:hover { background: rgba(255,255,255,0.12); color:#fff; }

.toolbar label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.8);
  margin-right: 6px;
}

.toolbar input[type="text"],
.toolbar input[type="number"],
.toolbar input[type="file"],
.toolbar select {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.toolbar input[type="file"]::file-selector-button {
  padding: 6px 10px;
  border-radius: 8px;
}

/* Utility for pages that replace native input with a custom button */
.input-hidden { position: absolute !important; left: -9999px !important; width:1px !important; height:1px !important; opacity:0 !important; pointer-events:none !important; }

.toolbar .spacer { flex: 1 1 auto; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.btn-ghost {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.advanced-controls { margin-top: 10px; }
.advanced-controls.collapsed { display: none; }

.control-row label {
  font-size: 14px;
  color: #cbd5e1;
  margin-right: 8px;
  font-weight: 500;
}

.control-row input[type="file"],
.control-row input[type="number"],
.control-row select,
.control-row input[type="range"],
.control-row textarea,
.control-row input[type="text"] {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.control-row input[type="file"]:focus,
.control-row input[type="number"]:focus,
.control-row select:focus,
.control-row input[type="range"]:focus,
.control-row textarea:focus,
.control-row input[type="text"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.control-row input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  margin-right: 12px;
}

.control-row textarea {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  font-family: 'Inter', monospace;
}

.control-row input[type="range"] {
  background: rgba(255, 255, 255, 0.1);
  height: 4px;
  border-radius: 2px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.control-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.control-row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.actions .btn-primary,
.actions .btn-secondary {
  padding-left: 20px;
  padding-right: 20px;
}

.preview {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  place-items: center;
  min-height: 200px;
}

/* Tool UI enhancements (Apple-like) */
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.dropzone:hover { background: rgba(255, 255, 255, 0.08); }
.dropzone.dragover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); transform: translateY(-2px); }

.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.preview-grid .panel { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 12px; display:grid; place-items:center; min-height: 220px; }
.preview-grid .panel img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.22); }
.preview-meta { color:#94a3b8; font-size: 12px; margin-top: 8px; text-align: center; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(17,24,39,0.9); color:#fff; padding: 10px 14px; border-radius: 10px; border:1px solid rgba(255,255,255,0.12); box-shadow: 0 10px 24px rgba(0,0,0,0.3); opacity:0; pointer-events:none; transition: opacity 200ms ease, transform 200ms ease; z-index: 1200; }
.toast.show { opacity:1; transform: translateX(-50%) translateY(0); }

.control-group { display:flex; align-items:center; gap:8px; }
.truncate { width: 220px; display:inline-block; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Generic modal utility (used by HEIC tool) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-card {
  position: relative;
  width: min(640px, 92vw);
  max-height: 82vh;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}
.modal-body img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}
.modal-actions { display:flex; justify-content:center; }

/* Tweak link-styled buttons inside results header */
.results a.btn-secondary {
  text-decoration: none;
}

/* Generic result/info containers for tools */
.result,
.results,
.status,
.panel,
.preview-panel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
}

.result h3,
.results h3,
.panel h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #ffffff;
}

/* Tabs and displays used by stopwatch and others */
.tab-content { display: none; }
.tab-content.active { display: block; }
.display {
  font-size: clamp(24px, 6vw, 48px);
  font-weight: 600;
  text-align: center;
  margin: 16px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Emoji picker shared styles (kept mild so page-specific styles still look good) */
.categories { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.category-btn {
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #f5f5f7;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.category-btn:hover::before {
  left: 100%;
}
.category-btn:hover, .category-btn.active, .category-btn[aria-pressed="true"] { 
  background: rgba(120,119,198,0.2); 
  border-color: #7877c6; 
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(120, 119, 198, 0.3);
}
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px; }
.emoji-btn {
  font-size: 24px;
  padding: 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.emoji-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.emoji-btn.selected { background: rgba(120,119,198,0.3); border-color: #7877c6; }

/* Charts on tool pages */
.chart-container { position: relative; height: 300px; }

.note { margin-top: 8px; }

.preview canvas,
.preview img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.note {
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 500;
}

/* Tool filters positioning on index page */
/* Tabbed filter bar */
/* removed filter bar styles */

/* Morph animations for filter changes */
.glass-card.filter-morph {
  animation: morphPulse 180ms ease-out;
}

@keyframes morphPulse {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

.glass-card.filter-enter {
  animation: filterIn 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes filterIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Temporary state during FLIP animation */
.glass-card.is-flipping {
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .nav ul {
    gap: 16px;
  }
  
  .nav a {
    font-size: 14px;
    padding: 6px 12px;
  }
  
  .hero {
    padding: 80px 20px 60px;
    min-height: 80vh;
  }
  
  .hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    padding: 0 10px;
  }
  
  .hero p {
    font-size: 20px;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 60px 0;
  }
  
  .tool-container {
    margin-top: 120px;
  }
  
  .control-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .control-row input[type="text"] {
    min-width: auto;
  }
}

/* Mobile-specific improvements */
@media (max-width: 480px) {
  body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1e1e3f 100%);
    padding-top: env(safe-area-inset-top);
  }
  
  .bg-gradient {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1e1e3f 100%);
  }
  
  .bg-layer {
    padding-top: env(safe-area-inset-top);
  }
  
  .hero {
    padding: 60px 16px 40px;
    min-height: 70vh;
    padding-top: calc(60px + env(safe-area-inset-top));
  }
  
  .hero-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 24px;
    padding: 0 8px;
    word-break: break-word;
    hyphens: auto;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 32px;
    padding: 0 16px;
    line-height: 1.5;
    word-break: break-word;
  }
  
  .hero-actions {
    margin-bottom: 40px;
  }
  
  .btn-primary {
    padding: 16px 28px;
    font-size: 1rem;
  }
  
  .scroll-indicator {
    font-size: 0.9rem;
  }
  
  .bg-mesh {
    animation: none;
  }
  
  .floating-particle {
    animation: none;
    opacity: 0.2;
  }
  
  /* Ensure navigation doesn't overlap with status bar */
  .nav {
    padding-top: env(safe-area-inset-top);
  }
}

/* Page loading animation */
@keyframes pageLoad {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content {
  animation: pageLoad 0.8s ease-out;
}

/* Performance optimizations for low-end devices */
@media (prefers-reduced-motion: reduce) {
  .bg-mesh {
    animation: none;
  }
  
  .floating-particle {
    animation: none;
    opacity: 0.3;
  }
}

/* Disable animations on very small screens for better performance */
@media (max-width: 480px) {
  .bg-mesh {
    animation: none;
  }
  
  .floating-particle {
    animation: none;
    opacity: 0.2;
  }
}

/* Reveal animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}



/* Apply reveal animation to tool content blocks */
.tool-card, .toolbar, .advanced-controls, .preview, .result, .results, .panel, .editor-container { 
  will-change: opacity, transform;
}

/* Tab buttons for combined tools */
.tab-buttons {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 16px;
  padding: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.tab-btn {
  appearance: none;
  background: transparent;
  color: #cbd5e1;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--ios-fast) var(--ios-ease-out), background var(--ios-fast) var(--ios-ease-out);
  outline: none;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

.tab-btn.active {
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

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

/* Smooth homepage return animation - only for main elements */
.container.homepage-return {
  animation: homepageReturn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero.homepage-return {
  animation: homepageReturn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes homepageReturn {
  0% {
    opacity: 0.8;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth tool page transitions */
.tool-container {
  width: 100%;
  max-width: 1200px;
  margin: 100px auto 40px;
  padding: 0 16px;
  animation: toolPageEnter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-container.exiting {
  animation: toolPageExit 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

@keyframes toolPageEnter {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toolPageExit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

.tool-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  animation: toolCardEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.tool-card.exiting {
  animation: toolCardExit 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

@keyframes toolCardEnter {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toolCardExit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  animation: toolHeaderEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.tool-header.exiting {
  animation: toolHeaderExit 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both;
}

@keyframes toolHeaderEnter {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toolHeaderExit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

.tool-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  animation: toolBodyEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.tool-body.exiting {
  animation: toolBodyExit 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0s both;
}

@keyframes toolBodyEnter {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toolBodyExit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Offline badge in main heading */
.offline-badge {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 0.6em;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  margin-left: 16px;
  vertical-align: middle;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  animation: pulse 2s infinite;
}

/* Offline highlight in hero section */
.offline-highlight {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  text-align: center;
  font-size: 18px;
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.offline-highlight strong {
  color: #22c55e;
  font-weight: 700;
}

/* Offline indicator */
.offline-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  color: #22c55e;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.offline-indicator:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.35);
  transform: scale(1.05);
}

.offline-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

/* Refresh button for development */
.refresh-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 8px;
  line-height: 1;
  vertical-align: middle;
  flex-shrink: 0;
}

