/* ============================================
   MEGATOOLS - MAIN STYLES
   Premium Dark Theme | Version 1.0
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ───────── CSS VARIABLES ───────── */
:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --accent: #FD6646;
  --accent-2: #FD6646;
  --accent-3: #ff8a6a;
  --accent-glow: rgba(253, 102, 70, 0.25);
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #666666;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(253, 102, 70, 0.5);
  --gradient: linear-gradient(135deg, #FD6646 0%, #ff8a6a 50%, #FD6646 100%);
  --gradient-dark: linear-gradient(135deg, rgba(253, 102, 70, 0.15) 0%, rgba(255, 138, 106, 0.1) 100%);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 48px rgba(253, 102, 70, 0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

/* ───────── RESET ───────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

input,
select,
textarea {
  outline: none;
  font-family: var(--font-main);
}

/* ───────── SCROLLBAR ───────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* ───────── CONTAINER ───────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ───────── NAVBAR ───────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  text-decoration: none;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #FD6646 0%, #ff8a6a 100%);
  border-radius: 10px;
  font-size: 1.4rem;
  color: white;
  box-shadow: 0 4px 15px rgba(253, 102, 70, 0.4);
  position: relative;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 800;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-150%) rotate(45deg);
  }

  100% {
    transform: translateX(150%) rotate(45deg);
  }
}

.accent {
  background: linear-gradient(135deg, #FD6646 0%, #ff8a6a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.nav-search {
  flex: 1;
  position: relative;
  max-width: 500px;
}

.nav-search input {
  width: 100%;
  padding: 10px 16px 10px 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-search input::placeholder {
  color: var(--text-muted);
}

.nav-search input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.tool-count-badge {
  padding: 6px 14px;
  background: var(--gradient);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ───────── HERO ───────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(253, 102, 70, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(253, 102, 70, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 60%, rgba(255, 138, 106, 0.08) 0%, transparent 60%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-2);
  border-radius: 50%;
  animation: floatParticle linear infinite;
  opacity: 0;
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-10vh) scale(1.5);
    opacity: 0;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(253, 102, 70, 0.12);
  border: 1px solid rgba(253, 102, 70, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-2);
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.stat {
  text-align: center;
}

.stat span {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

.hero-search {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
  animation: fadeInUp 0.7s ease 0.4s both;
}

.hero-search input {
  flex: 1;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}

.hero-search input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.hero-search button {
  padding: 14px 28px;
  background: var(--gradient);
  border-radius: 50px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 24px var(--accent-glow);
  transition: var(--transition);
}

.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

/* ───────── CATEGORIES ───────── */
.categories-section {
  padding: 40px 0 20px;
  position: sticky;
  top: 68px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.categories-filter {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.categories-filter::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  padding: 9px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.cat-btn:hover {
  background: rgba(253, 102, 70, 0.1);
  border-color: var(--border-accent);
  color: var(--accent-2);
}

.cat-btn.active {
  background: var(--gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ───────── TOOLS SECTION ───────── */
.tools-section {
  padding: 60px 0 80px;
}

.section-header {
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
}

/* ───────── TOOLS GRID ───────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.tool-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  text-decoration: none;
  display: block;
  animation: fadeInCard 0.4s ease both;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
  opacity: 0;
  transition: var(--transition);
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card.coming-soon {
  cursor: default;
  opacity: 0.5;
}

.tool-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.tool-num {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tool-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
  transform: scale(1.15) rotate(-5deg);
}

.tool-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tool-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tool-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(253, 102, 70, 0.15);
  border: 1px solid rgba(253, 102, 70, 0.25);
  color: var(--accent-2);
}

.badge-coming {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-image {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.badge-video {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.badge-audio {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.badge-pdf {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.badge-calc {
  background: rgba(253, 102, 70, 0.1);
  border-color: rgba(253, 102, 70, 0.3);
  color: #FD6646;
}

.badge-dev {
  background: rgba(20, 184, 166, 0.1);
  border-color: rgba(20, 184, 166, 0.3);
  color: #2dd4bf;
}

.badge-text {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
  color: #fb923c;
}

/* ───────── FOOTER ───────── */
.footer {
  background: #050505;
  border-top: 1px solid var(--border);
  padding: 80px 0 30px;
  position: relative;
  overflow: hidden;
}

/* Subtle top glow */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
  font-family: var(--font-display);
}

.footer-col p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 300px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list a {
  color: var(--text-secondary);
  /* Muted text */
  font-size: 0.9rem;
  position: relative;
  padding-left: 0;
  transition: 0.3s;
}

.footer-links-list a:hover {
  color: var(--accent);
  padding-left: 6px;
  /* Slide effect */
}

/* Social Icons */
.footer-socials {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: 0.3s;
  font-size: 0.9rem;
  text-decoration: none;
}

.social-btn:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Bottom Bar */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a:hover {
  color: white;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 500px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ───────── ANIMATIONS ───────── */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ───────── HIDDEN CLASS ───────── */
.hidden {
  display: none !important;
}

/* ───────── RESPONSIVE ───────── */
@media (max-width: 768px) {
  .nav-search {
    display: none;
  }

  .hero-stats {
    gap: 12px;
  }

  .stat span {
    font-size: 1.5rem;
  }

  .hero-search {
    flex-direction: column;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .tool-card {
    padding: 18px 14px;
  }
}
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: white; margin-bottom: 20px; text-decoration: none; }
