/* ============================================
   P3Webs.com — Free AI Tools Website
   Modern Light AI Theme · Violet/Purple Accents
   Comprehensive Global Stylesheet
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* ── Primary Palette (Violet / Purple) ── */
  --primary:          #6c5ce7;
  --primary-dark:     #5a4bd1;
  --primary-darker:   #4c3cc8;
  --primary-light:    #a29bfe;
  --primary-rgb:      108, 92, 231;
  --violet-500:       #8b5cf6;
  --purple-600:       #9333ea;

  /* ── Secondary & Semantic ── */
  --secondary:        #1e293b;
  --accent:           #f59e0b;
  --accent-dark:      #d97706;

  /* ── Category Colours ── */
  --cat-ai:           #8b5cf6;
  --cat-resume:       #f59e0b;
  --cat-social:       #ec4899;
  --cat-utility:      #0ea5e9;
  --cat-business:     #f97316;
  --cat-productivity: #10b981;
  --cat-seo:          #22c55e;
  --cat-student:      #a855f7;

  /* ── Surfaces ── */
  --bg:               #ffffff;
  --bg-secondary:     #f8fafc;
  --bg-tertiary:      #f1f5f9;
  --bg-glass:         rgba(255, 255, 255, 0.72);

  /* ── Text ── */
  --text:             #334155;
  --text-dark:        #0f172a;
  --text-light:       #64748b;
  --text-muted:       #94a3b8;

  /* ── Borders ── */
  --border:           #e2e8f0;
  --border-light:     #f1f5f9;

  /* ── Feedback ── */
  --success:          #10b981;
  --error:            #ef4444;
  --warning:          #f59e0b;

  /* ── Radii ── */
  --radius:           12px;
  --radius-sm:        8px;
  --radius-lg:        16px;
  --radius-xl:        20px;
  --radius-full:      50px;

  /* ── Shadows ── */
  --shadow:           0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:        0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg:        0 10px 25px -5px rgba(108,92,231,0.10), 0 8px 10px -6px rgba(0,0,0,0.05);
  --shadow-xl:        0 20px 40px -10px rgba(108,92,231,0.15), 0 8px 16px -8px rgba(0,0,0,0.06);
  --shadow-glow:      0 0 24px rgba(108,92,231,0.15), 0 0 60px rgba(108,92,231,0.06);
  --shadow-card:      0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-card-lg:   0 2px 8px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.08);
  --shadow-card-xl:   0 4px 16px rgba(0,0,0,0.06), 0 12px 48px rgba(0,0,0,0.10);

  /* ── Transitions ── */
  --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast:  all 0.15s ease;
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Layout ── */
  --max-width:        1200px;
  --header-height:    72px;

  /* ── Gradients ── */
  --gradient-primary:  linear-gradient(135deg, #6c5ce7 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-hero:     linear-gradient(135deg, #6c5ce7 0%, #8b5cf6 35%, #a855f7 70%, #9333ea 100%);
  --gradient-hero-alt: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 25%, #74b9ff 50%, #00b894 75%, #6c5ce7 100%);
  --gradient-footer:   linear-gradient(180deg, #1a1a2e 0%, #0f0f23 100%);
  --gradient-glass:    linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.5) 100%);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: #c5c0e0;
  border-radius: 10px;
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #c5c0e0 var(--bg-secondary);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes heroGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
  100% { transform: scale(1.1) translate(3%, -3%); opacity: 1; }
}

@keyframes floatShapes {
  0%   { transform: translateY(0) rotate(0deg); }
  33%  { transform: translateY(-10px) rotate(1deg); }
  66%  { transform: translateY(5px) rotate(-0.5deg); }
  100% { transform: translateY(-8px) rotate(0.5deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(8px) rotate(-2deg); }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes bounce-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(108,92,231,0.2); }
  50% { box-shadow: 0 0 20px rgba(108,92,231,0.4); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes gradient-x {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }

/* ── NEW: Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, #6c5ce7 0%, #8b5cf6 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── NEW: Glass Card ── */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ── NEW: Hero Gradient (animated) ── */
.hero-gradient {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 25%, #74b9ff 50%, #00b894 75%, #6c5ce7 100%);
  background-size: 300% 300%;
  animation: gradient-x 12s ease infinite;
}

/* ── NEW: Floating Shapes ── */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  pointer-events: none;
}

.floating-shape:nth-child(1) {
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.15);
  top: 10%; left: 5%;
  animation: floatSlow 8s ease-in-out infinite;
}

.floating-shape:nth-child(2) {
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.12);
  top: 60%; right: 10%;
  animation: float 6s ease-in-out infinite 1s;
}

.floating-shape:nth-child(3) {
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.18);
  bottom: 15%; left: 20%;
  animation: floatReverse 7s ease-in-out infinite 0.5s;
}

.floating-shape:nth-child(4) {
  width: 140px; height: 140px;
  background: rgba(255,255,255,0.08);
  top: 20%; right: 25%;
  animation: floatSlow 10s ease-in-out infinite 2s;
}

.floating-shape:nth-child(5) {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.14);
  bottom: 30%; right: 5%;
  animation: float 9s ease-in-out infinite 3s;
}

.floating-shape:nth-child(6) {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  top: 45%; left: 40%;
  animation: floatReverse 5s ease-in-out infinite 1.5s;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

/* ── NEW: Filter Chips ── */
.filter-chip {
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: #f5f3ff;
}

.filter-chip-active,
.filter-chip.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(108,92,231,0.3);
}

/* ── NEW: Tool Badge Indicators ── */
.tool-badge-ai {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #6c5ce7, #a855f7);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(108,92,231,0.25);
}

.tool-badge-free {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}

/* ── NEW: Gradient Button ── */
.btn-gradient {
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-gradient::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.5s ease;
}

.btn-gradient:hover {
  box-shadow: 0 6px 24px rgba(108,92,231,0.4);
  transform: translateY(-2px);
}

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

.btn-gradient:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(108,92,231,0.3);
}

.btn-gradient:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Page transition animation */
.page-enter {
  animation: slideUp 0.4s ease-out;
}

/* Shimmer loading effect */
.shimmer-bg {
  background: linear-gradient(90deg, #f0f0ff 25%, #e8e8ff 50%, #f0f0ff 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================
   HEADER — Glassmorphism Sticky Navbar
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border-bottom: 1px solid rgba(108, 92, 231, 0.06);
  height: var(--header-height);
  transition: var(--transition);
  animation: slideDown 0.5s ease-out;
}

.site-header.scrolled {
  box-shadow: 0 1px 12px rgba(108,92,231,0.08);
  border-bottom-color: rgba(108, 92, 231, 0.12);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.03);
  color: var(--text-dark);
}

.logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(108,92,231,0.3);
  transition: var(--transition-bounce);
}

.logo:hover .logo-icon {
  box-shadow: 0 6px 24px rgba(108,92,231,0.45);
  transform: rotate(-5deg) scale(1.08);
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
  padding: 0.25rem 0;
}

.main-nav a:hover {
  color: var(--primary);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2.5px;
  background: var(--gradient-primary);
  transition: width 0.3s ease, left 0.3s ease;
  border-radius: 2px;
}

.main-nav a:hover::after {
  width: 100%;
  left: 0;
}

.nav-cta {
  background: var(--gradient-primary);
  color: white !important;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(108,92,231,0.25);
  transition: var(--transition);
}

.nav-cta:hover {
  box-shadow: 0 6px 24px rgba(108,92,231,0.38);
  transform: translateY(-2px);
  color: white !important;
}

.nav-cta::after {
  display: none !important;
}

/* Mobile menu toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-toggle:hover {
  background: var(--bg-tertiary);
}

.mobile-toggle .bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--text-dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.mobile-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.mobile-toggle.active .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   HERO — Animated Gradient with Floating Shapes
   ============================================ */
.hero {
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradient-x 10s ease infinite;
  color: white;
  padding: 5rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated radial glow overlay */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.14) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Decorative floating shapes pattern */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(circle 90px at 12% 18%, rgba(255,255,255,0.09) 0%, transparent 100%),
    radial-gradient(circle 130px at 88% 72%, rgba(255,255,255,0.07) 0%, transparent 100%),
    radial-gradient(circle 55px at 62% 12%, rgba(255,255,255,0.10) 0%, transparent 100%),
    radial-gradient(circle 100px at 38% 82%, rgba(255,255,255,0.08) 0%, transparent 100%),
    radial-gradient(circle 70px at 75% 40%, rgba(255,255,255,0.06) 0%, transparent 100%);
  animation: floatShapes 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.93;
  max-width: 620px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
  line-height: 1.7;
}

/* Hero search — large pill with glass effect */
.hero-search {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-search input {
  width: 100%;
  padding: 1.15rem 1.6rem;
  padding-right: 3.8rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  font-size: 1rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  outline: none;
  background: rgba(255,255,255,0.97);
  color: var(--text-dark);
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

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

.hero-search input:focus {
  box-shadow: 0 0 0 4px rgba(255,255,255,0.35), 0 12px 40px rgba(0,0,0,0.18);
  border-color: rgba(255,255,255,0.6);
  background: white;
}

.hero-search button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  width: 48px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(108,92,231,0.3);
}

.hero-search button:hover {
  background: var(--gradient-primary);
  box-shadow: 0 6px 20px rgba(108,92,231,0.45);
  transform: scale(1.08);
}

/* Hero stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3.5rem;
  margin-top: 2.75rem;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-stats .stat {
  text-align: center;
}

.hero-stats .stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: block;
}

.hero-stats .stat-label {
  font-size: 0.85rem;
  opacity: 0.78;
  font-weight: 500;
  margin-top: 0.15rem;
  display: block;
}

/* ============================================
   AD PLACEHOLDERS
   ============================================ */
.ad-placeholder {
  background: var(--bg-tertiary);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: 1.5rem 0;
  transition: var(--transition);
}

.ad-placeholder:hover {
  border-color: var(--primary-light);
}

.ad-placeholder.top-banner {
  margin: 1.25rem auto;
  max-width: 728px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-placeholder.in-content {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-placeholder.bottom {
  min-height: 90px;
  max-width: 728px;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
  padding: 4.5rem 0;
}

.section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
  letter-spacing: -0.03em;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Pill-shaped section label */
.section-label {
  display: inline-block;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: var(--primary);
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid rgba(108,92,231,0.1);
}

/* ============================================
   CATEGORY SECTION (Homepage)
   ============================================ */
.category-section {
  padding: 3.5rem 0;
}

.category-section:nth-child(even) {
  background: var(--bg-secondary);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-header h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.category-header .view-all {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.category-header .view-all:hover {
  color: var(--primary-dark);
  gap: 0.55rem;
}

/* ============================================
   TOOL CARD GRID
   ============================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 1.5rem;
}

/* Tool card — white bg, soft shadow, gradient top border */
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-top: 3px solid transparent;
}

/* Gradient top accent border (default violet) */
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 16px 40px -8px rgba(108,92,231,0.16),
    0 4px 12px -4px rgba(0,0,0,0.06);
  border-color: rgba(108,92,231,0.12);
}

.tool-card:hover::before {
  opacity: 1;
}

/* Category-specific top border colours on hover */
.tool-card[data-category="resume"]::before,
.tool-card[data-category="resume"] { border-top-color: var(--cat-resume); }
.tool-card[data-category="social"]::before,
.tool-card[data-category="social"] { border-top-color: var(--cat-social); }
.tool-card[data-category="utility"]::before,
.tool-card[data-category="utility"] { border-top-color: var(--cat-utility); }
.tool-card[data-category="business"]::before,
.tool-card[data-category="business"] { border-top-color: var(--cat-business); }
.tool-card[data-category="productivity"]::before,
.tool-card[data-category="productivity"] { border-top-color: var(--cat-productivity); }
.tool-card[data-category="seo"]::before,
.tool-card[data-category="seo"] { border-top-color: var(--cat-seo); }
.tool-card[data-category="student"]::before,
.tool-card[data-category="student"] { border-top-color: var(--cat-student); }

/* Category-specific before overrides for non-default colours */
.tool-card[data-category="resume"]::before { background: var(--cat-resume); }
.tool-card[data-category="social"]::before { background: var(--cat-social); }
.tool-card[data-category="utility"]::before { background: var(--cat-utility); }
.tool-card[data-category="business"]::before { background: var(--cat-business); }
.tool-card[data-category="productivity"]::before { background: var(--cat-productivity); }
.tool-card[data-category="seo"]::before { background: var(--cat-seo); }
.tool-card[data-category="student"]::before { background: var(--cat-student); }

/* Tool card icon */
.tool-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
  transition: var(--transition-bounce);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.1) rotate(-3deg);
}

/* Category icon backgrounds */
.tool-card-icon.ai         { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.tool-card-icon.resume     { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.tool-card-icon.social     { background: linear-gradient(135deg, #fdf2f8, #fce7f3); }
.tool-card-icon.utility    { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); }
.tool-card-icon.business   { background: linear-gradient(135deg, #fff7ed, #ffedd5); }
.tool-card-icon.seo        { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.tool-card-icon.student    { background: linear-gradient(135deg, #faf5ff, #f3e8ff); }
.tool-card-icon.productivity { background: linear-gradient(135deg, #ecfdf5, #d1fae5); }

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  flex-grow: 1;
}

/* Badges */
.tool-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 1rem;
  letter-spacing: 0.01em;
}

.badge-free {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.badge-ai {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(108,92,231,0.25);
}

/* Tool card arrow */
.tool-card-arrow {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 1rem;
  opacity: 0.6;
}

.tool-card:hover .tool-card-arrow {
  color: var(--primary);
  transform: translateX(5px);
  opacity: 1;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2.25rem 1.75rem;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  background: var(--bg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  background: #faf8ff;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108,92,231,0.12);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card .feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.1rem;
  display: block;
  transition: var(--transition-bounce);
}

.feature-card:hover .feature-icon {
  transform: scale(1.12);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ============================================
   TOOL PAGE STYLES
   ============================================ */
.tool-page {
  padding-top: 2rem;
  padding-bottom: 4rem;
  min-height: calc(100vh - var(--header-height) - 200px);
  animation: slideUp 0.4s ease-out;
}

.tool-header {
  margin-bottom: 2rem;
}

.tool-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.tool-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 700px;
  line-height: 1.7;
}

/* Tool breadcrumb */
.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.tool-breadcrumb a {
  color: var(--text-muted);
}

.tool-breadcrumb a:hover {
  color: var(--primary);
}

.tool-breadcrumb .separator {
  color: var(--border);
}

.tool-breadcrumb .current {
  color: var(--text-dark);
  font-weight: 500;
}

.tool-page-header {
  margin-bottom: 2rem;
}

.tool-page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.tool-page-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 700px;
  line-height: 1.7;
}

/* ============================================
   TOOL INTERFACE
   ============================================ */
.tool-interface {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.tool-interface:focus-within {
  border-color: rgba(108,92,231,0.2);
  box-shadow: var(--shadow-lg);
}

.tool-interface label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Tool input/output areas */
.tool-input-area {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.tool-input-area:focus-within {
  border-color: rgba(108,92,231,0.15);
  box-shadow: var(--shadow-md);
}

.tool-output-area {
  background: linear-gradient(135deg, #fafaff, #f5f3ff);
  border: 1px solid rgba(108,92,231,0.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  min-height: 160px;
  position: relative;
}

.tool-output-area:empty::before {
  content: 'Results will appear here...';
  color: var(--text-muted);
  font-style: italic;
}

.tool-interface textarea,
.tool-interface input[type="text"],
.tool-interface input[type="number"],
.tool-interface input[type="email"],
.tool-interface input[type="date"],
.tool-interface input[type="url"],
.tool-interface select {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg);
  transition: var(--transition);
  resize: vertical;
}

.tool-interface textarea:focus,
.tool-interface input[type="text"]:focus,
.tool-interface input[type="number"]:focus,
.tool-interface input[type="email"]:focus,
.tool-interface input[type="date"]:focus,
.tool-interface input[type="url"]:focus,
.tool-interface select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
  background: white;
}

.tool-interface textarea {
  min-height: 130px;
}

.tool-interface textarea::placeholder,
.tool-interface input::placeholder {
  color: var(--text-muted);
}

/* ============================================
   AI INPUT & BUTTON CLASSES
   ============================================ */
.ai-input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: #fafbff;
  transition: var(--transition);
  resize: vertical;
}

.ai-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1), var(--shadow);
  background: white;
}

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

.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.ai-btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(108,92,231,0.28);
}

.ai-btn-primary:hover {
  box-shadow: 0 8px 28px rgba(108,92,231,0.4);
  transform: translateY(-2px);
  color: white;
}

.ai-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(108,92,231,0.25);
}

.ai-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(108,92,231,0.28);
}

.tool-btn:hover {
  box-shadow: 0 8px 28px rgba(108,92,231,0.4);
  transform: translateY(-2px);
  color: white;
}

.tool-btn:active {
  transform: translateY(0);
}

.tool-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tool-output {
  background: #fafaff;
  border: 1px solid rgba(108,92,231,0.06);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-top: 1.5rem;
  min-height: 120px;
  position: relative;
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 0.95rem;
  color: var(--text);
}

.tool-output:empty::before {
  content: 'Results will appear here...';
  color: var(--text-muted);
  font-style: italic;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(108,92,231,0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(108,92,231,0.38);
  transform: translateY(-2px);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: var(--border);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.875rem;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-group .btn {
  flex-shrink: 0;
}

/* ============================================
   OUTPUT AREA
   ============================================ */
.output-area {
  background: linear-gradient(135deg, #fafaff, #f8f9fc);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-top: 1.5rem;
  min-height: 120px;
  position: relative;
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 0.95rem;
}

.output-area:empty::before {
  content: 'Results will appear here...';
  color: var(--text-muted);
  font-style: italic;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.output-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: #f5f3ff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.copy-btn.copied,
.copy-btn-copied {
  background: #dcfce7;
  border-color: var(--success);
  color: #166534;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading {
  display: none;
  text-align: center;
  padding: 2rem;
}

.loading.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 1rem;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(108,92,231,0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: none;
  margin: 1rem auto;
}

.loading-spinner.active {
  display: block;
  animation: spin 0.75s linear infinite, fadeIn 0.3s ease;
}

.loading-text {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ============================================
   ERROR MESSAGE
   ============================================ */
.error-msg,
.error-message {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}

.error-msg.active,
.error-message.active {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
  margin: 3.5rem 0;
}

.faq-section h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: var(--transition);
  background: var(--bg);
}

.faq-item:hover {
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: 0 2px 8px rgba(108,92,231,0.06);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.15rem 1.35rem;
  background: var(--bg);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: var(--transition);
  gap: 1rem;
}

.faq-question:hover {
  background: #faf8ff;
}

.faq-item.open .faq-question {
  background: linear-gradient(135deg, #faf8ff, #f5f3ff);
  color: var(--primary);
}

.faq-question .faq-toggle {
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-tertiary);
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  color: var(--primary);
  background: var(--primary-bg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
  padding: 0 1.35rem 1.25rem;
  color: var(--text);
  line-height: 1.75;
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

/* ============================================
   RELATED TOOLS
   ============================================ */
.related-tools {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-tools h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.related-tool-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.related-tool-card:hover {
  border-color: rgba(var(--primary-rgb), 0.25);
  box-shadow: 0 8px 20px -4px rgba(108,92,231,0.12);
  transform: translateY(-3px);
  color: inherit;
}

.related-tool-card .rt-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}

.related-tool-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.related-tool-card p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

/* ============================================
   FOOTER — Dark Gradient
   ============================================ */
.site-footer {
  background: var(--gradient-footer);
  color: rgba(255, 255, 255, 0.8);
  padding: 4.5rem 0 0;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

/* Subtle decorative gradient overlay in footer */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108,92,231,0.3), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 1.15rem;
}

.footer-brand .logo span {
  -webkit-text-fill-color: var(--primary-light);
}

.footer-brand .logo-icon {
  box-shadow: 0 4px 16px rgba(108,92,231,0.4);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-col h4 {
  color: white;
  font-weight: 700;
  margin-bottom: 1.15rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-col ul li a:hover {
  color: white;
  padding-left: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom-links {
  display: flex;
  gap: 1.75rem;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-bottom-links a:hover {
  color: white;
}

/* ============================================
   TOGGLE / PILL BUTTONS
   ============================================ */
.toggle-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toggle-btn {
  padding: 0.55rem 1.15rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #faf8ff;
}

.toggle-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 3px 12px rgba(108,92,231,0.25);
}

/* ============================================
   PASSWORD GENERATOR
   ============================================ */
.password-display {
  font-family: 'Courier New', 'SF Mono', monospace;
  font-size: 1.3rem;
  letter-spacing: 1.5px;
  padding: 1.4rem;
  background: linear-gradient(135deg, #1a1a2e, #0f0f23);
  color: var(--primary-light);
  border-radius: var(--radius-sm);
  text-align: center;
  word-break: break-all;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(108,92,231,0.15);
}

.strength-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  margin-top: 0.85rem;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease, background 0.4s ease;
}

/* ============================================
   RANGE SLIDER
   ============================================ */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(108,92,231,0.3);
  transition: var(--transition-bounce);
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 16px rgba(108,92,231,0.45);
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(108,92,231,0.3);
}

/* ============================================
   STATS DISPLAY
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(108,92,231,0.12);
}

.stat-card .stat-value,
.stat-card .stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

/* ============================================
   INVOICE / PRINTABLE
   ============================================ */
.print-container {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--text-dark);
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.invoice-table th,
.invoice-table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.invoice-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invoice-total {
  text-align: right;
  margin-top: 1rem;
}

.invoice-total .total-row {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  padding: 0.5rem 0;
}

.invoice-total .total-row.grand {
  font-weight: 800;
  font-size: 1.2rem;
  border-top: 2px solid var(--text-dark);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
}

/* ============================================
   QR CODE
   ============================================ */
.qr-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.qr-output canvas,
.qr-output img {
  border: 4px solid var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

/* ============================================
   ABOUT PAGE SECTIONS
   ============================================ */
.about-section {
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.about-section:hover {
  border-color: rgba(108,92,231,0.1);
}

.about-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.about-section p {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.category-item {
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

.category-item:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--primary-light);
  transform: translateX(4px);
}

.category-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.category-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

.feature-item {
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.feature-item:hover {
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* CTA Section */
.cta-section {
  background: var(--gradient-hero);
  color: white;
  padding: 3.5rem 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  animation: heroGlow 10s ease-in-out infinite alternate;
  pointer-events: none;
}

.cta-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}

.cta-section p {
  opacity: 0.92;
  margin-bottom: 1.75rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.cta-section .btn {
  position: relative;
  z-index: 1;
  background: white;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 0.85rem 2rem;
}

.cta-section .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  color: var(--primary-dark);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.85rem 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.contact-card:hover {
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.contact-card-icon {
  font-size: 2rem;
  margin-bottom: 0.85rem;
  display: block;
}

.contact-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.contact-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.contact-form {
  margin-top: 1.5rem;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(108,92,231,0.3);
  z-index: 999;
}

.back-to-top:hover {
  box-shadow: 0 8px 28px rgba(108,92,231,0.45);
  transform: translateY(-3px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card-xl);
  animation: toast-in 0.35s ease-out;
  min-width: 280px;
  max-width: 420px;
}

.toast.success {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #065f46;
}

.toast.success::before {
  content: '';
  width: 4px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--success);
  border-radius: var(--radius) 0 0 var(--radius);
}

.toast.error {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.toast.error::before {
  content: '';
  width: 4px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--error);
  border-radius: var(--radius) 0 0 var(--radius);
}

.toast.hiding {
  animation: toast-out 0.3s ease-in forwards;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .toast-container,
  .ad-placeholder,
  .hero-search,
  .cta-section {
    display: none !important;
  }

  body {
    background: white;
    color: #000;
  }

  .tool-page {
    padding-top: 0;
  }

  .tool-interface {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .section-header h2 {
    font-size: 1.8rem;
  }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  /* Mobile Navigation */
  .mobile-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem;
    gap: 0.25rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .main-nav a {
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
  }

  .main-nav a:hover {
    background: var(--primary-bg);
  }

  .main-nav a::after {
    display: none;
  }

  .nav-cta {
    text-align: center;
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
  }

  /* Hero mobile */
  .hero {
    padding: 3.5rem 0 4rem;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1rem;
    margin: 0 auto 1.5rem;
  }

  .hero-stats {
    gap: 2rem;
    flex-wrap: wrap;
  }

  .hero-stats .stat-number {
    font-size: 1.5rem;
  }

  .hero-search input {
    padding: 1rem 1.25rem;
    padding-right: 3.2rem;
    font-size: 0.95rem;
  }

  /* Sections */
  .section {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-header h2 {
    font-size: 1.55rem;
  }

  .category-header h2 {
    font-size: 1.3rem;
  }

  /* Grids */
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

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

  .feature-card {
    padding: 1.5rem 1rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .footer-bottom-links {
    justify-content: center;
  }

  /* Form rows */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Tool page */
  .tool-header h1,
  .tool-page-header h1 {
    font-size: 1.6rem;
  }

  /* CTA */
  .cta-section {
    padding: 2.5rem 1.5rem;
  }

  .cta-section h2 {
    font-size: 1.35rem;
  }

  /* Back to top */
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  /* Toast */
  .toast {
    min-width: 260px;
    max-width: 90vw;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    transform: none;
  }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE
   ============================================ */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hero-stats .stat-number {
    font-size: 1.35rem;
  }

  .hero-stats .stat-label {
    font-size: 0.78rem;
  }

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

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

  .contact-cards {
    grid-template-columns: 1fr;
  }

  .tools-grid .tool-card {
    padding: 1.25rem;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   ACCESSIBILITY FOCUS STYLES
   ============================================ */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   SELECTION STYLES
   ============================================ */
::selection {
  background: rgba(108, 92, 231, 0.15);
  color: var(--text-dark);
}

::-moz-selection {
  background: rgba(108, 92, 231, 0.15);
  color: var(--text-dark);
}
