@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  /* ECOM HOUSE Brand Colors */
  --bg: #080808;
  --surface: #111111;
  --surface2: #1a1a1a;
  --border: #2a2a2a;
  --text: #ffffff;
  --text-dim: #888888;
  --accent: #ff523f;
  --accent-hover: #ff6b5a;
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #ff523f;

  /* ECOM HOUSE Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-card: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 48px;
}

.logo {
  height: 32px;
  margin-bottom: 24px;
  opacity: 0.95;
}

header h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text);
}

header h1 span {
  color: var(--accent);
}

header p {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 400;
}

.trust-line {
  margin-top: 16px;
  padding: 10px 18px;
  display: inline-block;
  background: rgba(255, 82, 63, 0.06);
  border: 1px solid rgba(255, 82, 63, 0.2);
  border-radius: var(--radius-pill);
  font-size: 13px !important;
  color: var(--text-dim) !important;
}

.trust-line strong {
  color: var(--accent);
  font-weight: 700;
}

/* Input section */
.input-section {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.input-section input {
  flex: 1;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease-out;
}

.input-section input:focus {
  border-color: var(--accent);
}

.input-section input::placeholder {
  color: var(--text-dim);
}

.btn {
  padding: 14px 28px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease-out, transform 0.1s ease-out;
  white-space: nowrap;
}

.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Loading */
.loading {
  text-align: center;
  padding: 64px 0;
  display: none;
}

.loading.active { display: block; }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading p {
  color: var(--text-dim);
  font-size: 14px;
}

/* Error */
.error {
  background: rgba(255, 82, 63, 0.08);
  border: 1px solid rgba(255, 82, 63, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--accent);
  display: none;
  margin-bottom: 24px;
  font-size: 14px;
}

.error.active { display: block; }

/* Results */
#results { display: none; }
#results.active { display: block; }

/* Score hero */
.score-hero {
  text-align: center;
  padding: 48px 32px;
  background: var(--surface);
  border-radius: var(--radius-card);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 4px solid;
}

.score-circle.excellent { border-color: var(--green); }
.score-circle.good { border-color: #60a5fa; }
.score-circle.needs-improvement { border-color: var(--yellow); }
.score-circle.poor { border-color: var(--accent); }

.score-circle .number {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.024em;
  line-height: 1;
}

.score-circle.excellent .number { color: var(--green); }
.score-circle.good .number { color: #60a5fa; }
.score-circle.needs-improvement .number { color: var(--yellow); }
.score-circle.poor .number { color: var(--accent); }

.score-circle .max {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
}

.score-hero .rating {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.score-hero .page-title {
  color: var(--text-dim);
  font-size: 13px;
}

/* Score grid */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.grid-hint {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0 8px;
}

.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease-out, background 0.2s ease-out;
}

.score-card:hover {
  border-color: #444;
  background: var(--surface2);
}

.score-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.score-card-header .name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.score-card-header .badge {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
}

.badge.high { background: rgba(52, 211, 153, 0.12); color: var(--green); }
.badge.mid { background: rgba(251, 191, 36, 0.12); color: var(--yellow); }
.badge.low { background: rgba(255, 82, 63, 0.12); color: var(--accent); }

.score-bar {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease-out;
}

.score-bar-fill.high { background: var(--green); }
.score-bar-fill.mid { background: var(--yellow); }
.score-bar-fill.low { background: var(--accent); }

.score-card .detail { display: none; }
.score-card.expanded .detail { display: block; }

.detail-list {
  list-style: none;
  font-size: 13px;
  margin-top: 10px;
}

.detail-list li {
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.detail-list li::before { flex-shrink: 0; }

.found-item::before {
  content: '\2713';
  color: var(--green);
  font-weight: bold;
}

.missing-item::before {
  content: '\2717';
  color: var(--accent);
  font-weight: bold;
}

.recommendation {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 82, 63, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: #ff8a7a;
  line-height: 1.5;
}

/* Quick wins */
.quick-wins {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  margin-bottom: 32px;
}

.quick-wins h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.quick-win {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
}

.quick-win:last-child { border-bottom: none; }

.quick-win .number-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.quick-win .content .section-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.quick-win .content .rec-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Rating scale */
.rating-scale {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
}

.rating-scale h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--text-dim);
}

.scale-items {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.scale-item {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.scale-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.scale-dot.s-excellent { background: var(--green); }
.scale-dot.s-good { background: #60a5fa; }
.scale-dot.s-needs { background: var(--yellow); }
.scale-dot.s-poor { background: var(--accent); }

/* Video CTA */
.video-cta {
  display: none;
  margin: 32px 0;
}

.video-cta.active { display: block; }

.video-cta-inner {
  text-align: center;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-image: linear-gradient(135deg, rgba(255,82,63,0.06) 0%, transparent 60%);
}

.video-cta-inner h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.video-cta-inner p {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.btn-cta {
  display: inline-block;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
}

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

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 640px;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface2);
}

.modal-step h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.modal-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease-out;
}

.form-group input:focus {
  border-color: var(--accent);
}

.form-group input::placeholder {
  color: #555;
}

.btn-modal {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
}

/* OTP Inputs */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.otp-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease-out;
}

.otp-digit:focus {
  border-color: var(--accent);
}

.otp-error {
  color: var(--accent);
  font-size: 13px;
  text-align: center;
  margin-bottom: 12px;
  min-height: 18px;
}

/* Video Container */
.video-container {
  margin-top: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface2);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  color: var(--text-dim);
  font-size: 14px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}

.footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 600px) {
  .input-section { flex-direction: column; }
  .score-grid { grid-template-columns: 1fr; }
  header h1 { font-size: 24px; }
  .scale-items { flex-direction: column; gap: 8px; }
  .logo { height: 24px; }
  .modal-card { padding: 24px; }
  .otp-digit { width: 40px; height: 48px; font-size: 20px; }
  .otp-inputs { gap: 6px; }
  .video-cta-inner {
    padding: 32px 20px;
  }
  .video-cta-inner h2 { font-size: 20px; }
  .video-cta-inner p { font-size: 14px; }
  .btn-cta {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }
  .trust-line {
    display: block;
    font-size: 12px !important;
    padding: 10px 14px;
    line-height: 1.5;
  }
}
