:root {
  /* ===== SAME DESIGN SYSTEM AS THE PREVIOUS ENDPOINTS ===== */
  --purple: #4f0f9f;
  --purple-dark: #32105f;
  --purple-link: #4a1f9c;
  --purple-light: #6d2acb;
  --ink: #23154d;
  --text: #27213d;
  --page-bg: #f7f7f7;
  --panel-bg: #f3d9dc;
  --results-bg: #dce8f5;
  --white: #ffffff;
  --footer-purple: #480094;
  --green: #15883f;

  --font-family: Arial, Helvetica, sans-serif;
  --page-max-width: 1170px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text);
  background: var(--page-bg);
}

.demo-banner {
  background: #181818;
  color: #fff;
  text-align: center;
  font-size: 12px;
  padding: 6px 12px;
}
.logout-loading{
  position:fixed;
  inset:0;
  background:rgba(35, 10, 70, 0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  z-index:9999;
  transition:opacity .2s ease;
}

.logout-loading.show{
  opacity:1;
  visibility:visible;
  pointer-events:all;
}

.logout-loading-box{
  width:360px;
  background:#fff;
  border-radius:12px;
  padding:30px 32px;
  text-align:center;
  box-shadow:0 12px 40px rgba(0,0,0,.25);
}

.loading-bar{
  width:100%;
  height:8px;
  background:#e5d9f2;
  border-radius:20px;
  overflow:hidden;
  margin-bottom:18px;
}

.loading-progress{
  width:0;
  height:100%;
  background:#5b00c8;
  border-radius:20px;
  animation:logoutProgress 3s linear forwards;
}

.loading-text{
  color:#35105f;
  font-size:18px;
  font-weight:700;
}

@keyframes logoutProgress{
  from{
    width:0%;
  }
  to{
    width:100%;
  }
}

/* ================= HEADER ================= */

.topbar {
  height: 58px;
  background: #f8f8f8;
  border-bottom: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 54px;
  font-size: 18px;
  color: var(--ink);
}

.language {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

.language span {
  margin-left: 8px;
  font-size: 22px;
  font-weight: 700;
}

.hello strong { font-weight: 800; }

.main-nav {
  min-height: 124px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 32px;
  background:linear-gradient(90deg,#5a00c6,#6900d7 55%,#5d00c9);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  object-fit: contain;
}

.bc-logo { width: 126px; height: 58px; }
.ielts-logo { width: 120px; height: 58px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
  flex: 1;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links a.active {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.logout{min-width:141px;height:61px;padding:0 17px;border:0;border-radius:11px;display:flex;align-items:center;justify-content:center;gap:10px;background:linear-gradient(135deg,rgba(132,78,225,.88),rgba(111,57,207,.78));box-shadow:0 5px 13px rgba(23,0,65,.25);color:#fff;font-size:21px;font-weight:700;cursor:pointer}
.logout-icon{width:32px;height:32px;display:inline-flex}.logout-icon svg{width:100%;height:100%}


/* ================= PAGE ================= */

.results-page {
  width: min(var(--page-max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.test-summary {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 0 0 26px;
  border-bottom: 2px solid #d9d9df;
}

.test-summary h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 31px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: .2px;
}

.candidate-name,
.test-location,
.reference-box p {
  margin: 0;
  line-height: 1.45;
}

.candidate-name {
  font-size: 22px;
  font-weight: 500;
}

.test-location {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
}

.reference-box {
  min-width: 360px;
  align-self: center;
  font-size: 15px;
  color: #514d62;
}

.reference-box p + p { margin-top: 4px; }

/* ================= TABS ================= */

.test-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  margin-top: 30px;
}

.test-tabs a {
  min-height: 92px;
  padding: 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #36546f;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  border-top: 3px solid transparent;
}

.test-tabs a.active {
  background: var(--results-bg);
  color: var(--ink);
  border-top-color: #3374a3;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ================= RESULTS PANEL ================= */

.results-panel {
  background: var(--results-bg);
  padding: 58px min(13%, 150px) 64px;
}

/* ================= OVERALL SCORE ================= */

.overall-heading {
  display: grid;
  grid-template-columns: 1fr 210px 1fr;
  align-items: center;
  gap: 40px;
}

.overall-label {
  text-align: center;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #4b5360;
}

.band-score {
  width: 142px;
  height: 142px;
  margin: 0 auto;
  border: 10px solid var(--green);
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 48px;
  font-weight: 900;
}

.full-scores-link {
  justify-self: start;
  color: #28577d;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 800;
}

.score-message {
  position: relative;
  width: min(610px, 100%);
  margin: 30px auto 0;
  padding: 30px 34px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(35, 21, 77, .22);
}

.score-message::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  width: 44px;
  height: 44px;
  background: var(--white);
  transform: translateX(-50%) rotate(45deg);
  z-index: 0;
}

.score-message > * { position: relative; z-index: 1; }

.score-message h2,
.full-score-section h2,
.scores-explained > h2,
.action-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
}

.score-message p {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
}

/* ================= DIVIDERS ================= */

.dotted-divider {
  border-top: 5px dotted rgba(35, 21, 77, .48);
  margin: 34px 0;
}

/* ================= FULL SCORE ================= */

.full-score-section h2,
.scores-explained > h2 {
  margin-bottom: 24px;
}

.score-list {
  display: grid;
  gap: 10px;
}

.score-row,
.skill-title {
  width: 100%;
  min-height: 58px;
  padding: 12px 20px;
  border: 1px solid rgba(35, 21, 77, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 7px rgba(35, 21, 77, .12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
}

button.score-row {
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

button.score-row:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(35, 21, 77, .18);
}

.score-name,
.skill-title > span {
  display: flex;
  align-items: center;
  gap: 15px;
}

.score-icon{
  width:28px;
  height:28px;
  object-fit:contain;
  display:inline-block;
  vertical-align:middle;
  margin-right:10px;
}

.overall-row { font-size: 18px; }

/* ================= EXPLANATIONS ================= */

.skill-block {
  margin-top: 28px;
  scroll-margin-top: 24px;
}

.skill-title {
  font-size: 18px;
}

.skill-block > p {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.48;
}

.improve-box {
  margin-top: 10px;
  padding-left: 14px;
  border-left: 5px solid #2d6f9d;
}

.improve-box h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.improve-box p {
  margin: 0;
  font-size: 16px;
  line-height: 1.48;
}

/* ================= ACTIONS ================= */

.action-section {
  display: grid;
  gap: 0;
}

.action-card {
  padding: 28px 30px;
  background: rgba(255,255,255,.94);
  border-radius: 15px;
  box-shadow: 0 3px 9px rgba(35, 21, 77, .2);
}

.action-card p {
  margin: 20px 0;
  font-size: 18px;
  line-height: 1.45;
}

.action-link {
  display: flex;
  align-items: center;
  gap: 20px;
  width: fit-content;
  margin-top: 14px;
  color: #28577d;
  font-size: 18px;
  font-weight: 800;
}

.action-icon {
  width: 40px;
  text-align: center;
  color: #111;
  font-size: 36px;
  line-height: 1;
}

.action-icon.graduation { font-size: 34px; }

.card-divider {
  margin: 34px 0;
}

.options-btn {
  width: min(260px, 100%);
  min-height: 58px;
  border: 3px solid #2d6f9d;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #28577d;
  text-decoration: none;
  font-size: 17px;
  font-weight: 900;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.options-btn:hover {
  background: #2d6f9d;
  color: #fff;
  transform: translateY(-1px);
}

/* ================= FOOTER ================= */

.site-footer {
  background: linear-gradient(90deg,#5a00c6,#6900d7 55%,#5d00c9);
  color: #fff;
  padding: 58px 0 54px;
}

.footer-inner {
  width: min(1650px, calc(100% - 110px));
  margin: 0 auto;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 58px;
  font-size: 18px;
  font-weight: 700;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
}

.footer-links span {
  width: 2px;
  height: 29px;
  background: rgba(255,255,255,.85);
}

.site-footer p {
  margin: 0 0 34px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
}

.footer-description { font-weight: 400 !important; }

/* ================= RESPONSIVE ================= */

@media (max-width: 1250px) {
  .main-nav { gap: 22px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 18px; }
  .brand { gap: 18px; }
  .bc-logo { width: 108px; }
  .ielts-logo { width: 104px; }

  .results-panel { padding-left: 10%; padding-right: 10%; }
}

@media (max-width: 900px) {
  .topbar { padding: 0 22px; }

  .main-nav {
    padding: 18px 22px;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .logout {
    margin-left: auto;
    min-width: 130px;
    min-height: 56px;
  }

  .results-page { width: min(100% - 28px, var(--page-max-width)); }

  .test-summary {
    flex-direction: column;
    gap: 18px;
  }

  .reference-box {
    min-width: 0;
    align-self: flex-start;
  }

  .test-tabs {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .results-panel {
    padding: 42px 34px;
  }

  .overall-heading {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .full-scores-link { justify-self: center; }

  .footer-inner { width: min(100% - 44px, 1650px); }
}

@media (max-width: 600px) {
  .demo-banner { font-size: 10px; }

  .topbar {
    height: 50px;
    padding: 0 14px;
    font-size: 15px;
  }

  .language { font-size: 15px; }

  .main-nav {
    padding: 14px;
    gap: 14px;
  }

  .brand { gap: 14px; }
  .bc-logo { width: 96px; height: 42px; }
  .ielts-logo { width: 82px; height: 42px; }

  .logout {
    min-width: 108px;
    min-height: 48px;
    font-size: 16px;
  }

  .results-page {
    width: 100%;
    padding: 28px 0 0;
  }

  .test-summary { padding: 0 16px 22px; }

  .test-summary h1 { font-size: 24px; }
  .candidate-name { font-size: 17px; }

  .test-tabs a {
    min-height: 70px;
    font-size: 15px;
  }

  .results-panel { padding: 34px 16px 42px; }

  .band-score {
    width: 118px;
    height: 118px;
    font-size: 40px;
  }

  .score-message { padding: 25px 20px; }

  .score-message h2,
  .full-score-section h2,
  .scores-explained > h2,
  .action-card h2 {
    font-size: 23px;
  }

  .score-row,
  .skill-title {
    min-height: 54px;
    padding: 10px 14px;
  }

  .skill-block > p,
  .improve-box p { font-size: 15px; }

  .action-card { padding: 24px 20px; }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 38px;
  }

  .footer-links span { height: 22px; }
}

/* =========================================================
   RESULTS PAGE MOTION
   ========================================================= */
/* Smoothly interpolates the live percentage used by the score ring. */
@property --score-progress {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.band-score {
  --score-progress: 0%;
  position: relative;
  border: 0;
  background: conic-gradient(
    from -90deg,
    var(--green) 0%,
    var(--green) var(--score-progress),
    #dce6df var(--score-progress),
    #dce6df 100%
  );
  box-shadow: 0 8px 24px rgba(21, 136, 63, .16);
  transform: scale(.78) rotate(-8deg);
  opacity: 0;
  transition: opacity .55s ease, transform 1.1s cubic-bezier(.22,1,.36,1), box-shadow .8s ease, --score-progress 2.6s cubic-bezier(.22,1,.36,1);
}

.band-score::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(35,21,77,.05);
}

.band-score-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ink);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -.8px;
  opacity: .25;
  transform: translateY(5px);
  transition: opacity .5s ease, transform .65s cubic-bezier(.22,1,.36,1);
}

.band-score.score-ring-animate {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  box-shadow: 0 12px 32px rgba(21, 136, 63, .24), 0 0 0 8px rgba(21,136,63,.06);
}

.band-score.score-ring-animate .band-score-number {
  transform: translateY(0);
}

.band-score.score-ring-animate .band-score-number.score-number-ready {
  opacity: 1;
  visibility: visible;
}

.score-message-reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: scoreMessageIn .65s .35s cubic-bezier(.22,1,.36,1) forwards;
}

.score-value-animate {
  min-width: 38px;
  text-align: right;
  opacity: .35;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .45s cubic-bezier(.22,1,.36,1);
}

/* During score reveal, hide the number rather than showing a misleading 0. */
.score-number-loading {
  opacity: 0 !important;
  visibility: hidden;
}

.score-number-ready {
  opacity: 1;
  transform: translateY(0);
}

.score-row-reveal {
  opacity: 0;
  transform: translateX(-18px);
  animation: scoreRowIn .75s var(--row-delay) cubic-bezier(.22,1,.36,1) forwards;
}

.score-row-reveal:hover {
  transform: translateY(-1px);
}

.skill-block {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s var(--skill-delay) ease, transform .65s var(--skill-delay) cubic-bezier(.22,1,.36,1);
}

.skill-block.skill-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scoreMessageIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scoreRowIn {
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .band-score,
  .band-score-number,
  .score-message-reveal,
  .score-value-animate,
  .score-row-reveal,
  .skill-block {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .score-number-loading {
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media (max-width: 600px) {
  .band-score-number { font-size: 40px; }
  .band-score::after { inset: 9px; }
}
