@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --background: #050505;
  --foreground: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.1);
  --primary: #7c3aed;
  --secondary: #2563eb;
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.05);
  --font-main: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  font-family: var(--font-main);
  background: var(--background);
  color: var(--foreground);
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 2rem;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: #ccc;
  align-items: center;
}

.nav-links a {
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white !important;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  font-size: 0.9rem;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* Hero Gradient */
.hero-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.15), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

/* Main Content */
.main-content {
  padding-top: 100px;
  padding-bottom: 4rem;
}

/* Search Section */
.search-section {
  margin: 3rem 0;
  text-align: center;
}

.main-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.6s ease-out;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: #a1a1aa;
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

/* Category Filters */
.category-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-family: var(--font-main);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: white;
}

.filter-btn.active {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.2);
  color: white;
}

/* Search Box */
.search-box-wrapper {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  font-size: 1.1rem;
  outline: none;
  font-family: var(--font-main);
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
}

.search-input::placeholder {
  color: #666;
}

.search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 1.2rem;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  min-height: 50vh;
  margin-top: 3rem;
}

.tool-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: fadeInUp 0.6s ease-out backwards;
  position: relative;
  will-change: transform;
  /* Hint to browser for GPU optimization */
  transform: translate3d(0, 0, 0);
  /* Force hardware acceleration */
}

.tool-card:hover {
  transform: translateY(-6px) translate3d(0, 0, 0);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  border-color: rgba(124, 58, 237, 0.4);
}

.tool-image-wrapper {
  height: 160px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
  position: relative;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.tool-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s;
}

.tool-card:hover .tool-image {
  transform: scale(1.1);
}

.tool-category-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  z-index: 2;
}

.tool-content {
  flex: 1;
}

.tool-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.tool-description {
  color: #a1a1aa;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.tool-link {
  flex: 1;
  text-align: center;
  background: var(--accent-gradient);
  color: white;
  padding: 0.75rem 0.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: opacity 0.2s;
  font-size: 0.95rem;
}

.tool-link:hover {
  opacity: 0.9;
}

/* Share Buttons */
.share-actions {
  display: flex;
  gap: 8px;
}

.share-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: scale(1.1);
}

.share-btn.twitter:hover {
  background: #1DA1F2;
  border-color: #1DA1F2;
}

.share-btn.whatsapp:hover {
  background: #25D366;
  border-color: #25D366;
}

/* Scroll To Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem;
  color: #666;
}

.no-results h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4rem 2rem;
  margin-top: 4rem;
  background: #020202;
  text-align: center;
  color: #666;
}

.footer-subtitle {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .main-title {
    font-size: 2.5rem;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
  }
}

/* Hot / New Badge */
.hot-badge {
  position: absolute;
  top: -10px;
  left: -10px;
  background: linear-gradient(45deg, #ff4d4d, #f9cb28);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(255, 77, 77, 0.4);
  z-index: 3;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-5px);
  }

  60% {
    transform: translateY(-3px);
  }
}

/* Load More Button */
.load-more-container {
  padding-bottom: 2rem;
}

#loadMoreBtn {
  transition: transform 0.2s, background 0.2s;
}

#loadMoreBtn:hover {
  transform: scale(1.05);
  background: white;
  color: #7c3aed;
}

/* Surprise Me Button */
.surprise-btn {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-gradient);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.surprise-btn:hover {
  transform: translateY(-50%) scale(1.1) rotate(15deg);
}

@media (max-width: 768px) {
  .surprise-btn {
    right: 0;
    top: -60px;
    transform: none;
  }

  .surprise-btn:hover {
    transform: scale(1.1);
  }
}

/* Visitor Counter */
.visitor-counter {
  margin-top: 1rem;
  font-family: monospace;
  color: #a1a1aa;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mouse Trail */
.trail-dot {
  position: fixed;
  height: 10px;
  width: 10px;
  background: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  filter: blur(2px);
  opacity: 0.6;
  animation: fadeOut 1s linear forwards;
}

@keyframes fadeOut {
  to {
    transform: scale(0);
    opacity: 0;
  }
}

/* Category Count Badge */
.count-badge {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.8em;
  margin-left: 5px;
  opacity: 0.7;
}

.filter-btn.active .count-badge {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
}