/* ===================================================
   MultiToolKit - Master Stylesheet
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;600;700;800&display=swap');

/* ─── CSS Variables ─────────────────────────────── */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --secondary: #f59e0b;
  --accent: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f97316;

  --bg: #f0f4ff;
  --bg2: #e8eeff;
  --surface: #ffffff;
  --surface2: #f8faff;
  --surface3: #eef0ff;
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --text: #111827;
  --text2: #374151;
  --text3: #6b7280;
  --text-inv: #ffffff;

  --shadow-sm: 0 1px 3px rgba(99, 102, 241, 0.08), 0 1px 2px rgba(99, 102, 241, 0.04);
  --shadow: 0 4px 20px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(99, 102, 241, 0.06);
  --shadow-lg: 0 10px 40px rgba(99, 102, 241, 0.18), 0 4px 16px rgba(99, 102, 241, 0.08);
  --shadow-xl: 0 20px 60px rgba(99, 102, 241, 0.22);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 70px;
  --sidebar-w: 260px;
  --max-w: 1280px;
}

[data-theme="dark"] {
  --bg: #0a0f1e;
  --bg2: #0f172a;
  --surface: #1a2235;
  --surface2: #1e2942;
  --surface3: #243050;
  --border: #2e3a52;
  --border-light: #263245;
  --text: #f1f5f9;
  --text2: #cbd5e1;
  --text3: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* ─── Reset & Base ──────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

button {
  cursor: pointer;
  font-family: inherit;
}

ul,
ol {
  list-style: none;
}

/* ─── Utility Classes ───────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 50px 0;
}

.text-center {
  text-align: center;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-1 {
  gap: 8px;
}

.gap-2 {
  gap: 16px;
}

.gap-3 {
  gap: 24px;
}

.grid {
  display: grid;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

/* ─── Glass Card ────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .glass {
  background: rgba(26, 34, 53, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ─── Header / Navbar ───────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

[data-theme="dark"] .header {
  background: rgba(10, 15, 30, 0.9);
  border-bottom-color: var(--border);
}

.header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text2);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface3);
  color: var(--primary);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown>button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text2);
  transition: var(--transition);
}

.nav-dropdown>button:hover {
  background: var(--surface3);
  color: var(--primary);
}

.nav-dropdown>button svg {
  transition: transform 0.25s ease;
}

.nav-dropdown:hover>button svg {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text2);
  transition: var(--transition-fast);
}

.dropdown-menu a:hover {
  background: var(--surface3);
  color: var(--primary);
}

.dropdown-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  padding: 8px 12px 4px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 0;
}

/* Wide Mega Menu */
.mega-dropdown .dropdown-menu {
  min-width: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 16px;
}

.mega-dropdown .dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface3);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  color: var(--text);
}

.theme-toggle:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: rotate(15deg);
}

/* Menu Burger */
.menu-burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface3);
  border: 1px solid var(--border-light);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: var(--transition);
}

.menu-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-burger.open span:nth-child(2) {
  opacity: 0;
}

.menu-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 16px;
  z-index: 999;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  transform: translateY(-120%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

.mobile-nav.open {
  transform: translateY(0);
}

.mob-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text2);
  transition: var(--transition-fast);
}

.mob-links a:hover {
  background: var(--surface3);
  color: var(--primary);
}

.mob-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  padding: 16px 14px 6px;
}

/* ─── Hero Section ──────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(99, 102, 241, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
}

.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: floatOrb 8s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.12);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.1);
  bottom: -50px;
  left: -50px;
  animation-delay: 3s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: rgba(245, 158, 11, 0.08);
  top: 40%;
  right: 20%;
  animation-delay: 5s;
}

@keyframes floatOrb {

  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(20px, -20px);
  }

  66% {
    transform: translate(-10px, 20px);
  }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text3);
  max-width: 600px;
  margin: 0 auto 36px;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 56px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.4s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 4px;
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  outline: none;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface3);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
  color: white;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* ─── Section Heading ───────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 50px;
}

.section-heading .label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-heading h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-heading p {
  color: var(--text3);
  font-size: 1rem;
  max-width: 550px;
  margin: 0 auto;
}

/* ─── Tool Cards Grid ───────────────────────────── */
.tools-section {
  padding: 80px 0;
}

.tools-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeInUp 0.5s ease both;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-color, rgba(99, 102, 241, 0.05)), transparent);
  opacity: 0;
  transition: var(--transition);
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--card-color, var(--primary));
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--card-bg, rgba(99, 102, 241, 0.1));
  color: var(--card-color, var(--primary));
  transition: var(--transition);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 6px 20px var(--card-shadow, rgba(99, 102, 241, 0.3));
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.tool-card p {
  font-size: 0.82rem;
  color: var(--text3);
  line-height: 1.5;
  flex: 1;
}

.tool-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--card-color, var(--primary));
  transition: var(--transition);
}

.tool-card:hover .tool-card-arrow {
  gap: 10px;
}

.tool-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .tool-card-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

/* ─── Tool Page Layout ──────────────────────────── */
.tool-page {
  padding: 50px 0 80px;
}

.tool-header {
  text-align: center;
  margin-bottom: 40px;
}

.tool-header .tool-icon-lg {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
}

.tool-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.tool-header p {
  color: var(--text3);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.tool-box {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 820px;
  margin: 0 auto;
}

/* Drop Zone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
  position: relative;
}

.dropzone.dragover,
.dropzone:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.04);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.dropzone h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.dropzone p {
  font-size: 0.875rem;
  color: var(--text3);
}

/* Progress */
.progress-wrap {
  margin: 16px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text3);
  margin-bottom: 6px;
}

.progress-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface3);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
}

/* Settings Panel */
.settings-panel {
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
}

.settings-panel h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text2);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
}

.form-control {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

select.form-control {
  cursor: pointer;
}

/* Range Slider */
.range-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.range-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  display: flex;
  justify-content: space-between;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--surface3);
  outline: none;
  cursor: pointer;
  appearance: none;
  accent-color: var(--primary);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
  cursor: pointer;
}

/* Toggle Switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-wrap label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"]:checked+.toggle-wrap .toggle,
.toggle.on {
  background: var(--primary);
}

.toggle.on::after {
  left: 23px;
}

/* File List */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: var(--transition-fast);
}

.file-item:hover {
  border-color: var(--primary);
}

.file-item-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.file-item-info {
  flex: 1;
  min-width: 0;
}

.file-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  font-size: 0.75rem;
  color: var(--text3);
}

.file-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.file-action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.file-action-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

/* Output Box */
.output-box {
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  text-align: center;
}

.output-preview img,
.output-preview canvas {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  margin: 0 auto;
  object-fit: contain;
}

/* ─── FAQ Section ───────────────────────────────── */
.faq-section {
  padding: 80px 0;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  gap: 16px;
}

.faq-question .faq-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  transition: var(--transition);
  color: var(--primary);
}

.faq-item.open .faq-question .faq-icon {
  background: var(--primary);
  color: white;
  transform: rotate(45deg);
}

.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 22px 18px;
  font-size: 0.9rem;
  color: var(--text3);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

/* ─── Calculator Styles ─────────────────────────── */
.calc-box {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}

.calc-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface3);
  padding: 5px;
  border-radius: var(--radius);
  margin-bottom: 28px;
}

.calc-tab {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--text3);
  transition: var(--transition-fast);
}

.calc-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.calc-result {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  padding: 24px;
  color: white;
  text-align: center;
  margin-top: 20px;
}

.calc-result-num {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.calc-result-label {
  font-size: 0.8rem;
  opacity: 0.85;
}

.calc-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.calc-breakdown-item {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.calc-breakdown-item .val {
  font-size: 1.2rem;
  font-weight: 700;
}

.calc-breakdown-item .key {
  font-size: 0.75rem;
  opacity: 0.8;
}

.gst-toggler {
  display: flex;
  gap: 6px;
}

.gst-toggler .btn {
  flex: 1;
  font-size: 0.82rem;
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* Marksheet */
.subject-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px 100px;
  gap: 10px;
  align-items: center;
}

.subject-row.header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
}

.grade-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ─── Static Page Styles ────────────────────────── */
.static-page {
  padding: 60px 0 80px;
}

.static-hero {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 60px 0;
  text-align: center;
  color: white;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.static-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
}

.static-hero p {
  opacity: 0.9;
  margin-top: 10px;
  font-size: 1.05rem;
}

.static-content {
  max-width: 820px;
  margin: 0 auto;
}

.static-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 12px;
  color: var(--text);
}

.static-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--primary);
}

.static-content p {
  color: var(--text3);
  line-height: 1.8;
  margin-bottom: 14px;
}

.static-content ul {
  margin: 8px 0 16px 20px;
}

.static-content ul li {
  color: var(--text3);
  line-height: 1.8;
  list-style: disc;
  margin-bottom: 6px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  border-left: 4px solid var(--primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 30px 0;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.contact-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.contact-card-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-card p,
.contact-card a {
  font-size: 0.875rem;
  color: var(--text3);
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form .form-group {
  margin-bottom: 16px;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ─── Footer ─────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text3);
  line-height: 1.7;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface3);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text3);
  transition: var(--transition);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul li a {
  font-size: 0.82rem;
  color: var(--text3);
  transition: var(--transition-fast);
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text3);
}

.footer-bottom a {
  color: var(--text3);
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ─── Animations ────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease both;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--surface3) 25%, var(--surface2) 50%, var(--surface3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Scroll animation trigger */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Toast Notifications ───────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  animation: slideInRight 0.3s ease;
  transition: var(--transition);
}

.toast.off {
  animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-msg {
  font-size: 0.875rem;
  font-weight: 500;
  flex: 1;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.info {
  border-left: 4px solid var(--primary);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ─── Breadcrumb ────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text3);
  margin-bottom: 30px;
}

.breadcrumb a {
  color: var(--text3);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  color: var(--text);
  font-weight: 500;
}

/* ─── Tooltip ───────────────────────────────────── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mega-dropdown .dropdown-menu {
    min-width: 380px;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  .nav-links,
  .nav-dropdown {
    display: none;
  }

  .menu-burger {
    display: flex;
  }

  .hero {
    padding: 60px 0 50px;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .tool-box {
    padding: 22px 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form .form-row {
    grid-template-columns: 1fr;
  }

  .calc-box {
    padding: 22px 16px;
  }

  .subject-row {
    grid-template-columns: 1fr 90px;
  }

  .subject-row .marks-obt,
  .subject-row.header .h-obt {
    display: none;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .tools-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tool-card {
    padding: 18px 14px;
    gap: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .calc-breakdown {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* ─── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ─── Selection ─────────────────────────────────── */
::selection {
  background: rgba(99, 102, 241, 0.2);
  color: var(--text);
}

/* ─── Canvas Preview Area ───────────────────────── */
#preview-canvas {
  max-width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}

.preview-wrap {
  background: repeating-conic-gradient(var(--surface3) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

/* Rotation btns */
.rotate-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}

.rotate-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface3);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text);
}

.rotate-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Color options */
.color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.color-swatch.active,
.color-swatch:hover {
  transform: scale(1.2);
  border-color: var(--text);
}

/* Annotation tool bar */
.anno-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.anno-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  transition: var(--transition-fast);
}

.anno-btn.active,
.anno-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ─── Gradient text ──────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Tag chips (About page) ─────────────────────── */
.tag {
  display: inline-block;
  padding: 5px 14px;
  background: var(--surface3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text2);
  transition: var(--transition-fast);
}

.tag:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── Footer links (static pages) ───────────────── */
.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links ul li a {
  font-size: 0.82rem;
  color: var(--text3);
  transition: var(--transition-fast);
  display: inline-block;
}

.footer-links ul li a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

/* ─── Footer grid ────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}