@import url('https://styleguide-eta.vercel.app/dist/tokens.css');
@import url('https://styleguide-eta.vercel.app/dist/components.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Map legacy vars to styleguide tokens */
  --bg: var(--color-surface);
  --surface: var(--color-surface-elevated);
  --surface-hover: var(--color-gray-100);
  --border: var(--color-border);
  --text: var(--color-text);
  --text-muted: var(--color-text-secondary);
  --accent: var(--color-charcoal);
  --accent-hover: var(--color-violet);
  --success: var(--color-success);
  --error: var(--color-error);
  --radius: var(--radius-lg);
}

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-5) 120px;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
  background: var(--color-surface);
  text-align: center;
  padding-top: 0;
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-10);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

header h1 {
  font-size: max(300px, 26vw);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.85;
  color: var(--color-charcoal);
  white-space: nowrap;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: 0.1em;
}

.title-top {
  display: block;
  text-align: left;
}

.title-bottom {
  display: block;
  text-align: right;
  margin-top: -0.42em;
  mix-blend-mode: exclusion;
}

.card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card h2 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--color-charcoal);
}

.hint {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-5);
}

.hint a {
  color: var(--color-charcoal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hint a:hover {
  color: var(--color-violet);
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--color-violet);
  background: var(--color-violet-bg);
}

.drop-zone-content svg {
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.drop-zone-content p {
  color: var(--color-text-secondary);
}

.drop-zone-content .small {
  font-size: var(--font-size-xs);
}

.drop-zone-content .muted {
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Upload Preview */
.preview-upload {
  margin-top: var(--space-4);
  text-align: center;
}

.preview-upload img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* Options */
.options {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
}

.field {
  flex: 1;
}

.field label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-charcoal);
  margin-bottom: var(--space-1);
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.field input:focus,
.field select:focus {
  border-color: var(--color-violet-light);
}

/* Buttons — use styleguide pill buttons */
.btn-primary {
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 20px;
  background: var(--color-charcoal);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  text-align: center;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-violet);
  color: #111110;
}

.btn-primary:disabled {
  background: var(--color-gray-400);
  cursor: not-allowed;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-violet);
  outline-offset: 2px;
}

.btn-secondary {
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 500;
  padding: 10px 14px;
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-text);
  border-radius: var(--radius-full);
  cursor: pointer;
  margin-top: var(--space-3);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--color-violet);
  border-color: var(--color-violet);
  color: #111110;
}

/* Progress */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.progress-fill {
  height: 100%;
  background: var(--color-violet);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.progress-message {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.progress-stage {
  margin-top: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Results */
.result-block {
  margin-bottom: var(--space-6);
}

.result-block h3 {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-text-secondary);
}

.result-block img {
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.result-header h3 {
  margin-bottom: 0;
}

/* Glyphs Grid */
.glyphs-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.glyph-group-header {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: calc(-1 * var(--space-2));
}

.glyph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.glyph-cell {
  position: relative;
  aspect-ratio: 1;
  background: var(--color-charcoal);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: visible;
  transition: border-color var(--transition-fast);
}

.glyph-cell:hover {
  border-color: var(--color-violet);
}

.glyph-cell img {
  max-width: 100%;
  max-height: 90%;
  object-fit: contain;
  border: none;
  flex: 1;
  filter: invert(1);
}

.glyph-cell .glyph-svg {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  overflow: visible;
}

.glyph-cell .glyph-svg svg {
  width: 100%;
  height: 100%;
}

.glyph-cell .glyph-download {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-gray-400);
  text-decoration: none;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition-fast), background var(--transition-fast);
}

.glyph-cell:hover .glyph-download {
  opacity: 1;
}

.glyph-cell .glyph-download:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.glyph-cell .glyph-label {
  font-size: 0.7rem;
  color: var(--color-gray-400);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  line-height: 1;
}

/* Missing glyph */
.glyph-cell.glyph-missing {
  border: 2px solid var(--color-error);
  background: rgba(160, 60, 60, 0.08);
}

.glyph-cell.glyph-missing .glyph-label {
  color: var(--color-error);
}

.glyph-cell.glyph-missing .glyph-empty {
  min-height: 60px;
}

/* Low confidence glyph */
.glyph-cell.glyph-low-confidence {
  border: 2px solid var(--color-warning);
  background: rgba(184, 134, 11, 0.08);
}

.glyph-cell.glyph-low-confidence .glyph-label {
  color: var(--color-warning);
}

/* Medium confidence glyph */
.glyph-cell.glyph-medium-confidence {
  border: 2px solid rgba(184, 134, 11, 0.4);
}

/* Summary line */
.glyph-summary {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3);
}

/* Style info */
.style-info {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-style: italic;
  line-height: 1.5;
}

/* Font Preview */
.font-preview {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  font-size: var(--font-size-xl);
  line-height: 2;
  letter-spacing: 0.02em;
}

.font-preview p {
  margin-bottom: var(--space-2);
  word-break: break-all;
}

/* Multi-file thumbnails */
.preview-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-3);
}

.preview-thumb {
  position: relative;
  width: 120px;
  text-align: center;
}

.preview-thumb img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.thumb-name {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-error);
  color: white;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Progress entries for multiple jobs */
.progress-entry {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.progress-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.progress-filename {
  font-weight: 600;
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-2);
}

/* Results tabs */
.results-tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}

.result-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.result-tab:hover {
  color: var(--color-text);
}

.result-tab.active {
  color: var(--color-charcoal);
  border-bottom-color: var(--color-charcoal);
}

/* Source images grid (multi-file merge) */
.sources-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.source-item {
  text-align: center;
  width: 200px;
}

.source-item img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.source-name {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ═══════ Floating Bottom Navigation ═══════ */
.floating-nav {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  width: 70vw;
  display: flex;
  justify-content: center;
  gap: 0.5vw;
  padding: 0.6vw;
  background: var(--color-violet);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: none;
  border-radius: var(--radius-full);
  z-index: 100;
  box-shadow: none;
  animation: floatNavIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

/* Sliding highlight */
.floating-nav-slider {
  position: absolute;
  top: 0.6vw;
  left: 0;
  height: calc(100% - 1.2vw);
  background: #111110;
  border-radius: var(--radius-full);
  box-shadow: none;
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
  pointer-events: none;
}

@keyframes floatNavIn {
  to {
    transform: translateX(-50%) translateY(0);
  }
}

.floating-nav-item {
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  gap: 0.4vw;
  padding: 1vw 1.8vw;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: rgba(0, 0, 0, 0.5);
  font-size: 1vw;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.floating-nav-item svg {
  flex-shrink: 0;
  width: 1.6vw;
  height: 1.6vw;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-nav-item:hover {
  color: rgba(0, 0, 0, 0.8);
}

.floating-nav-item:hover svg {
  transform: scale(1.1);
}

.floating-nav-item.active {
  color: #ffffff;
  font-weight: 600;
}

.floating-nav-item.active svg {
  transform: scale(1.05);
}

@media (max-width: 540px) {
  .floating-nav {
    bottom: 16px;
    gap: 2px;
    padding: 6px;
  }

  .floating-nav-item {
    padding: 10px 14px;
    font-size: 0.75rem;
    gap: var(--space-1);
  }

  .floating-nav-item svg {
    width: 18px;
    height: 18px;
  }
}

/* Dark theme: black bar + accent selected */
[data-theme="dark"] .floating-nav {
  background: #111110;
  border: none;
  box-shadow: none;
}

[data-theme="dark"] .floating-nav-slider {
  background: var(--color-violet);
  box-shadow: none;
}

[data-theme="dark"] .floating-nav-item {
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .floating-nav-item:hover {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .floating-nav-item.active {
  color: #000000;
}

/* ═══════ Home Page ═══════ */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  position: relative;
  overflow: visible;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.home-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'MuseoModerno', cursive;
  font-size: max(400px, 28vw);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.5;
  color: #333333;
  text-align: center;
  user-select: none;
  white-space: nowrap;
  position: absolute;
  inset: 0;
}

.home-title-top,
.home-title-mid,
.home-title-bot {
  align-self: center;
  display: flex;
}

.home-title-top,
.home-title-bot {
  color: var(--color-text-muted);
}

.home-title-mid {
  color: var(--color-violet);
}

[data-theme="dark"] .home-title-top,
[data-theme="dark"] .home-title-bot {
  color: #ffffff;
}

.home-char {
  display: inline-block;
  opacity: 0;
  animation: charBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(3deg); }
  30% { transform: rotate(-2.5deg); }
  45% { transform: rotate(2deg); }
  60% { transform: rotate(-1.5deg); }
  75% { transform: rotate(1deg); }
  90% { transform: rotate(-0.5deg); }
}

.home-char.wiggle {
  animation: charBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             wiggle 0.6s ease-in-out 1;
}

@keyframes charBounceIn {
  0% {
    opacity: 0;
    transform: translate(var(--from-x), var(--from-y)) scale(1.4) rotate(var(--from-r));
  }
  50% {
    opacity: 1;
    transform: translate(calc(var(--from-x) * -0.1), calc(var(--from-y) * -0.1)) scale(0.95) rotate(calc(var(--from-r) * -0.2));
  }
  70% {
    transform: translate(calc(var(--from-x) * 0.05), calc(var(--from-y) * 0.05)) scale(1.02) rotate(calc(var(--from-r) * 0.1));
  }
  85% {
    transform: translate(0, 0) scale(0.99) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
}

.home-objects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Hide sticky header on home page */
body.on-home header {
  display: none;
}

/* Toolbar scales up on home page */
body.on-home .floating-nav {
  bottom: auto;
  top: 55%;
  transform: translateX(-50%) translateY(-50%) scaleX(0.02) scaleY(0.6);
  opacity: 0;
  border-radius: 50%;
  animation: navDotExpand 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.8s forwards;
  padding: 10px;
  gap: 8px;
}

body.on-home .floating-nav-item {
  opacity: 0;
  animation: navItemsFadeIn 0.4s ease 2.3s forwards;
}

body.on-home .floating-nav-slider {
  opacity: 0;
  animation: navItemsFadeIn 0.4s ease 2.3s forwards;
}

@keyframes navDotExpand {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scaleX(0.02) scaleY(0.6);
    border-radius: 50%;
  }
  40% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scaleX(0.5) scaleY(0.9);
    border-radius: var(--radius-full);
  }
  70% {
    transform: translateX(-50%) translateY(-50%) scaleX(1.03) scaleY(1.02);
  }
  85% {
    transform: translateX(-50%) translateY(-50%) scaleX(0.99) scaleY(0.99);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scaleX(1) scaleY(1);
    border-radius: var(--radius-full);
  }
}

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

body.on-home .floating-nav-item {
  padding: 16px 28px;
  font-size: var(--font-size-base);
}

body.on-home .floating-nav-item svg {
  width: 22px;
  height: 22px;
}

body.on-home .floating-nav-slider {
  top: 10px;
  height: calc(100% - 20px);
}

/* ═══════ Page Intro ═══════ */
.page-intro {
  text-align: center;
  margin-bottom: var(--space-8);
  padding: 0 var(--space-5);
}

.page-intro h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-charcoal);
}

.page-intro p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

/* ═══════ Match Font ═══════ */

.match-preview {
  margin-top: var(--space-4);
  text-align: center;
}

.match-preview img {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-2);
}

.match-stage-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  margin-bottom: var(--space-4);
  font-style: italic;
}

.match-results-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.match-result-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-base);
}

.match-result-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.match-font-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.match-category {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-transform: capitalize;
  margin-top: 2px;
}

.match-score {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  min-width: 60px;
  text-align: center;
}

.match-score.high {
  color: var(--color-success);
}

.match-score.medium {
  color: var(--color-warning);
}

.match-score.low {
  color: var(--color-text-muted);
}

.match-specimen {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.match-glyph-comparisons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.match-glyph-pair {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}

.match-glyph-cell {
  text-align: center;
  width: 40px;
}

.match-glyph-svg {
  width: 36px;
  height: 36px;
  display: block;
  margin: 0 auto;
}

.match-glyph-svg.user {
  color: var(--color-charcoal);
}

.match-glyph-svg.font {
  color: var(--color-text);
}

.match-glyph-label {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

.match-card-actions {
  display: flex;
  gap: var(--space-2);
}

.match-google-link {
  font-size: var(--font-size-xs);
  text-decoration: none;
}

.match-no-results {
  color: var(--color-text-secondary);
  text-align: center;
  padding: var(--space-8);
  font-size: var(--font-size-base);
}

.match-cta {
  text-align: center;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.match-cta p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-lg);
}

/* ═══════ Generate Icon ═══════ */

.icon-prompt-row {
  margin-bottom: var(--space-4);
}

.icon-prompt-input {
  width: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
}

.icon-prompt-input:focus {
  border-color: var(--color-violet-light);
}

.icon-prompt-input::placeholder {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.icon-results-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.icon-result-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  position: relative;
}

.icon-result-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  transition: all var(--transition-base);
}

.icon-result-cell svg {
  width: 80px;
  height: 80px;
}

.icon-cell-light {
  background: var(--color-off-white);
  border: 1px solid var(--color-border);
}

.icon-cell-dark {
  background: var(--color-charcoal);
  border: 1px solid var(--color-charcoal);
}

.icon-result-cell:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.icon-pair-download {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  justify-self: center;
  width: fit-content;
  margin: 0 auto;
}

.icon-pair-download:hover {
  background: var(--color-violet);
  border-color: var(--color-violet);
  color: #111110;
}

/* ═══════ Vectorize ═══════ */

.vec-result-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.vec-preview-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.vec-preview-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.vec-preview-col h4 {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.vec-preview-col img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.vec-svg-preview {
  width: 100%;
  aspect-ratio: auto;
  min-height: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  overflow: hidden;
}

.vec-svg-preview svg {
  max-width: 100%;
  max-height: 400px;
}

.vec-actions {
  display: flex;
  gap: var(--space-3);
}

@media (max-width: 640px) {
  .vec-preview-pair {
    grid-template-columns: 1fr;
  }
}

/* ═══════ Theme Switcher ═══════ */
.theme-switcher {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 200;
}

.theme-switcher .toggle-track {
  width: 88px;
  height: 46px;
  border-radius: 23px;
}

.theme-switcher .toggle-thumb {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  top: 5px;
  left: 5px;
}

.theme-switcher .toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(42px);
}

.theme-switcher .toggle-indicator svg {
  width: 20px;
  height: 20px;
}

.theme-switcher .toggle-indicator.on {
  left: 16px;
  color: rgba(0, 0, 0, 0.85);
}

.theme-switcher .toggle-indicator.off {
  right: 14px;
  color: rgba(0, 0, 0, 0.6);
}

/* ═══════ Footer ═══════ */
.site-footer {
  text-align: center;
  padding: var(--space-8) var(--space-4) var(--space-16);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.site-footer a {
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--color-text);
}

/* Utilities */
.hidden {
  display: none !important;
}
