/* ============================================================
   JPG2PNG – Complete Design System
   Modern, accessible, conversion-tool UI
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
  --primary:       #5B5BD6;
  --primary-dark:  #4141B0;
  --primary-light: #8B8BE8;
  --secondary:     #7C3AED;
  --accent:        #FF5C3A;
  --success:       #10B981;
  --warning:       #F59E0B;
  --error:         #EF4444;
  --info:          #0EA5E9;

  --bg:            #F6F7FB;
  --surface:       #FFFFFF;
  --surface-2:     #F1F5F9;
  --border:        #E2E8F0;
  --border-hover:  #CBD5E1;

  --text:          #111827;
  --text-secondary:#475569;
  --text-muted:    #9CA3AF;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.04);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl:32px;
  --radius-full: 9999px;

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

  --trans: .18s cubic-bezier(.4,0,.2,1);
  --trans-fast: .12s cubic-bezier(.4,0,.2,1);

  --nav-height: 64px;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }
h1,h2,h3,h4,h5,h6 { line-height: 1.3; font-weight: 700; }

/* ---- Typography Scale ---- */
.text-xs   { font-size: .75rem;  line-height: 1rem; }
.text-sm   { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem;    line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem;line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem;  line-height: 2rem; }
.text-3xl  { font-size: 1.875rem;line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl  { font-size: 3rem;    line-height: 1; }

/* ---- Layout Utilities ---- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: .5rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.grid   { display: grid; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--text);
  flex-shrink: 0;
  text-decoration: none;
}

.nav__logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  font-weight: 900;
  letter-spacing: -.5px;
}

.nav__logo-text span { color: var(--primary); }

.nav__tools {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  justify-content: center;
}
.nav__tools::-webkit-scrollbar { display: none; }

.nav__tool-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--trans);
  text-decoration: none;
}

.nav__tool-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav__tool-link.active {
  background: var(--primary);
  color: #fff;
}
.nav__tool-link.active:hover { color: #fff; background: var(--primary-dark); }

.nav__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Language Selector */
.lang-select {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--trans);
  position: relative;
}
.lang-select:hover { border-color: var(--primary); color: var(--primary); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: 6px;
  display: none;
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
}
.lang-dropdown.open { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--trans);
  text-decoration: none;
}
.lang-option:hover { background: var(--surface-2); color: var(--text); }
.lang-option.active { background: rgba(91,91,214,.08); color: var(--primary); font-weight: 600; }

/* Mobile Nav Toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}

/* ============================================================
   HERO / PAGE HEADER
   ============================================================ */
.page-hero {
  padding: 56px 0 40px;
  text-align: center;
  background: linear-gradient(160deg, #fff 0%, #F6F7FB 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(91,91,214,.1);
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .3px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -.5px;
}

.page-hero__title span { color: var(--primary); }

.page-hero__desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 24px;
  line-height: 1.65;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.trust-badge svg { color: var(--success); flex-shrink: 0; }

/* ============================================================
   MAIN LAYOUT (3-col: ad | tool | ad)
   ============================================================ */
.page-layout {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 24px;
  padding: 32px 24px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}

.page-layout__main { min-width: 0; }

/* ---- Ad Columns ---- */
.ad-col { position: sticky; top: calc(var(--nav-height) + 16px); }

.ad-unit {
  background: var(--surface);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  color: var(--text-muted);
  font-size: .75rem;
}

.ad-unit--sidebar { width: 160px; min-height: 600px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; padding: 8px; }
.ad-unit--leaderboard { width: 100%; height: 90px; margin-bottom: 24px; display: flex; align-items: center; justify-content: center; }
.ad-unit--rectangle { width: 100%; min-height: 250px; margin: 24px 0; display: flex; align-items: center; justify-content: center; }

/* ============================================================
   CONVERTER CARD
   ============================================================ */
.converter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.converter-card__header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.converter-card__icon {
  width: 46px;
  height: 46px;
  background: rgba(91,91,214,.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.converter-card__meta { flex: 1; }
.converter-card__meta h2 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 2px; }
.converter-card__meta p { font-size: .8125rem; color: var(--text-secondary); }

.converter-card__body { padding: 24px 28px; }

/* ---- Drop Zone ---- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--trans);
  position: relative;
  background: var(--surface-2);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(91,91,214,.04);
}

.drop-zone__icon {
  width: 56px;
  height: 56px;
  background: rgba(91,91,214,.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin: 0 auto 16px;
}

.drop-zone__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.drop-zone__hint {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.drop-zone__limits {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.drop-zone__limit-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  font-size: .75rem;
  color: var(--text-muted);
}

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

/* ---- File List ---- */
.file-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: border-color var(--trans);
}

.file-item--success { border-color: var(--success); }
.file-item--error   { border-color: var(--error); }

.file-item__thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  overflow: hidden;
}

.file-item__thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.file-item__info { flex: 1; min-width: 0; }
.file-item__name { font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item__size { font-size: .75rem; color: var(--text-muted); }

.file-item__status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.file-item__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: all var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-item__remove:hover { background: #FEE2E2; color: var(--error); }

/* Progress bar */
.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar__fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width .3s ease;
}

/* Status icons */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--pending  { background: var(--text-muted); }
.status-dot--loading  { background: var(--warning); animation: pulse 1s infinite; }
.status-dot--success  { background: var(--success); }
.status-dot--error    { background: var(--error); }

@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ---- Options Strip ---- */
.options-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 16px;
  margin-bottom: 20px;
}

.option-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.option-select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: .8125rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--trans);
  outline: none;
}
.option-select:focus { border-color: var(--primary); }

.option-check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: .8125rem;
  color: var(--text-secondary);
  user-select: none;
}
.option-check input[type=checkbox] {
  width: 16px; height: 16px;
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ---- Action Bar ---- */
.action-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all var(--trans);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn--sm  { padding: 8px 18px; font-size: .8125rem; }
.btn--md  { padding: 11px 24px; font-size: .9375rem; }
.btn--lg  { padding: 14px 32px; font-size: 1rem; }
.btn--xl  { padding: 16px 40px; font-size: 1.0625rem; }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(91,91,214,.3);
}
.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 4px 16px rgba(91,91,214,.4); transform: translateY(-1px); color: #fff; }
.btn--primary:active { transform: translateY(0); }

.btn--secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn--secondary:hover { background: rgba(91,91,214,.06); color: var(--primary-dark); }

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
.btn--success:hover { background: #0DA374; transform: translateY(-1px); color: #fff; }

.btn--icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-secondary);
}
.btn--icon:hover { background: var(--border); color: var(--text); }

/* Loading spinner inside button */
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESULT PANEL
   ============================================================ */
.result-panel {
  background: linear-gradient(135deg, rgba(16,185,129,.05) 0%, rgba(91,91,214,.05) 100%);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
  text-align: center;
  display: none;
}

.result-panel.show { display: block; }

.result-panel__icon {
  width: 56px;
  height: 56px;
  background: rgba(16,185,129,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  margin: 0 auto 14px;
}

.result-panel__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-panel__subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.result-panel__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

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

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  min-width: 280px;
  max-width: 400px;
  animation: toast-in .25s cubic-bezier(.34,1.56,.64,1);
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.toast--success { border-left: 3px solid var(--success); }
.toast--error   { border-left: 3px solid var(--error); }
.toast--info    { border-left: 3px solid var(--info); }

.toast__icon { flex-shrink: 0; }
.toast__text { flex: 1; font-size: .875rem; }
.toast__title { font-weight: 600; margin-bottom: 2px; }
.toast__close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 2px; transition: color var(--trans); }
.toast__close:hover { color: var(--text); }

/* ============================================================
   CONTENT ARTICLE (SEO content section)
   ============================================================ */
.content-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin-bottom: 24px;
}

.content-article h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.content-article h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.content-article h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 18px 0 8px;
}

.content-article p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 14px;
}

.content-article ul, .content-article ol {
  margin-left: 20px;
  margin-bottom: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.content-article ul { list-style: disc; }
.content-article ol { list-style: decimal; }

.content-article li { margin-bottom: 6px; }

.content-article strong { color: var(--text); font-weight: 600; }

.content-article blockquote {
  border-left: 3px solid var(--primary);
  background: rgba(91,91,214,.04);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: .9375rem;
  color: var(--text-secondary);
}

.content-article .steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0;
}

.content-article .step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.content-article .step__num {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8125rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.content-article .step__text h4 { font-size: .9375rem; font-weight: 600; margin-bottom: 4px; }
.content-article .step__text p  { font-size: .875rem; margin: 0; }

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section { margin-bottom: 24px; }

.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color var(--trans);
}

.faq-item:hover { border-color: var(--border-hover); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: .9375rem;
  gap: 12px;
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform var(--trans);
  color: var(--text-muted);
}

.faq-item.open .faq-question svg { transform: rotate(180deg); color: var(--primary); }
.faq-item.open { border-color: var(--primary); }

.faq-answer {
  display: none;
  padding: 0 20px 16px;
  color: var(--text-secondary);
  font-size: .9375rem;
  line-height: 1.7;
}

.faq-item.open .faq-answer { display: block; }

/* ============================================================
   RELATED TOOLS GRID
   ============================================================ */
.related-tools { margin-bottom: 32px; }

.related-tools h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--trans);
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  color: var(--text);
}

.tool-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 800;
}

.tool-card__icon--blue   { background: rgba(91,91,214,.1); color: var(--primary); }
.tool-card__icon--green  { background: rgba(16,185,129,.1); color: var(--success); }
.tool-card__icon--orange { background: rgba(245,158,11,.1); color: var(--warning); }
.tool-card__icon--red    { background: rgba(239,68,68,.1);  color: var(--error); }
.tool-card__icon--cyan   { background: rgba(14,165,233,.1); color: var(--info); }

.tool-card__text { flex: 1; min-width: 0; }
.tool-card__name { font-size: .875rem; font-weight: 600; line-height: 1.3; }
.tool-card__desc { font-size: .75rem; color: var(--text-muted); line-height: 1.3; }

/* ============================================================
   HOMEPAGE
   ============================================================ */
.home-hero {
  padding: 80px 0 64px;
  text-align: center;
  background: linear-gradient(160deg, #fff 0%, #F6F7FB 100%);
}

.home-hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.home-hero__title span { color: var(--primary); }

.home-hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

.home-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 40px 0;
}

.home-tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--trans);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--text);
}

.home-tool-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-tool-card__name { font-size: 1rem; font-weight: 700; }
.home-tool-card__desc { font-size: .875rem; color: var(--text-secondary); line-height: 1.5; }

.home-tool-card__cta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer__brand { display: flex; flex-direction: column; gap: 14px; }

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

.footer__desc {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 280px;
}

.footer__col-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__link {
  font-size: .875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--trans);
}
.footer__link:hover { color: var(--primary); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copyright { font-size: .8125rem; color: var(--text-muted); }

.footer__bottom-links {
  display: flex;
  gap: 20px;
}

.footer__bottom-link {
  font-size: .8125rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--trans);
}
.footer__bottom-link:hover { color: var(--primary); }

/* ============================================================
   CARDS & CONTENT PAGES
   ============================================================ */
.content-page { padding: 48px 0 64px; }

.content-page__header {
  text-align: center;
  margin-bottom: 48px;
}

.content-page__header h1 { font-size: 2.25rem; margin-bottom: 12px; }
.content-page__header p  { font-size: 1.0625rem; color: var(--text-secondary); }

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 48px;
  box-shadow: var(--shadow-sm);
}

/* Contact form */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9375rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--trans);
  outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,91,214,.12); }
.form-textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   OVERLAYS & MODALS
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   PROCESSING OVERLAY
   ============================================================ */
.processing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.92);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
}

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

.spinner--sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 440px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { font-size: .875rem; margin-bottom: 14px; color: rgba(255,255,255,.8); line-height: 1.55; }
.cookie-banner a { color: var(--primary-light); }
.cookie-banner .btn-row { display: flex; gap: 8px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.font-bold    { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error   { color: var(--error); }
.text-muted   { color: var(--text-muted); }

.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.w-full  { width: 100%; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
}
.badge--blue   { background: rgba(91,91,214,.1); color: var(--primary); }
.badge--green  { background: rgba(16,185,129,.1); color: var(--success); }
.badge--orange { background: rgba(245,158,11,.1); color: var(--warning); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .ad-col { display: none; }
}

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__tools   { display: none; }
  .nav__toggle  { display: flex; }
  .nav__tools.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 12px;
    gap: 4px;
    z-index: 99;
  }
  .nav__tools.mobile-open .nav__tool-link {
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 600px) {
  .content-card { padding: 24px 20px; }
  .footer__grid { grid-template-columns: 1fr; }
  .converter-card__body { padding: 18px 20px; }
  .converter-card__header { padding: 18px 20px 14px; }
  .content-article { padding: 22px 20px; }
  .drop-zone { padding: 36px 16px; }
  .home-hero { padding: 48px 0 40px; }
  .action-bar { flex-direction: column; }
  .action-bar .btn { width: 100%; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .nav, .footer, .ad-unit, .cookie-banner { display: none !important; }
  body { background: #fff; }
}
