/* ============================================================
   MakaTools — Global Stylesheet
   tools.makapod.com
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Design Tokens ---- */
:root {
  /* Backgrounds */
  --bg-base:        #07071a;
  --bg-surface:     #0d0d23;
  --bg-elevated:    #13132e;

  /* Glass */
  --glass-bg:       rgba(255, 255, 255, 0.030);
  --glass-bg-hover: rgba(255, 255, 255, 0.055);
  --glass-bg-active:rgba(255, 255, 255, 0.080);
  --glass-border:   rgba(255, 255, 255, 0.075);
  --glass-border-hover: rgba(255, 255, 255, 0.18);

  /* Brand Colors */
  --violet:         #7c3aed;
  --violet-light:   #a78bfa;
  --violet-dark:    #5b21b6;
  --cyan:           #06b6d4;
  --cyan-light:     #67e8f9;
  --pink:           #ec4899;

  /* Gradients */
  --grad-primary:   linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  --grad-cyan:      linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  --grad-warm:      linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --grad-success:   linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-pink:      linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
  --grad-hero:      radial-gradient(ellipse 90% 60% at 50% -10%, rgba(124, 58, 237, 0.40) 0%, transparent 100%);
  --grad-glow:      radial-gradient(circle at center, rgba(124, 58, 237, 0.20) 0%, transparent 70%);

  /* Text */
  --text-primary:   #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-disabled:  #475569;

  /* Status */
  --success:        #10b981;
  --warning:        #f59e0b;
  --error:          #ef4444;
  --info:           #3b82f6;

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px; --s-6: 24px;  --s-8: 32px;  --s-10: 40px;
  --s-12: 48px;--s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* Border radius */
  --r-sm:  6px;   --r-md: 10px;  --r-lg: 16px;
  --r-xl:  24px;  --r-2xl: 32px; --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.35);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.45);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.55);
  --shadow-glow:    0 0 48px rgba(124,58,237,0.28);
  --shadow-glow-sm: 0 0 24px rgba(124,58,237,0.18);
  --shadow-cyan:    0 0 32px rgba(6,182,212,0.20);

  /* Transition presets */
  --t-fast:  150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:  250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:  400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-w: 1280px;
  --sidebar-w: 260px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; }

/* ---- Typography ---- */
.text-xs   { font-size: 0.75rem;  }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem;     }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem;  }
.text-2xl  { font-size: 1.5rem;   }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem;  }
.text-5xl  { font-size: 3rem;     }
.text-6xl  { font-size: 3.75rem;  }

.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semi    { font-weight: 600; }
.font-bold    { font-weight: 700; }
.font-extra   { font-weight: 800; }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-violet    { color: var(--violet-light); }
.text-cyan      { color: var(--cyan-light); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-error     { color: var(--error); }
.font-mono      { font-family: var(--font-mono); }

.grad-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.grad-text-cyan {
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--s-6); }
.section   { padding-block: var(--s-16); }

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); } .gap-6 { gap: var(--s-6); }
.gap-8 { gap: var(--s-8); }

.grid { display: grid; }
.grid-cols-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ---- Noise texture overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ---- Header / Navbar ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(7, 7, 26, 0.80);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s-6);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
}
.site-logo .logo-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: var(--shadow-glow-sm);
}
.site-logo span { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.header-actions { display: flex; align-items: center; gap: var(--s-3); }

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: var(--s-1) var(--s-2);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: var(--t-base);
}
.lang-toggle:hover { border-color: var(--glass-border-hover); background: var(--glass-bg-hover); }
.lang-btn {
  padding: 3px var(--s-3);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--t-fast);
  letter-spacing: 0.02em;
}
.lang-btn.active {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 0 12px rgba(124,58,237,0.4);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-top: calc(64px + var(--s-20));
  padding-bottom: var(--s-20);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-4);
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--violet-light);
  margin-bottom: var(--s-6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--s-6);
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--s-10);
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  flex-wrap: wrap;
}
.stat-item {
  text-align: center;
}
.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.hero-orb-1 { width: 500px; height: 500px; background: var(--violet); top: -200px; left: -100px; animation-delay: 0s; }
.hero-orb-2 { width: 400px; height: 400px; background: var(--cyan);   top: -150px; right: -50px;  animation-delay: 4s; }
@keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-30px) scale(1.05); } }

/* ---- Sections ---- */
.tools-section { padding: var(--s-12) 0 var(--s-20); }
.section-header { margin-bottom: var(--s-8); }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-light);
  margin-bottom: var(--s-3);
}
.section-label::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--grad-primary);
  border-radius: 2px;
}
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ---- Tool Cards ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--s-4);
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s-6);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--t-base);
  overflow: hidden;
  cursor: pointer;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--t-base);
}
.tool-card:hover {
  border-color: rgba(124,58,237,0.4);
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 32px rgba(124,58,237,0.12);
}
.tool-card:hover::before { opacity: 0.04; }
.tool-card.featured {
  border-color: rgba(124,58,237,0.30);
  background: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(79,70,229,0.04) 100%);
}
.tool-card.coming-soon { opacity: 0.55; pointer-events: none; }

.card-content { position: relative; z-index: 1; flex: 1; }
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: var(--s-4);
  transition: transform var(--t-base);
}
.tool-card:hover .card-icon { transform: scale(1.1) rotate(-3deg); }

.card-icon-violet  { background: rgba(124,58,237,0.18); box-shadow: 0 0 20px rgba(124,58,237,0.2); }
.card-icon-cyan    { background: rgba(6,182,212,0.18);  box-shadow: 0 0 20px rgba(6,182,212,0.2);  }
.card-icon-pink    { background: rgba(236,72,153,0.18); box-shadow: 0 0 20px rgba(236,72,153,0.2); }
.card-icon-green   { background: rgba(16,185,129,0.18); box-shadow: 0 0 20px rgba(16,185,129,0.2); }
.card-icon-orange  { background: rgba(245,158,11,0.18); box-shadow: 0 0 20px rgba(245,158,11,0.2); }
.card-icon-red     { background: rgba(239,68,68,0.18);  box-shadow: 0 0 20px rgba(239,68,68,0.2);  }
.card-icon-blue    { background: rgba(59,130,246,0.18); box-shadow: 0 0 20px rgba(59,130,246,0.2); }
.card-icon-indigo  { background: rgba(99,102,241,0.18); box-shadow: 0 0 20px rgba(99,102,241,0.2); }

.card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
  letter-spacing: -0.01em;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.card-footer {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--glass-border);
}
.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag-free     { background: rgba(16,185,129,0.15); color: var(--success); }
.tag-featured { background: rgba(124,58,237,0.20); color: var(--violet-light); }
.tag-soon     { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.card-arrow {
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  background: var(--glass-bg-active);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all var(--t-base);
}
.tool-card:hover .card-arrow {
  background: var(--grad-primary);
  border-color: transparent;
  transform: translateX(2px);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-6);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--t-base);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 0 24px rgba(124,58,237,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(124,58,237,0.5), var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--error);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.25);
  box-shadow: 0 0 20px rgba(239,68,68,0.2);
}

.btn-success {
  background: rgba(16,185,129,0.15);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.25);
}
.btn-success:hover {
  background: rgba(16,185,129,0.25);
}

.btn-sm { padding: 6px var(--s-4); font-size: 0.8rem; border-radius: var(--r-sm); }
.btn-lg { padding: var(--s-3) var(--s-8); font-size: 1rem; border-radius: var(--r-lg); }
.btn-xl { padding: var(--s-4) var(--s-10); font-size: 1.05rem; border-radius: var(--r-lg); }

.btn-loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: var(--s-2);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Form Elements ---- */
.form-group { display: flex; flex-direction: column; gap: var(--s-2); }
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.input, .textarea, .select {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: all var(--t-fast);
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: var(--glass-bg-hover);
}
.input::placeholder, .textarea::placeholder { color: var(--text-disabled); }
.textarea { resize: vertical; min-height: 120px; font-family: var(--font-mono); font-size: 0.85rem; }
.select { appearance: none; cursor: pointer; }
.select option { background: var(--bg-elevated); }

.input-mono { font-family: var(--font-mono); font-size: 0.85rem; }

/* Checkbox / Radio */
.checkbox-group { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.checkbox-item { display: flex; align-items: center; gap: var(--s-2); cursor: pointer; }
.checkbox-item input[type="checkbox"] { accent-color: var(--violet); width: 16px; height: 16px; cursor: pointer; }
.checkbox-item label { font-size: 0.875rem; color: var(--text-secondary); cursor: pointer; }

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--glass-border);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 12px rgba(124,58,237,0.5);
  cursor: pointer;
  transition: transform var(--t-fast);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* ---- Upload Zone ---- */
.upload-zone {
  position: relative;
  border: 2px dashed var(--glass-border);
  border-radius: var(--r-xl);
  padding: var(--s-12) var(--s-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--glass-bg);
  overflow: hidden;
}
.upload-zone::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--t-base);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.05);
}
.upload-zone:hover::after, .upload-zone.drag-over::after { opacity: 0.03; }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 10; }
.upload-icon {
  font-size: 3rem;
  margin-bottom: var(--s-4);
  display: block;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
}
.upload-hint { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Cards / Panels ---- */
.panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
}

/* ---- Badges / Tags ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 2px var(--s-3);
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.25); }
.badge-error   { background: rgba(239,68,68,0.15);  color: var(--error);   border: 1px solid rgba(239,68,68,0.25);  }
.badge-info    { background: rgba(59,130,246,0.15);  color: var(--info);    border: 1px solid rgba(59,130,246,0.25);  }
.badge-violet  { background: rgba(124,58,237,0.15); color: var(--violet-light); border: 1px solid rgba(124,58,237,0.25); }
.badge-neutral { background: var(--glass-bg); color: var(--text-muted); border: 1px solid var(--glass-border); }

/* Dot indicator */
.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
}
.dot-success { background: var(--success); box-shadow: 0 0 6px var(--success); }
.dot-warning { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.dot-error   { background: var(--error);   box-shadow: 0 0 6px var(--error); }

/* ---- Code / Mono blocks ---- */
.code-block {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: var(--s-4);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--glass-border);
  margin-block: var(--s-4);
}

/* ---- Tool Page Layout ---- */
.tool-page {
  padding-top: 64px;
  min-height: 100vh;
}
.tool-hero {
  background:
    radial-gradient(ellipse 80% 100% at 50% -30%, rgba(124,58,237,0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(124,58,237,0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--s-10) 0 var(--s-8);
  position: relative;
  overflow: hidden;
}
.tool-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(124,58,237,0.5) 30%, rgba(6,182,212,0.4) 70%, transparent 100%);
}
.tool-hero-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s-6);
}
.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
}
.tool-breadcrumb a { color: var(--violet-light); text-decoration: none; }
.tool-breadcrumb a:hover { text-decoration: underline; }
.tool-breadcrumb span { opacity: 0.5; }

.tool-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-3);
}
.tool-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 560px;
}

.tool-body {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--s-8) var(--s-6);
}

.tool-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
}
@media (max-width: 900px) {
  .tool-workspace { grid-template-columns: 1fr; }
}

.workspace-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.workspace-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

/* ---- Notification / Toast ---- */
.toast {
  position: fixed;
  bottom: var(--s-6);
  right: var(--s-6);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 12px 20px 12px 16px;
  background: rgba(13, 13, 35, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--violet);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 380px;
  line-height: 1.4;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--error);   }
.toast.warning { border-left-color: var(--warning);  }
@keyframes toastIn {
  from { transform: translateX(calc(100% + 24px)); opacity: 0; }
  to   { transform: translateX(0);                 opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0);                 opacity: 1; }
  to   { transform: translateX(calc(100% + 24px)); opacity: 0; }
}
.toast.leaving { animation: toastOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards; }

/* ---- Image Preview ---- */
.image-preview {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-preview img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}
.image-preview .preview-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: var(--s-8);
  text-align: center;
}

/* ---- Metadata table ---- */
.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.meta-table tr { border-bottom: 1px solid var(--glass-border); }
.meta-table tr:last-child { border-bottom: none; }
.meta-table td { padding: var(--s-2) var(--s-3); }
.meta-table td:first-child {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  width: 40%;
}
.meta-table td:last-child {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 3px;
}
.tab-btn {
  flex: 1;
  padding: var(--s-2) var(--s-4);
  border-radius: calc(var(--r-md) - 3px);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--t-fast);
  cursor: pointer;
  text-align: center;
}
.tab-btn.active {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 0 16px rgba(124,58,237,0.3);
}
.tab-btn:not(.active):hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}
.tab-content { display: none; }
.tab-content.active { display: flex; flex-direction: column; gap: var(--s-4); }

/* ---- Copy button ---- */
.copy-wrapper { position: relative; }
.copy-btn {
  position: absolute;
  top: var(--s-2); right: var(--s-2);
  padding: 5px 12px;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--violet-light);
  cursor: pointer;
  transition: all var(--t-fast);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.copy-btn:hover {
  background: rgba(124,58,237,0.25);
  border-color: rgba(124,58,237,0.4);
  box-shadow: 0 0 12px rgba(124,58,237,0.3);
}
.copy-btn.copied {
  background: rgba(16,185,129,0.15);
  color: var(--success);
  border-color: rgba(16,185,129,0.3);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: var(--s-8) 0;
  background: var(--bg-surface);
}
.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: var(--s-6);
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--violet-light); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ---- Utility ---- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-4 { margin-bottom: var(--s-4); }
.p-4  { padding: var(--s-4); }

/* ---- Animations ---- */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }

/* ---- Progress bar ---- */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--glass-border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .container { padding-inline: var(--s-4); }
  .hero { padding-top: calc(64px + var(--s-12)); padding-bottom: var(--s-12); }
  .hero-title { font-size: 2.2rem; }
  .tools-grid { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: var(--s-6); }
}
