:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-border: #dbe4f0;
  --text: #172033;
  --muted: #68758a;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #15803d;
  --warning: #b45309;
  --error: #b91c1c;
  --shadow: 0 24px 70px rgba(30, 41, 59, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 30rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

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

.secondary,
.result-card button {
  color: var(--primary);
  background: #e8f0ff;
}

.app-shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.back-home {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.back-home:hover {
  color: var(--primary-dark);
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.eyebrow {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0.35rem 0;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 1;
}

h2,
h3,
p {
  margin-top: 0;
}

.subtitle {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.1rem;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 4vw, 2rem);
  backdrop-filter: blur(14px);
}

.panel + .panel {
  margin-top: 1.5rem;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-heading p,
.files-box h3,
.files-box p {
  color: var(--muted);
}

.quality-control {
  min-width: min(260px, 100%);
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
}

.quality-control input {
  width: 100%;
  accent-color: var(--primary);
}

.drop-zone {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 240px;
  border: 2px dashed #9bb6e7;
  border-radius: 24px;
  background: #f8fbff;
  padding: 2rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

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

.drop-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  margin-bottom: 0.75rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-size: 2.3rem;
}

.drop-zone p {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.drop-zone small,
.file-list small,
.result-card p {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.status {
  min-height: 1.5rem;
  margin: 1rem 0;
  font-weight: 700;
}

.status[data-type='success'] {
  color: var(--success);
}

.status[data-type='warning'] {
  color: var(--warning);
}

.status[data-type='error'] {
  color: var(--error);
}

.status[data-type='info'] {
  color: var(--primary);
}

.files-box {
  margin-top: 1rem;
  border-top: 1px solid var(--panel-border);
  padding-top: 1rem;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.file-list li,
.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 0.85rem;
  background: #fff;
}

.file-list strong,
.file-list small {
  display: block;
}

.empty {
  color: var(--muted);
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.result-card {
  align-items: stretch;
}

.result-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  background: #edf2f7;
}

.result-card h3 {
  word-break: break-all;
  margin-bottom: 0.25rem;
}

.result-card p {
  margin-bottom: 0.8rem;
}

.site-footer {
  padding: 2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

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

@media (max-width: 720px) {
  .panel-heading,
  .result-card {
    flex-direction: column;
  }

  .result-card img {
    width: 100%;
    height: 180px;
  }
}
