@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-medium.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-semibold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-bold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/inter-extrabold.woff2') format('woff2'); }

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121f;
  --bg-card: rgba(22, 22, 40, 0.7);
  --bg-card-hover: rgba(30, 30, 55, 0.8);
  --bg-card-solid: #16162a;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --accent-subtle: rgba(124, 58, 237, 0.08);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --error: #ef4444;
  --error-glow: rgba(239, 68, 68, 0.3);
  --warning: #f59e0b;
  --info: #3b82f6;
  --text-primary: #f1f1f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.bg-effects {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}
.orb-1 { width: 600px; height: 600px; background: #7c3aed; top: -200px; right: -100px; }
.orb-2 { width: 500px; height: 500px; background: #6366f1; bottom: -150px; left: -100px; animation-delay: -7s; }
.orb-3 { width: 400px; height: 400px; background: #8b5cf6; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -14s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(40px, 20px) scale(1.02); }
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 18, 0.8);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  cursor: pointer;
}
.logo-icon { display: flex; align-items: center; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.logo-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.main-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-link.active { background: var(--accent); color: white; box-shadow: 0 2px 12px var(--accent-glow); }

.header-right { display: flex; align-items: center; gap: 12px; }

.lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.5px;
}
.lang-switcher:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-subtle);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

/* ===== MAIN ===== */
#app {
  position: relative;
  z-index: 10;
  min-height: calc(100vh - 200px);
}

/* ===== HERO SECTION ===== */
.hero {
  text-align: center;
  padding: 80px 24px 48px;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, #a78bfa, #6366f1, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* ===== SEARCH ===== */
.search-wrapper {
  max-width: 560px;
  margin: 0 auto 56px;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all var(--transition);
  backdrop-filter: blur(12px);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 8px 30px rgba(0,0,0,0.3);
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: none;
}
.search-results.visible { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(124, 58, 237, 0.08); }
.search-result-item .sri-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.search-result-item .sri-info { flex: 1; min-width: 0; }
.search-result-item .sri-name { font-size: 0.88rem; font-weight: 500; }
.search-result-item .sri-desc { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== CATEGORIES SECTION ===== */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding: 0 24px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 56px;
  padding: 0 24px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.category-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.category-card .cc-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card .cc-icon.converters { background: rgba(124, 58, 237, 0.15); color: var(--accent-light); }
.category-card .cc-icon.dev-tools { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.category-card .cc-icon.generators { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.category-card .cc-icon.productivity { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.category-card .cc-icon.ai-tools { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.category-card .cc-name { font-size: 1rem; font-weight: 600; }
.category-card .cc-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.category-card .cc-count { font-size: 0.72rem; color: var(--text-muted); margin-top: auto; }

/* ===== TOOLS GRID ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto 56px;
  padding: 0 24px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all var(--transition);
}
.tool-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.tool-card .tc-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-card .tc-icon.converters { background: rgba(124, 58, 237, 0.12); color: var(--accent-light); }
.tool-card .tc-icon.dev-tools { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.tool-card .tc-icon.generators { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.tool-card .tc-icon.productivity { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.tool-card .tc-icon.ai-tools { background: rgba(236, 72, 153, 0.12); color: #f472b6; }
.tool-card .tc-info { flex: 1; min-width: 0; }
.tool-card .tc-name { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.tool-card .tc-desc { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card .tc-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
  opacity: 0;
}
.tool-card:hover .tc-arrow { opacity: 1; color: var(--accent-light); transform: translateX(3px); }

.tool-card.coming-soon { opacity: 0.5; cursor: default; pointer-events: none; }
.tool-card.coming-soon::after {
  content: attr(data-soon);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border-radius: 100px;
}

/* ===== TOOL PAGE ===== */
.tool-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.breadcrumbs a {
  color: var(--text-secondary);
  transition: color var(--transition);
}
.breadcrumbs a:hover { color: var(--accent-light); }
.breadcrumbs .bc-sep { color: var(--text-muted); }

.tool-page-header {
  margin-bottom: 32px;
}
.tool-page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.tool-page-header .tool-page-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tool-body {
  animation: fadeSlideIn 0.35s ease-out;
}

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

/* ===== CONVERTER UI (reused from original) ===== */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.tab.active { background: var(--accent); color: white; box-shadow: 0 4px 20px var(--accent-glow); }
.tab svg { flex-shrink: 0; }

.drop-zone {
  position: relative;
  border: 2px dashed rgba(124, 58, 237, 0.3);
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: rgba(124, 58, 237, 0.05); }
.drop-zone:hover::before, .drop-zone.dragover::before { opacity: 1; }
.drop-zone.dragover { transform: scale(1.01); }
.drop-zone-content { position: relative; z-index: 1; }
.drop-icon { margin-bottom: 16px; color: var(--accent-light); animation: bobbing 3s ease-in-out infinite; }

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

.drop-zone h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.drop-zone p { color: var(--text-secondary); font-size: 0.9rem; }

.supported-formats {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.format-badge {
  padding: 4px 10px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  transition: all var(--transition);
  animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.file-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }

.file-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.file-icon.documents { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.file-icon.images { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.file-icon.audio { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.file-icon.video { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 500; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.file-status { padding: 4px 12px; border-radius: 100px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.file-status.pending { background: rgba(124, 58, 237, 0.1); color: var(--accent-light); }
.file-status.converting { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.file-status.done { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.file-status.error { background: rgba(239, 68, 68, 0.1); color: var(--error); }

.file-remove {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.file-remove:hover { color: var(--error); background: rgba(239, 68, 68, 0.1); }

.settings-panel {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}
.settings-panel.hidden { display: none; }

.settings-row { display: flex; gap: 24px; align-items: end; flex-wrap: wrap; margin-bottom: 20px; }
.setting-group { display: flex; flex-direction: column; gap: 8px; }
.setting-group label { font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); }

.format-select {
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  min-width: 180px;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.format-select:hover { border-color: var(--accent); }
.format-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.quality-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 200px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-secondary);
  outline: none;
}
.quality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 10px var(--accent-glow);
  transition: all var(--transition);
}
.quality-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.action-buttons { display: flex; gap: 12px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.btn-accent {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.btn-accent:hover { background: rgba(16, 185, 129, 0.2); box-shadow: 0 4px 20px var(--success-glow); }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }

/* ===== PROGRESS ===== */
.progress-area {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
}
.progress-area.hidden { display: none; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 0.85rem; }
.progress-text { color: var(--text-secondary); }
.progress-percent { color: var(--accent-light); font-weight: 600; }
.progress-bar-track { height: 8px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; }
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa, #7c3aed);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== RESULTS ===== */
.results-area {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.4s ease-out;
}
.results-area.hidden { display: none; }

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

.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.results-header h3 { font-size: 1rem; font-weight: 600; color: var(--success); }
.results-list { display: flex; flex-direction: column; gap: 8px; }

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  animation: slideIn 0.3s ease-out;
}
.result-item:hover { background: rgba(16, 185, 129, 0.08); }
.result-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.result-icon { color: var(--success); flex-shrink: 0; }
.result-name { font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-size { font-size: 0.78rem; color: var(--text-muted); margin-left: 8px; flex-shrink: 0; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-xs);
  color: var(--success);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-download:hover { background: rgba(16, 185, 129, 0.2); }

/* ===== TEXT TOOL UI ===== */
.text-tool {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.text-tool-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.text-tool-row.single { grid-template-columns: 1fr; }

.text-tool-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.text-tool-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.text-tool-section-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.text-tool-section-header .section-actions { display: flex; gap: 6px; }

.tool-textarea {
  width: 100%;
  min-height: 240px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}
.tool-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.tool-textarea::placeholder { color: var(--text-muted); }
.tool-textarea[readonly] { cursor: default; background: rgba(18, 18, 31, 0.8); }

.tool-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.tool-options {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tool-option {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-option label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.tool-option select {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
}
.tool-option select:focus { border-color: var(--accent); }

.tool-option input[type="number"],
.tool-option input[type="text"] {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  width: 80px;
  outline: none;
}
.tool-option input:focus { border-color: var(--accent); }

.tool-option input[type="checkbox"] {
  accent-color: var(--accent);
}

/* ===== GENERATOR OUTPUT ===== */
.gen-output {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 1.1rem;
  word-break: break-all;
  color: var(--accent-light);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gen-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}
.gen-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gen-control label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.gen-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-secondary);
  outline: none;
}
.gen-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ===== MARKDOWN PREVIEW ===== */
.md-preview {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 240px;
  overflow-y: auto;
  line-height: 1.8;
}
.md-preview h1 { font-size: 1.5rem; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.md-preview h2 { font-size: 1.3rem; margin-bottom: 10px; }
.md-preview h3 { font-size: 1.1rem; margin-bottom: 8px; }
.md-preview p { margin-bottom: 12px; }
.md-preview code { background: rgba(124,58,237,0.15); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.9em; }
.md-preview pre { background: var(--bg-primary); padding: 16px; border-radius: 8px; overflow-x: auto; margin-bottom: 12px; }
.md-preview pre code { background: none; padding: 0; }
.md-preview ul, .md-preview ol { margin-bottom: 12px; padding-left: 24px; }
.md-preview blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--text-secondary); margin-bottom: 12px; }
.md-preview a { color: var(--accent-light); text-decoration: underline; }
.md-preview strong { font-weight: 700; }
.md-preview em { font-style: italic; }

/* ===== RELATED TOOLS ===== */
.related-tools {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related-tools h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; color: var(--text-secondary); }
.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

/* ===== DIFF VIEWER ===== */
.diff-output {
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
  min-height: 200px;
  max-height: 500px;
  overflow-y: auto;
}
.diff-line-add { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; }
.diff-line-remove { background: rgba(239, 68, 68, 0.1); color: #fca5a5; }
.diff-line-info { color: var(--accent-light); }

/* ===== CATEGORY PAGE ===== */
.category-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.category-page-header {
  margin-bottom: 36px;
}
.category-page-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.category-page-header p { font-size: 1rem; color: var(--text-secondary); }

/* ===== STATS ROW ===== */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 56px;
}
.stat-item { text-align: center; }
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 18, 0.6);
  backdrop-filter: blur(12px);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 36px;
}
.footer-brand { max-width: 320px; }
.footer-brand .logo-name { font-size: 1.3rem; margin-bottom: 8px; display: block; }
.footer-brand p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.footer-links { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.footer-col a { font-size: 0.8rem; color: var(--text-muted); transition: color var(--transition); }
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { font-size: 0.75rem; color: var(--text-muted); }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(12px);
  animation: toastIn 0.3s ease-out;
  max-width: 360px;
}
.toast.info { background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.3); color: #a5b4fc; }
.toast.success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #6ee7b7; }
.toast.error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== SPINNER ===== */
.btn-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== UNIT CONVERTER ===== */
.unit-converter-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
}
.unit-swap-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-subtle);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--accent-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-bottom: 4px;
}
.unit-swap-btn:hover { background: rgba(124,58,237,0.2); transform: rotate(180deg); }

.unit-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  outline: none;
  transition: border-color var(--transition);
}
.unit-input:focus { border-color: var(--accent); }

/* ===== COLOR CONVERTER ===== */
.color-preview-box {
  width: 100%;
  height: 100px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: background var(--transition);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
::selection { background: var(--accent); color: white; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-card-solid);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
    z-index: 100;
  }
  .mobile-menu-btn { display: flex; }
  .lang-switcher { padding: 4px 10px; font-size: 0.72rem; }
  .hero h1 { font-size: 2.2rem; }
  .text-tool-row { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-links { gap: 40px; }
  .stats-row { gap: 24px; }
  .unit-converter-row { grid-template-columns: 1fr; }
  .unit-swap-btn { justify-self: center; transform: rotate(90deg); }
  .unit-swap-btn:hover { transform: rotate(270deg); }
}

@media (max-width: 600px) {
  .header-inner { padding: 12px 16px; }
  .hero { padding: 48px 16px 32px; }
  .hero h1 { font-size: 1.8rem; }
  .hero .hero-subtitle { font-size: 0.95rem; }
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
  .tools-grid { grid-template-columns: 1fr; padding: 0 16px; }
  .tool-page { padding: 20px 16px 60px; }
  .tool-page-header h1 { font-size: 1.4rem; }
  .category-tabs { flex-wrap: wrap; }
  .tab { padding: 10px 12px; font-size: 0.82rem; }
  .tab svg { display: none; }
  .drop-zone { padding: 36px 16px; }
  .settings-row { flex-direction: column; }
  .action-buttons { flex-direction: column; }
  .btn { justify-content: center; }
  .results-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .result-item { flex-direction: column; gap: 10px; align-items: flex-start; }
  .stat-value { font-size: 1.5rem; }
  .footer-links { flex-direction: column; gap: 24px; }
  .search-wrapper { margin-bottom: 36px; }
  .gen-controls { flex-direction: column; }
  .gen-control input[type="range"] { width: 100%; }
}
