:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-border: #e4e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #ff6b2c;
  --primary-dark: #e85b20;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #fff8f4 0%, var(--bg) 240px);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.02;
}

.hero-copy {
  max-width: 700px;
  line-height: 1.7;
  color: var(--muted);
  font-size: 1rem;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.grid-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}

.drop-zone {
  border: 2px dashed #ffc7b0;
  border-radius: var(--radius-md);
  padding: 42px 20px;
  text-align: center;
  background: #fffaf7;
  cursor: pointer;
  transition: 0.2s ease;
}

.drop-zone.drag-active,
.drop-zone:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  background: #fff4ed;
}

.drop-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.drop-zone h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.drop-zone p,
.panel-title-row p,
.file-meta,
#status-text,
.empty-state,
.footer-note {
  color: var(--muted);
}

.settings-card,
.compare-card {
  margin-top: 20px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 18px;
  background: #fcfdff;
}

.settings-header,
.panel-title-row,
.action-row,
.progress-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

input[type='range'] {
  width: 100%;
}

input[type='number'],
select {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}

.action-row {
  margin-top: 20px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
}

.primary-btn {
  background: var(--primary);
  color: white;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  background: #eff3f9;
  color: var(--text);
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--panel-border);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.progress-box {
  margin-top: 18px;
}

.progress-track {
  position: relative;
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff9b66 0%, var(--primary) 100%);
  transition: width 0.2s ease;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #edf1f6;
}

th {
  font-size: 0.92rem;
  color: var(--muted);
}

.file-name {
  font-weight: 600;
}

.compare-card.hidden,
.empty-state.hidden {
  display: none;
}

.compare-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #e5e7eb;
  min-height: 320px;
}

.compare-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.compare-overlay {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid rgba(255, 255, 255, 0.9);
}

.compare-compressed {
  height: 100%;
  object-fit: cover;
}

.compare-handle {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 3px;
  background: rgba(255, 255, 255, 0.95);
  cursor: ew-resize;
  box-shadow: 0 0 10px rgba(15, 23, 42, 0.2);
}

.handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.footer-note {
  margin-top: 20px;
  text-align: center;
}

@media (max-width: 960px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }
}
