/* ==========================================================================
   ToolVerse 3D — Premium Futuristic 3D Design System
   "30 Powerful Tools. One Amazing Platform."
   Zero external dependencies, 100% Native CSS3 & Hardware-Accelerated 3D
   ========================================================================== */

:root {
  /* Core Palette - Dark Mode Default */
  --bg-primary: #080B18;
  --bg-secondary: #101629;
  --bg-tertiary: #161F38;
  --purple: #8B5CF6;
  --blue: #3B82F6;
  --cyan: #22D3EE;
  --pink: #EC4899;
  --emerald: #10B981;
  --amber: #F59E0B;
  --red: #EF4444;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --glass-surface: rgba(255, 255, 255, 0.05);
  --glass-surface-hover: rgba(255, 255, 255, 0.085);
  --glass-strong: rgba(16, 22, 41, 0.82);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-bright: rgba(139, 92, 246, 0.45);
  --input-bg: rgba(8, 11, 24, 0.72);

  --shadow-3d: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 0 32px rgba(139, 92, 246, 0.28), 0 0 64px rgba(59, 130, 246, 0.14);
  --shadow-cyan: 0 0 25px rgba(34, 211, 238, 0.25);

  --grad-brand: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 52%, #22D3EE 100%);
  --grad-accent: linear-gradient(135deg, #EC4899 0%, #8B5CF6 50%, #3B82F6 100%);
  --grad-surface: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --header-height: 76px;
  --max-width: 1340px;
}

[data-theme="light"] {
  --bg-primary: #F1F5F9;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #E2E8F0;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --glass-surface: rgba(255, 255, 255, 0.82);
  --glass-surface-hover: rgba(255, 255, 255, 0.96);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(15, 23, 42, 0.1);
  --glass-border-bright: rgba(139, 92, 246, 0.5);
  --input-bg: rgba(248, 250, 252, 0.95);
  --shadow-3d: 0 18px 40px rgba(15, 23, 42, 0.09), 0 0 0 1px rgba(15, 23, 42, 0.07);
  --shadow-glow: 0 12px 32px rgba(139, 92, 246, 0.18), 0 4px 16px rgba(59, 130, 246, 0.12);
  --grad-surface: linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.85) 100%);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

img, svg, canvas {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--purple);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   3D Ambient Background Orbs, Rings & Floating Geometry
   ========================================================================== */
.ambient-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  perspective: 1200px;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.34;
  will-change: transform;
  animation: orbFloat 18s ease-in-out infinite alternate;
}

[data-theme="light"] .ambient-orb {
  opacity: 0.18;
}

.orb-purple {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #8B5CF6 0%, transparent 70%);
  top: -140px;
  left: -120px;
}

.orb-blue {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #3B82F6 0%, transparent 70%);
  top: 28%;
  right: -140px;
  animation-delay: -6s;
}

.orb-cyan {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #22D3EE 0%, transparent 70%);
  bottom: -120px;
  left: 22%;
  animation-delay: -11s;
}

.orb-pink {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, #EC4899 0%, transparent 70%);
  top: 62%;
  left: -80px;
  opacity: 0.2;
  animation-delay: -4s;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 25%, black 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 25%, black 25%, transparent 80%);
}

/* Floating Decorative Rings & Geometric Shapes */
.floating-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.08);
  transform-style: preserve-3d;
  animation: ringRotate 26s linear infinite;
}

.ring-1 {
  width: 340px;
  height: 340px;
  top: 12%;
  right: 8%;
  border-top-color: rgba(34, 211, 238, 0.45);
}

.ring-2 {
  width: 220px;
  height: 220px;
  bottom: 16%;
  left: 6%;
  border-bottom-color: rgba(236, 72, 153, 0.4);
  animation-duration: 32s;
  animation-direction: reverse;
}

.geo-shape {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(34, 211, 238, 0.05));
  backdrop-filter: blur(4px);
  border-radius: 12px;
  animation: geoFloat 14s ease-in-out infinite;
}
.geo-1 { top: 20%; left: 7%; transform: rotate(25deg); }
.geo-2 { top: 72%; right: 9%; width: 36px; height: 36px; border-radius: 50%; animation-delay: -5s; }
.geo-3 { top: 44%; left: 88%; width: 28px; height: 28px; transform: rotate(45deg); animation-delay: -9s; }

@keyframes orbFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(35px, -30px, 0) scale(1.08); }
}

@keyframes ringRotate {
  0% { transform: rotateX(62deg) rotateY(14deg) rotateZ(0deg); }
  100% { transform: rotateX(62deg) rotateY(14deg) rotateZ(360deg); }
}

@keyframes geoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(18deg); }
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

main {
  flex: 1;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Sticky Glass Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(8, 11, 24, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.82);
}

.site-header.scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* 3D Brand Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  perspective: 600px;
}

.logo-cube {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transform: rotateY(-12deg) rotateX(10deg);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  color: #fff;
}

.brand-logo:hover .logo-cube {
  transform: rotateY(12deg) rotateX(-8deg) translateY(-2px) scale(1.05);
  box-shadow: 0 12px 26px rgba(34, 211, 238, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.65);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  background: linear-gradient(90deg, var(--text-primary) 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-weight: 800;
}

.brand-badge-3d {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--grad-brand);
  color: #fff;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* Primary Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 15px;
  right: 15px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
}

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

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all 0.25s ease;
  position: relative;
}

.icon-btn:hover {
  background: var(--glass-surface-hover);
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.fav-count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--pink);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 19px;
  height: 19px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
}

.mobile-menu-toggle {
  display: none;
}

/* Privacy Trust Strip */
.privacy-strip {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.14), rgba(59, 130, 246, 0.14), rgba(34, 211, 238, 0.14));
  border-bottom: 1px solid var(--glass-border);
  padding: 7px 16px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 10;
}

.privacy-strip strong {
  color: var(--cyan);
  font-weight: 700;
}

[data-theme="light"] .privacy-strip strong {
  color: var(--purple);
}

.privacy-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  margin-right: 8px;
  vertical-align: middle;
}

/* ==========================================================================
   Hero Section & Animated CSS 3D Illustration
   ========================================================================== */
.hero-section {
  padding: 64px 0 44px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 48px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.13);
  border: 1px solid rgba(139, 92, 246, 0.38);
  color: var(--cyan);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.2);
}

[data-theme="light"] .hero-pill {
  color: var(--purple);
}

.hero-title {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #C084FC 0%, #60A5FA 48%, #22D3EE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #7C3AED 0%, #2563EB 50%, #0891B2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 28px;
}

/* Hero Search Engine */
.search-wrapper {
  position: relative;
  max-width: 650px;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--glass-strong);
  border: 1.5px solid var(--glass-border-bright);
  border-radius: 18px;
  padding: 6px 8px 6px 18px;
  box-shadow: var(--shadow-3d), var(--shadow-glow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--cyan);
  box-shadow: var(--shadow-3d), 0 0 36px rgba(34, 211, 238, 0.32);
  transform: translateY(-2px);
}

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

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 1.02rem;
  color: var(--text-primary);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--glass-surface);
  margin-right: 6px;
  display: none;
}

.search-clear-btn.visible {
  display: inline-flex;
}

.search-kbd {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-right: 6px;
  white-space: nowrap;
}

/* Search Suggestions Dropdown */
.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border-bright);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-3d);
  max-height: 380px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  padding: 8px;
}

.search-suggestions.open {
  display: block;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: rgba(139, 92, 246, 0.18);
}

.suggestion-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.suggestion-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.suggestion-icon svg {
  width: 18px;
  height: 18px;
}

.suggestion-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.suggestion-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.suggestion-cat {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Hero CTA Buttons */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.96rem;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.btn-glass {
  background: var(--glass-surface);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}

.btn-glass:hover {
  background: var(--glass-surface-hover);
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-cyan);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.85rem;
  border-radius: 10px;
}

/* Animated Category Chips */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  cursor: pointer;
}

.cat-chip svg {
  width: 15px;
  height: 15px;
  color: var(--cyan);
}

.cat-chip:hover,
.cat-chip.active {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
}

.cat-chip:hover svg,
.cat-chip.active svg {
  color: #fff;
}

/* ==========================================================================
   CSS 3D Hero Illustration Stage
   ========================================================================== */
.hero-3d-stage {
  perspective: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 410px;
  position: relative;
}

.holo-deck {
  width: 100%;
  max-width: 440px;
  height: 380px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-16deg);
  animation: holoDeckFloat 8s ease-in-out infinite alternate;
}

@keyframes holoDeckFloat {
  0% { transform: rotateX(12deg) rotateY(-16deg) translateY(0px); }
  100% { transform: rotateX(6deg) rotateY(-8deg) translateY(-14px); }
}

.holo-main-card {
  position: absolute;
  inset: 24px 16px;
  background: linear-gradient(145deg, rgba(16, 22, 41, 0.88), rgba(8, 11, 24, 0.92));
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  transform: translateZ(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #F8FAFC;
}

.holo-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.holo-dots {
  display: flex;
  gap: 7px;
}

.holo-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.holo-dots span:nth-child(1) { background: #EF4444; }
.holo-dots span:nth-child(2) { background: #F59E0B; }
.holo-dots span:nth-child(3) { background: #10B981; }

.holo-status {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #22D3EE;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.holo-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.holo-mini-tile {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  transition: transform 0.3s ease;
}

.holo-mini-tile svg {
  width: 24px;
  height: 24px;
  margin: 0 auto 6px;
  color: #22D3EE;
}

.holo-mini-tile span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #CBD5E1;
  display: block;
}

.holo-wave-bar {
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25), rgba(34, 211, 238, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

/* Floating Orbit Satellite Cards on the 3D Deck */
.holo-float-badge {
  position: absolute;
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(16, 22, 41, 0.9);
  border: 1px solid rgba(34, 211, 238, 0.45);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
  color: #F8FAFC;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(12px);
}

.holo-badge-top {
  top: -8px;
  right: -10px;
  transform: translateZ(65px);
  animation: badgeBob 5s ease-in-out infinite;
}

.holo-badge-bottom {
  bottom: 4px;
  left: -14px;
  transform: translateZ(80px);
  border-color: rgba(236, 72, 153, 0.5);
  animation: badgeBob 6s ease-in-out infinite reverse;
}

@keyframes badgeBob {
  0%, 100% { transform: translateZ(65px) translateY(0); }
  50% { transform: translateZ(75px) translateY(-10px); }
}

/* ==========================================================================
   Statistics Section (4 Factual Pillars)
   ========================================================================== */
.stats-section {
  padding: 20px 0 44px;
}

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

.stat-card {
  background: var(--grad-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  text-align: center;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-3d);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 900;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   3D Interactive Tool Cards & Grids
   ========================================================================== */
.section-block {
  padding: 44px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin-top: 4px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  perspective: 1200px;
}

.tool-card-3d {
  position: relative;
  background: var(--grad-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-3d);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform-style: preserve-3d;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
}

/* Animated Gradient Border & Glass Reflection */
.tool-card-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(34, 211, 238, 0.1), rgba(236, 72, 153, 0.45));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tool-card-3d::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139, 92, 246, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tool-card-3d:hover {
  transform: translateY(-7px) rotateX(var(--tilt-x, 2deg)) rotateY(var(--tilt-y, -2deg));
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: var(--shadow-3d), var(--shadow-glow);
}

.tool-card-3d:hover::before,
.tool-card-3d:hover::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transform: translateZ(18px);
  transition: transform 0.3s ease, background 0.3s ease;
}

[data-theme="light"] .tool-icon-wrap {
  color: var(--purple);
}

.tool-card-3d:hover .tool-icon-wrap {
  transform: translateZ(26px) scale(1.07);
  background: var(--grad-brand);
  color: #fff;
}

.tool-icon-wrap svg {
  width: 25px;
  height: 25px;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--cyan);
}

[data-theme="light"] .tool-badge {
  color: #0284C7;
  background: rgba(2, 132, 199, 0.1);
}

.fav-toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  z-index: 3;
}

.fav-toggle-btn:hover {
  color: var(--pink);
  border-color: var(--pink);
  transform: scale(1.1);
}

.fav-toggle-btn.active {
  color: var(--pink);
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.45);
}

.fav-toggle-btn svg {
  width: 17px;
  height: 17px;
}

.tool-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.tool-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
  font-size: 0.82rem;
}

.tool-cat-tag {
  color: var(--text-muted);
  font-weight: 600;
}

.tool-launch-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--cyan);
}

[data-theme="light"] .tool-launch-link {
  color: var(--purple);
}

.tool-card-3d:hover .tool-launch-link {
  transform: translateX(4px);
}

/* ==========================================================================
   Dedicated Tool Page Workspace Architecture
   ========================================================================== */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 24px 0 18px;
}

.breadcrumb-nav a:hover {
  color: var(--cyan);
}

.breadcrumb-sep {
  opacity: 0.45;
}

.tool-page-header {
  margin-bottom: 28px;
}

.tool-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tool-page-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tool-page-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 820px;
}

/* 3D Glass Workspace Panel */
.tool-workspace-card {
  background: var(--grad-surface);
  border: 1.5px solid var(--glass-border-bright);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-3d), var(--shadow-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 40px;
  position: relative;
}

.workspace-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.control-group {
  margin-bottom: 18px;
}

.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.control-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.glass-input,
.glass-select,
.glass-textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 15px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.glass-textarea {
  min-height: 170px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
}

.glass-input:focus,
.glass-select:focus,
.glass-textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

/* Custom Range Slider */
.range-slider {
  width: 100%;
  accent-color: var(--purple);
  height: 6px;
  border-radius: 99px;
  cursor: pointer;
}

/* Drag and Drop Upload Zone */
.drop-zone {
  border: 2px dashed rgba(139, 92, 246, 0.5);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  background: rgba(139, 92, 246, 0.05);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-2px);
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-zone-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--grad-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 10px 24px rgba(139, 92, 246, 0.35);
}

.drop-zone-icon svg {
  width: 28px;
  height: 28px;
}

/* Checkbox / Toggle Switch Pills */
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.check-pill input {
  accent-color: var(--purple);
  width: 16px;
  height: 16px;
}

/* Tool Action Toolbar */
.tool-Output-box {
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 140px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Alert / Status Banners */
.status-banner {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 14px 0;
  display: none;
  align-items: center;
  gap: 10px;
}

.status-banner.show {
  display: flex;
}

.status-error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #FCA5A5;
}
[data-theme="light"] .status-error { color: #B91C1C; }

.status-warn {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #FCD34D;
}
[data-theme="light"] .status-warn { color: #B45309; }

.status-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6EE7B7;
}
[data-theme="light"] .status-success { color: #047857; }

.status-info {
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.38);
  color: var(--cyan);
}
[data-theme="light"] .status-info { color: #0369A1; }

/* Metric Stat Mini-Grid inside tools */
.metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.metric-box {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.metric-num {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--cyan);
  font-family: var(--font-mono);
}

[data-theme="light"] .metric-num {
  color: var(--purple);
}

.metric-lbl {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

/* ==========================================================================
   SEO Content Sections on Tool Pages (How to Use, Features, FAQ)
   ========================================================================== */
.info-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

.info-panel {
  background: var(--grad-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-3d);
}

.info-panel h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-list,
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.feature-dot {
  color: var(--cyan);
  font-weight: 900;
  flex-shrink: 0;
}

/* FAQ Accordion */
.faq-section {
  background: var(--grad-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 36px;
}

.faq-item {
  border-bottom: 1px solid var(--glass-border);
  padding: 14px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  text-align: left;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  color: var(--text-primary);
}

.faq-answer {
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding-top: 10px;
  line-height: 1.6;
}

/* Optional AdSense Slot (Disabled by default unless data-ad-enabled="true") */
.ad-slot-container {
  display: none;
  margin: 28px auto;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

body[data-ads-enabled="true"] .ad-slot-container {
  display: block;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--cyan);
  color: var(--text-primary);
  padding: 13px 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-3d), var(--shadow-cyan);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 56px 0 32px;
  margin-top: 64px;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--cyan);
}

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

/* Interactive Image Cropper Specific Styles */
.crop-stage-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  background: #05070F;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  user-select: none;
  touch-action: none;
}

/* YouTube Thumbnail Preview Cards */
.yt-mockup-card {
  background: #0F0F0F;
  color: #F1F1F1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.yt-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1E293B;
  overflow: hidden;
}

.yt-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-sans);
}

.yt-meta-row {
  display: flex;
  gap: 12px;
  padding: 12px;
}

.yt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-brand);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
}

.yt-title-text {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.yt-channel-text {
  font-size: 0.8rem;
  color: #AAAAAA;
}

/* ==========================================================================
   Responsive Media Queries (320px to 1920px+)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-3d-stage {
    min-height: 340px;
  }
  .workspace-grid-2,
  .info-sections-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px;
    box-shadow: var(--shadow-3d);
    display: none;
  }
  .main-nav.open {
    display: flex;
  }
  .search-kbd {
    display: none;
  }
  .tool-workspace-card {
    padding: 20px 16px;
  }
  .hero-3d-stage {
    display: none; /* Save vertical space and GPU on smaller screens */
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* Respect Reduced Motion */
@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;
  }
  .tool-card-3d:hover {
    transform: none !important;
  }
}
