@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@200..900&display=swap');

:root {
  --f: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --fc: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --navy: #0f1a2e;
  --navy2: #162038;
  --gold: #f5a623;
  --gold2: #ffc947;
  --text: #e8eaf0;
  --muted: #8090b0;
  --border-gold: rgba(245, 166, 35, 0.2);
  --border-gold-bright: rgba(245, 166, 35, 0.35);
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(245, 166, 35, 0.08);
  --shadow-btn: 0 4px 20px rgba(245, 166, 35, 0.35);
}

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

html {
  font-size: 62.5%;
  width: 100%;
  height: 100%;
}

body {
  overflow-x: hidden;
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  min-width: 320px;
  min-height: 100%;
  background: var(--navy);
  z-index: 0;
}

.main,
body,
html {
  width: 100%;
  min-height: 100%;
}

.main {
  position: relative;
  z-index: 1;
}

h1,
h6 {
  text-transform: uppercase;
}

.btn--round,
h1,
h6,
p {
  text-align: center;
}

h1 {
  font-size: 3.5rem;
  color: var(--text);
}

h6 {
  font-size: 1.6rem;
  color: var(--text);
}

p {
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

/* Header */
.header {
  background-color: var(--navy);
  border-bottom: 3px solid var(--gold);
  padding: 14px 20px;
  position: relative;
  margin-bottom: 16px;
  width: 100%;
  color: var(--text);
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: auto;
  text-align: center;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header__text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
}

.header__text:first-child {
  font-family: var(--fc);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

[dir=rtl] .header__text {
  direction: rtl;
}

.header__date {
  font-weight: 800;
  color: var(--gold2);
  white-space: nowrap;
}

[dir=rtl] .header__date {
  direction: rtl;
}

@media (min-width: 768px) {
  .header__text {
    font-size: 14px;
  }

  .header__text:first-child {
    font-size: 1.6rem;
  }
}

/* Survey */
.survey {
  padding: 0 16px;
  max-width: 620px;
  margin: 16px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.survey__date {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[dir=rtl] .survey__date {
  text-align: center;
}

.survey__title {
  text-align: center;
  font-family: var(--fc);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
}

[dir=rtl] .survey__title {
  text-align: center;
}

.survey__text {
  text-align: center;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

[dir=rtl] .survey__text {
  text-align: center;
}

.logo {
  font-size: 12px;
  padding: 4px 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  max-width: -moz-max-content;
  max-width: -webkit-max-content;
  max-width: max-content;
}

.survey-container {
  margin-top: 18px;
  width: 100%;
  height: 100%;
  position: relative;
}

.step {
  width: 100%;
  height: 100%;
  position: relative;
  color: var(--text);
  background: var(--navy2);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 24px 22px 26px;
}

.step.step__final {
  background-color: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.step__body {
  margin-bottom: 20px;
}

.step__question {
  font-family: var(--fc);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
}

.step__answers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: stretch;
}

.btn {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding: 14px 20px;
  font-family: var(--fc);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s, box-shadow 0.15s, -webkit-filter 0.15s;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s, -webkit-filter 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  line-height: 1.2;
}

.btn:hover:not(:disabled) {
  -webkit-filter: brightness(1.1);
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:focus {
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.4), var(--shadow-btn);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn:nth-child(odd):last-child {
  grid-column: span 2;
}

.btn__continue {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  font-family: var(--fc);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background-color: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  height: 100%;
  text-decoration: none;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s, -webkit-filter 0.15s;
  transition: filter 0.15s, transform 0.15s;
  transition: filter 0.15s, transform 0.15s, -webkit-filter 0.15s;
}

.btn__continue:hover {
  -webkit-filter: brightness(1.1);
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn__continue:active {
  transform: scale(0.97);
}

.btn__continue:nth-child(odd):last-child {
  grid-column: span 2;
}

/* Comments */
.comments {
  margin: 32px auto 0;
  padding: 0 16px;
  max-width: 620px;
}

.comments__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 16px;
  color: var(--text);
}

.comments__count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fc);
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid var(--border-gold-bright);
  color: var(--gold);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--fc);
}

.comments__sort {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}

.comment__card {
  width: 100%;
  background-color: var(--navy2);
  border: 1px solid rgba(245, 166, 35, 0.15);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  font-size: 14px;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.comment__header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  margin-right: 12px;
  -o-object-fit: cover;
  object-fit: cover;
  border: 2px solid var(--border-gold-bright);
  background-color: var(--navy);
}

[dir=rtl] .avatar {
  margin-right: 0;
  margin-left: 12px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.username {
  font-family: var(--fc);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.3;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.time__ago {
  font-size: 12px;
  position: absolute;
  right: 18px;
  top: 16px;
  color: var(--muted);
}

[dir=rtl] .time__ago {
  right: auto;
  left: 18px;
}

.comment__text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  margin-top: 4px;
}

.comment__footer {
  margin-left: 54px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

[dir=rtl] .comment__footer {
  margin-left: 0;
  margin-right: 54px;
}

.like__count {
  cursor: pointer;
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
}

.reply {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  transition: color 0.15s;
}

.reply:hover {
  color: var(--gold);
}

.separator {
  margin: 0 8px;
  color: var(--muted);
}

/* Footer */
.footer {
  margin-top: 36px;
  padding-bottom: 24px;
}

.footer__content__wrapper {
  width: 100%;
}

.footer__links {
  border-top: 1px solid rgba(245, 166, 35, 0.15);
  margin-top: 24px;
  padding: 16px;
  display: flex;
  justify-content: center;
}

.footer__link {
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  margin-right: 16px;
  cursor: pointer;
  transition: color 0.15s;
}

.footer__link:hover {
  color: var(--gold);
}

.footer__links__list {
  padding: 8px 0 16px;
}

@media (min-width: 768px) {
  .footer__links__list {
    padding: 16px 0;
  }
}

.copyright {
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}

.disclaimer {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--muted);
  padding: 0 16px;
  text-align: center;
}

/* Modals */
.overlay,
#overlay {
  display: none;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(15, 26, 46, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 50;
}

.overlay.show,
#overlay.show,
body:has(.overlay.show) #overlay,
body:has(#modal-first.show, #modal-try.show, #modal-congrats.show) #overlay,
body:has(#modal-first[style*="display: flex"], #modal-try[style*="display: flex"], #modal-congrats[style*="display: flex"]) #overlay,
body:has(#modal-first[style*="display: block"], #modal-try[style*="display: block"], #modal-congrats[style*="display: block"]) #overlay {
  display: block;
}

.modal__close {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 0;
  background-color: transparent;
  border: none;
  font-size: 26px;
  font-weight: normal;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}

.modal__close:hover {
  color: var(--gold);
  transform: scale(1.1);
}

#modal-try,
#modal-first,
#modal-congrats {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 16px;
  pointer-events: none;
}

#modal-try.show,
#modal-first.show,
#modal-congrats.show {
  display: flex;
}

.modal {
  background: var(--navy2);
  border: 1px solid var(--border-gold-bright);
  padding: 24px 22px 22px;
  width: 100%;
  max-width: 440px;
  position: relative;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(245, 166, 35, 0.1);
  color: var(--text);
  -webkit-animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: all;
}

@-webkit-keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

.modal-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: center;
}

.modal-text__title {
  margin: 0 0 16px;
  font-family: var(--fc);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-text__text {
  font-weight: 400;
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.modal-text__btn {
  padding: 14px 20px;
  background-color: var(--gold);
  color: var(--navy);
  font-family: var(--fc);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 100%;
  border-radius: 8px;
  border: none;
  min-height: 44px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s, -webkit-filter 0.15s;
  transition: filter 0.15s, transform 0.15s;
  transition: filter 0.15s, transform 0.15s, -webkit-filter 0.15s;
}

.modal-text__btn:hover {
  -webkit-filter: brightness(1.1);
  filter: brightness(1.1);
}

.modal-text__btn:active {
  transform: scale(0.97);
}

.modal-first {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.modal-first__title {
  color: var(--gold);
  font-family: var(--fc);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 4px 0 14px;
  line-height: 1.3;
  text-align: center;
}

.modal-first__img {
  width: 70%;
  max-width: 260px;
  max-height: 190px;
  -o-object-fit: contain;
  object-fit: contain;
  margin-bottom: 12px;
  cursor: pointer;
  -webkit-filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6));
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}

.modal-first__img:hover {
  transform: scale(1.03);
}

.modal-first__data {
  font-size: 13px;
  font-weight: normal;
  line-height: 1.6;
  color: var(--text);
  text-align: center;
  width: 100%;
}

.modal-first__desc {
  font-weight: 700;
  color: var(--gold);
}

.modal-first__text {
  font-size: 13px;
  line-height: 1.5;
  font-weight: normal;
  color: var(--muted);
  margin: 14px 0 20px;
  text-align: center;
}

.modal-first__btn {
  background-color: var(--gold);
  color: var(--navy);
  font-family: var(--fc);
  border: none;
  padding: 14px 20px;
  width: 100%;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s, -webkit-filter 0.15s;
  transition: filter 0.15s, transform 0.15s;
  transition: filter 0.15s, transform 0.15s, -webkit-filter 0.15s;
}

.modal-first__btn:hover {
  -webkit-filter: brightness(1.1);
  filter: brightness(1.1);
}

.modal-first__btn:active {
  transform: scale(0.97);
}

/* Confetti */
@-webkit-keyframes snow {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }

  50% {
    background-position: 500px 500px, 100px 400px, -200px 300px;
  }

  100% {
    background-position: 500px 1000px, 200px 800px, -200px 600px;
  }
}

@keyframes snow {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }

  50% {
    background-position: 500px 500px, 100px 400px, -200px 300px;
  }

  100% {
    background-position: 500px 1000px, 200px 800px, -200px 600px;
  }
}

@-webkit-keyframes confettiFade {
  0% {
    opacity: 0;
  }

  15% {
    opacity: 0.6;
  }

  60% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
  }
}

@keyframes confettiFade {
  0% {
    opacity: 0;
  }

  15% {
    opacity: 0.6;
  }

  60% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
  }
}

.confetti {
  display: none;
  -webkit-animation: snow 13s linear infinite, confettiFade 3s ease-in-out forwards;
  animation: snow 13s linear infinite, confettiFade 3s ease-in-out forwards;
  background-image: url('../images/confetti-1.webp'), url('../images/confetti-2.webp'), url('../images/confetti-3.webp');
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  pointer-events: none;
  transition: opacity 0.8s ease-out;
}

.overlay.show~.confetti,
#overlay.show~.confetti,
body:has(.overlay.show) .confetti,
body:has(#modal-first.show, #modal-try.show, #modal-congrats.show) .confetti,
body:has(#modal-first[style*="display: flex"], #modal-try[style*="display: flex"], #modal-congrats[style*="display: flex"]) .confetti,
body:has(#modal-first[style*="display: block"], #modal-try[style*="display: block"], #modal-congrats[style*="display: block"]) .confetti {
  z-index: 60;
}

.confetti.fade-out {
  opacity: 0 !important;
}

/* Wheel */
.wheel {
  padding: 8px;
  background-color: var(--navy2);
  margin: 24px auto;
  aspect-ratio: 1/1;
  width: 90vw;
  max-width: 382px;
  border: 4px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(245, 166, 35, 0.35), 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  justify-content: center;
  align-items: center;
  display: none;
  position: relative;
}

.wheel--ai-kit {
  --ai-wheel-label-color: var(--gold);
  --ai-wheel-label-bg: var(--navy2);
  --ai-wheel-label-pad: 0.2em 0.55em;
  --ai-wheel-image-size: 26cqmin;
}

.mystery-box-ai-wheel {
  --ai-wheel-label-color: var(--gold);
  --ai-wheel-label-bg: var(--navy2);
  --ai-wheel-label-pad: 0.2em 0.55em;
  --ai-wheel-image-size: 26cqmin;
  position: relative;
  display: grid;
  place-items: center;
  width: 90vw;
  max-width: 382px;
  aspect-ratio: 1/1;
  margin: 20px auto;
}

.mystery-box-ai-wheel[hidden] {
  display: none;
}

.mystery-box-ai-wheel__root {
  grid-area: 1/1;
  width: 100%;
}

.mystery-box-ai-wheel__spin {
  grid-area: 1/1;
  z-index: 4;
  width: 60px;
  max-width: none;
  pointer-events: none;
}

.wheel__wrapper {
  padding: 0;
  border: 0;
  margin: 0;
  aspect-ratio: 1/1;
  width: 100%;
  -webkit-clip-path: inset(0 0 0 0 round 50%);
  clip-path: inset(0 0 0 0 round 50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

[dir=rtl] .wheel__wrapper {
  justify-content: flex-end;
}

.wheel__list {
  display: grid;
  padding: 0;
  inset: 0;
  width: 52%;
  height: 58%;
  transform: translateX(-4%);
}

.wheel__element {
  height: 104.7196666667%;
  width: 100%;
  align-content: center;
  grid-area: 1/-1;
  transform-origin: center right;
  -webkit-clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
}

.wheel__img {
  top: 32%;
  left: 20%;
  width: auto;
  height: 41%;
  position: absolute;
  align-self: center;
  -webkit-filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.wheel__text-cont {
  width: auto;
  height: auto;
  max-width: 47%;
  min-height: 18%;
  padding: 7px 4px;
  align-content: center;
  background-color: var(--navy);
  border: 1px solid var(--gold);
  border-radius: 6px;
  position: absolute;
  left: 17%;
  top: 50%;
  transform: translateY(-50%) rotate(270deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.wheel__text {
  text-align: center;
  display: block;
  width: -moz-max-content;
  width: -webkit-max-content;
  width: max-content;
  max-width: 100%;
  font-family: var(--fc);
  font-weight: 800;
  font-size: 13px;
  line-height: 100%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wheel__spin {
  position: absolute;
  z-index: 100;
  width: 64px;
  cursor: pointer;
  -webkit-filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.7));
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.7));
  transition: transform 0.2s, -webkit-filter 0.2s;
  transition: transform 0.2s, filter 0.2s;
  transition: transform 0.2s, filter 0.2s, -webkit-filter 0.2s;
}

.wheel__spin:hover {
  transform: scale(1.06);
  -webkit-filter: drop-shadow(0 4px 20px rgba(245, 166, 35, 0.5));
  filter: drop-shadow(0 4px 20px rgba(245, 166, 35, 0.5));
}