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

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #635bff;
  --primary-dark: #5148e5;
  --soft: #f0efff;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 50px rgba(31, 41, 55, 0.08);
}

body {
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(99, 91, 255, 0.10), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(250, 204, 21, 0.10), transparent 25%),
    var(--bg);
  color: var(--text);
}

.page {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 55px 0 30px;
}

/* HEADER */

.header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 42px;
}

.eyebrow {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.header h1 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -2.5px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, #5148e5, #7c3aed, #eab308);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

/* MAIN */

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

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  padding: 25px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* UPLOAD AREA */

.upload-panel {
  display: flex;
  flex-direction: column;
}

.dropzone {
  min-height: 420px;
  border: 2px dashed #d4d6e5;
  border-radius: 20px;
  background: linear-gradient(145deg, #fafaff, #f7f7fc);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--primary);
  background: var(--soft);
  transform: translateY(-2px);
}

.dropzone-empty {
  text-align: center;
  padding: 30px;
}

.dropzone-icon {
  color: var(--primary);
  margin-bottom: 18px;
}

.dropzone-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.dropzone-link {
  color: var(--primary);
  font-weight: 700;
}

.dropzone-hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 9px;
}

.preview {
  width: 100%;
  height: 420px;
  object-fit: contain;
  padding: 15px;
  background: #fafafa;
}

/* BUTTON */

.reset-btn {
  width: 100%;
  margin-top: 16px;
  padding: 13px 18px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.reset-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* STATUS */

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 32px;
}

.status.ready {
  background: #f0fdf4;
  color: var(--success);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9ca3af;
}

.status.ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

/* RESULTS */

.results-label {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.top-class {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text);
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bar-row-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 9px;
}

.bar-row-top span:last-child {
  color: var(--primary);
}

.bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #edf0f5;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.7s cubic-bezier(.2,.8,.2,1);
}

/* Different result bars */

.bar-fill.c0 {
  background: linear-gradient(90deg, #635bff, #8b5cf6);
}

.bar-fill.c1 {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

.bar-fill.c2 {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.bar-fill.c3 {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.bar-fill.c4 {
  background: linear-gradient(90deg, #ec4899, #f472b6);
}

/* EMPTY STATE */

.empty-state {
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}

.empty-state p {
  max-width: 280px;
  color: #9ca3af;
  line-height: 1.7;
  font-size: 14px;
}

/* ERROR */

.error-box {
  margin-top: 20px;
  padding: 15px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.6;
}

/* FOOTER */

.footer {
  text-align: center;
  margin-top: 30px;
  color: #9ca3af;
  font-size: 12px;
}

/* MOBILE */

@media (max-width: 760px) {
  .page {
    padding: 35px 0 25px;
  }

  .header {
    margin-bottom: 28px;
  }

  .header h1 {
    font-size: 42px;
    letter-spacing: -1.8px;
  }

  .subtitle {
    font-size: 14px;
  }

  .board {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .dropzone,
  .preview {
    min-height: 330px;
    height: 330px;
  }

  .top-class {
    font-size: 28px;
  }
}
