/* ============================================================
   Public result page — lightweight, mobile-first
   E Learning and Earning Ltd.
   ============================================================ */

:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e2e8f0;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-ink: #ffffff;
  --primary-soft: rgba(29, 78, 216, 0.08);
  --primary-line: rgba(29, 78, 216, 0.25);
  --primary-ring: rgba(29, 78, 216, 0.4);
  --focus-ring: rgba(29, 78, 216, 0.15);
  --tint: #dbeafe;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --merit: #047857;
  --merit-bg: #d1fae5;
  --waiting: #b45309;
  --waiting-bg: #fef3c7;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 50% -100px, var(--tint) 0%, transparent 70%),
    var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

/* ---------- language switch ---------- */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.lang-btn {
  padding: 6px 16px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-btn:hover {
  color: var(--primary);
}

.lang-btn.active {
  background: var(--primary);
  color: var(--primary-ink);
}

.lang-btn:focus-visible {
  outline: 3px solid var(--primary-ring);
  outline-offset: 2px;
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero-org {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #94a3b8;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.field .optional {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  border-radius: 8px;
}

.form-error[hidden] {
  display: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    opacity 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--primary-ring);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.1)),
    var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 6px 16px var(--primary-shadow, rgba(29, 78, 216, 0.35)),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.12)),
    var(--primary-hover);
  box-shadow: 0 9px 22px var(--primary-shadow, rgba(29, 78, 216, 0.4)),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px var(--primary-shadow, rgba(29, 78, 216, 0.3)),
    inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--primary-soft);
  border-color: var(--primary-line);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- result ---------- */
.result-card {
  border-color: #a7f3d0;
  animation: card-in 0.25s ease;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.congrats {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid transparent;
  animation: card-in 0.3s ease;
}

.congrats[hidden] {
  display: none;
}

.congrats-merit {
  color: var(--merit);
  background: var(--merit-bg);
  border-color: #6ee7b7;
}

.congrats-waiting {
  color: var(--waiting);
  background: var(--waiting-bg);
  border-color: #fcd34d;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.result-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--merit);
}

.result-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--merit-bg);
  color: var(--merit);
  font-weight: 800;
}

.result-list {
  margin: 0 0 20px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row dt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.result-row dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.badge-merit {
  background: var(--merit-bg);
  color: var(--merit);
}

.badge-waiting {
  background: var(--waiting-bg);
  color: var(--waiting);
}

/* ---------- footer ---------- */
.footer {
  margin-top: 28px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.footer p {
  margin: 0;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-links[hidden] {
  display: none;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.contact-links a:focus-visible {
  outline: 3px solid var(--primary-ring);
  outline-offset: 3px;
}

.contact-links .contact-kind {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}

.contact-links .contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: inherit;
}

.contact-links .contact-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media (max-width: 420px) {
  .card {
    padding: 20px 16px;
  }

  .result-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .result-row dd {
    text-align: left;
  }
}
