* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fb, #e8ecf5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 24px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #1a1a2e;
}

.subtitle {
  margin: 0 0 24px;
  color: #666;
  font-size: 14px;
}

.upload-area {
  border: 2px dashed #c9d0e0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.upload-area:hover {
  border-color: #6c63ff;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #444;
  font-size: 14px;
  padding: 24px 8px;
}

.upload-icon {
  font-size: 32px;
}

#preview {
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  margin-top: 8px;
}

button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: #6c63ff;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

button:disabled {
  background: #b6b1f0;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  background: #574fd6;
}

.status {
  margin-top: 12px;
  font-size: 14px;
  color: #888;
  min-height: 18px;
}

.results {
  margin-top: 24px;
  text-align: left;
}

.results h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #1a1a2e;
}

.result-row {
  margin-bottom: 12px;
}

.result-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
  color: #333;
}

.result-label-row.top {
  font-weight: 700;
  color: #6c63ff;
}

.bar-bg {
  background: #eef0f8;
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #6c63ff;
  border-radius: 6px;
  transition: width 0.4s ease;
}

