:root {
  color-scheme: light;
  --ink: #f8fbff;
  --dark: #070b22;
  --navy: #101641;
  --muted: #9aa8d6;
  --line: rgba(255, 255, 255, 0.16);
  --paper: #0b1032;
  --panel: rgba(255, 255, 255, 0.1);
  --coral: #ef626c;
  --teal: #00a6a6;
  --gold: #f2b705;
  --leaf: #53a548;
  --violet: #7b61ff;
  --pink: #ff4fb8;
  --cyan: #16d9ff;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% 9%, rgba(255, 79, 184, 0.28), transparent 28rem),
    radial-gradient(circle at 18% 22%, rgba(22, 217, 255, 0.22), transparent 24rem),
    linear-gradient(135deg, #070b22 0%, #111744 48%, #140a2d 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(8, 12, 34, 0.72);
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.92), transparent 9%),
    conic-gradient(from 180deg, #ff4fb8, #f2b705, #16d9ff, #7b61ff, #ff4fb8);
  color: #fff;
  font-size: 1.7rem;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  box-shadow: 0 18px 38px rgba(123, 97, 255, 0.28);
}

.brand p,
.brand h1 {
  margin: 0;
}

.brand p {
  color: #74efff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand h1 {
  font-size: 1.6rem;
  line-height: 1.1;
}

.meter-block {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.meter-copy {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.meter-copy span,
.eyebrow {
  color: #74efff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.meter-fill {
  width: 72%;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--gold), var(--cyan));
  box-shadow: 0 0 22px rgba(22, 217, 255, 0.45);
}

.quiz-tabs {
  display: grid;
  gap: 10px;
}

.tab-button {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.tab-button:hover,
.tab-button.active {
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.tab-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    0 10px 24px rgba(38, 44, 61, 0.14);
}

.logo-mark {
  isolation: isolate;
}

.logo-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(circle at 78% 82%, rgba(29, 35, 48, 0.22), transparent 42%);
  z-index: -1;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.tab-button strong,
.tab-button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-button span {
  color: #aab7ec;
  font-size: 0.82rem;
  margin-top: 2px;
}

main {
  min-width: 0;
  padding: 28px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 42px;
  margin-bottom: 26px;
  background:
    linear-gradient(90deg, rgba(6, 9, 27, 0.96) 0%, rgba(8, 11, 32, 0.76) 38%, rgba(8, 11, 32, 0.12) 76%),
    url("assets/hero/quizzo-hero.png");
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.38);
}

.hero h2 {
  max-width: 700px;
  margin: 8px 0 0;
  font-size: clamp(2.6rem, 6vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #ffe18a;
  margin: 0;
}

.hero-copy {
  max-width: 720px;
}

.hero-subtitle {
  max-width: 560px;
  margin: 18px 0 0;
  color: #c9d5ff;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.55;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-badges span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 9px 12px;
  backdrop-filter: blur(10px);
}

.ghost-button,
.primary-button,
.answer-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.ghost-button {
  flex: 0 0 auto;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  padding: 14px 18px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.workspace {
  display: block;
  align-items: start;
}

.quiz-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(8, 12, 34, 0.72);
  box-shadow: var(--shadow);
  min-height: 560px;
  padding: 30px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(18px);
}

.quiz-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.quiz-head h3 {
  margin: 5px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1;
  color: #fff;
}

.counter {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 9px 12px;
}

.progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-bottom: 30px;
}

#progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--gold));
  box-shadow: 0 0 24px rgba(255, 79, 184, 0.45);
  transition: width 180ms ease;
}

.question {
  display: grid;
  gap: 20px;
}

.question h4 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.3rem);
  line-height: 1.08;
  color: #fff;
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.answer-button {
  min-height: 98px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 17px;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.answer-button:hover {
  border-color: rgba(116, 239, 255, 0.65);
  box-shadow: 0 18px 40px rgba(22, 217, 255, 0.16);
  transform: translateY(-2px);
}

.answer-button span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 6px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.tag {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 10px;
}

.primary-button {
  width: 100%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
  padding: 14px 16px;
  box-shadow: 0 18px 42px rgba(255, 79, 184, 0.28);
}

.quiz-panel.is-result .quiz-head,
.quiz-panel.is-result .progress {
  display: none;
}

.result-reveal {
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.result-orbit {
  display: grid;
  place-items: center;
  min-height: 360px;
  position: relative;
}

.result-orbit::before {
  content: "";
  position: absolute;
  width: min(88%, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 54%),
    conic-gradient(from 30deg, rgba(255, 79, 184, 0.8), rgba(22, 217, 255, 0.8), rgba(242, 183, 5, 0.8), rgba(255, 79, 184, 0.8));
  filter: blur(2px);
  opacity: 0.92;
}

.result-logo {
  width: min(74%, 310px);
  aspect-ratio: 1;
  border-radius: 30px;
  object-fit: cover;
  position: relative;
  z-index: 1;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.38),
    0 0 48px rgba(116, 239, 255, 0.22);
  transform: rotate(-3deg);
}

.result-emoji {
  position: absolute;
  right: 14%;
  bottom: 11%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.65)),
    var(--result-bg, linear-gradient(135deg, var(--pink), var(--cyan)));
  color: #111744;
  font-size: 3rem;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.3);
}

.result-copy {
  position: relative;
  z-index: 1;
}

.result-copy h4 {
  margin: 8px 0 14px;
  color: #fff;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.9;
}

.result-copy p {
  max-width: 720px;
  color: #d9e2ff;
  font-size: clamp(1rem, 2vw, 1.24rem);
  font-weight: 700;
  line-height: 1.65;
  margin: 0;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.result-actions .primary-button,
.result-actions .ghost-button {
  width: auto;
  min-width: 150px;
  text-align: center;
}

.result-actions .ghost-button {
  color: #fff;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .quiz-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-reveal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .shell {
    grid-template-columns: 292px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px;
  }

  .brand {
    gap: 12px;
    margin-bottom: 18px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 1.45rem;
  }

  .brand h1 {
    font-size: 1.42rem;
  }

  .meter-block {
    padding: 14px;
    margin-bottom: 14px;
  }

  .tab-button {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 8px;
  }

  .tab-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .logo-mark img {
    border-radius: 12px;
  }

  main {
    padding: 22px;
  }

  .hero {
    min-height: 310px;
    padding: 32px;
    background-position: 58% center;
  }

  .hero h2 {
    max-width: 560px;
    font-size: clamp(2.55rem, 5vw, 4.6rem);
  }

  .quiz-panel {
    min-height: 520px;
    padding: 26px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 16px 10px;
    overflow: visible;
  }

  .brand {
    margin-bottom: 10px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.38rem;
  }

  .brand p {
    font-size: 0.68rem;
  }

  .brand h1 {
    font-size: 1.35rem;
  }

  .meter-block {
    display: none;
  }

  .quiz-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
    gap: 9px;
    width: 100%;
    max-width: 100%;
    padding: 0 0 5px;
    overflow: visible;
  }

  .tab-button {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 7px;
    border-radius: 18px;
  }

  .tab-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .tab-button > span:not(.tab-icon) {
    display: none;
  }

  .tab-button.active {
    border-color: rgba(116, 239, 255, 0.55);
    box-shadow:
      0 0 0 1px rgba(116, 239, 255, 0.18),
      0 14px 30px rgba(0, 0, 0, 0.26);
  }

  main {
    padding: 14px;
  }

  .hero {
    min-height: 270px;
    padding: 22px;
    align-items: end;
    border-radius: 20px;
    margin-bottom: 14px;
    background:
      linear-gradient(90deg, rgba(6, 9, 27, 0.98) 0%, rgba(8, 11, 32, 0.82) 55%, rgba(8, 11, 32, 0.18) 100%),
      url("assets/hero/quizzo-hero.png");
    background-size: cover;
    background-position: 68% center;
  }

  .hero h2 {
    max-width: 460px;
    font-size: clamp(2.15rem, 7vw, 3.65rem);
  }

  .hero-subtitle {
    max-width: 420px;
    margin-top: 10px;
    font-size: 0.96rem;
  }

  .quiz-panel {
    min-height: auto;
  }

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

  .answer-button {
    min-height: 82px;
  }
}

@media (max-width: 660px) {
  main,
  .sidebar {
    padding: 14px;
  }

  main {
    padding-top: 14px;
  }

  .hero {
    display: grid;
    min-height: 235px;
    padding: 18px;
    align-content: space-between;
    background:
      linear-gradient(90deg, rgba(6, 9, 27, 0.98) 0%, rgba(8, 11, 32, 0.88) 64%, rgba(8, 11, 32, 0.22) 100%),
      url("assets/hero/quizzo-hero.png");
    background-position: 70% center;
    border-radius: 18px;
    margin-bottom: 16px;
  }

  .hero h2 {
    max-width: 310px;
    font-size: clamp(1.85rem, 9.5vw, 3rem);
    line-height: 0.98;
  }

  .hero-subtitle {
    display: none;
  }

  .hero-badges {
    display: none;
  }

  .hero-badges span {
    font-size: 0.76rem;
    padding: 8px 10px;
  }

  .ghost-button {
    width: auto;
    justify-self: start;
    padding: 11px 13px;
    text-align: center;
  }

  .quiz-tabs {
    margin: 0;
    padding-inline: 0;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  }

  .tab-button {
    padding: 6px;
  }

  .tab-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .quiz-head {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
  }

  .quiz-head h3 {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .counter {
    justify-self: start;
    font-size: 0.8rem;
  }

  .progress {
    margin-bottom: 22px;
  }

  .question {
    gap: 16px;
  }

  .question h4 {
    font-size: clamp(1.38rem, 8vw, 2rem);
  }

  .quiz-panel {
    min-height: auto;
    padding: 18px;
    border-radius: 18px;
  }

  .answer-button {
    min-height: 72px;
    padding: 15px;
    border-radius: 12px;
  }

  .result-orbit {
    min-height: 250px;
  }

  .result-reveal {
    gap: 8px;
    min-height: auto;
  }

  .result-logo {
    width: min(74%, 240px);
    border-radius: 24px;
  }

  .result-emoji {
    right: 12%;
    bottom: 8%;
    width: 74px;
    height: 74px;
    border-radius: 20px;
    font-size: 2.35rem;
  }

  .result-copy h4 {
    font-size: clamp(2.25rem, 13vw, 3.8rem);
  }

  .result-copy p {
    font-size: 0.98rem;
  }

  .tag {
    font-size: 0.72rem;
    padding: 7px 9px;
  }

  .result-actions .primary-button,
  .result-actions .ghost-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 1.18rem;
  }

  .brand h1 {
    font-size: 1.18rem;
  }

  .hero {
    min-height: 220px;
    padding: 16px;
    background-position: 73% center;
  }

  .hero h2 {
    max-width: 280px;
    font-size: clamp(1.7rem, 10vw, 2.7rem);
  }

  .tab-button {
    padding: 5px;
  }

  .quiz-panel {
    padding: 17px;
  }
}
