@import url('fonts.css');
@import url('reset.css');

:root {
  --color-primary: #f912a9;
  --color-secondary: #fcbe6c;
  --color-bg: #d8ff00;
  --color-text-light: #003A56;
  --color-text-dark: #f912a9;
  --border-radius: 33px;
  --button-radius: 33.39px;
  --container-max-width: 1920px;
  --gap: 32px;
}

.poster {
  max-width: var(--container-max-width);
  margin: 0 auto;
  background-color: var(--color-bg);
  padding: 40px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 60px;
  background-image: url('../img/background-3.svg');
  background-repeat: no-repeat;
  background-position: bottom;
  background-size: contain;
}

.poster__header {
  background-color: var(--color-primary);
  border-radius: var(--border-radius);
  padding: 20px 0;
  margin: 0 40px;
  text-align: center;
}

.poster__title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  color: var(--color-text-light);
  font-size: clamp(1.5rem, 5vw, 6.5625rem);
  line-height: 1.3;
  text-transform: uppercase;
}

.title__two-lines,
.title__four-lines {
  display: block;
}

.poster__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  position: relative;
  border-radius: var(--border-radius);
  padding: 0;
}

.poster__subtitle,
.poster__subtitle-two-lines,
.poster__subtitle-three-lines {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  color: var(--color-text-dark);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  line-height: 1.3;
  text-align: center;
  max-width: 90%;
  text-transform: uppercase;
  margin: 40px auto 0;
}

.main__kaleidoscope-wrapper {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
  background-image: url('../img/background-1.svg');
  background-repeat: no-repeat;
  background-position: center 33%;
  background-size: cover;
}

.main__kaleidoscope {
  max-width: min(1220px, 70vw);
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(900deg);
  }
}

.rotating {
  animation: spin 2s ease-out forwards;
}

.main__actions,
.main__actions-2,
.main__actions-3 {
  grid-area: actions;
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
}

.main__actions-2 {
  grid-area: actions-2;
}

.main__actions-3 {
  grid-area: actions-3;
}

.main__buttons {
  display: flex;
  justify-content: center;
  width: 100%;
}

.button {
  background-color: var(--color-primary);
  border-radius: var(--button-radius);
  padding: 30px 60px;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  color: var(--color-text-light);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
  transition: background-color 0.2s;
  border: none;
  min-width: 260px;
  white-space: nowrap;
}

.button:hover {
  background-color: #d0108f;
}

.button:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.main__decor {
  display: grid;
  grid-template-areas: "decor";
  place-items: center;
  width: 100%;
  margin: 40px 0;
  position: relative;
}

.main__decor>* {
  grid-area: decor;
}

.decor__circle {
  width: min(80%, 1298px);
  max-width: 60vw;
  aspect-ratio: 1298 / 906;
  border: 2px solid var(--color-secondary);
  border-radius: 50%;
  background: transparent;
  justify-self: center;
  align-self: center;
  transition: background-color 0.3s ease;
}

.decor__animal {
  width: min(70%, 1042px);
  max-width: 50vw;
  height: auto;
  aspect-ratio: 1042 / 749;
  object-fit: cover;
  transform: translateY(-5%);
  justify-self: center;
  align-self: center;
  transition: box-shadow 0.3s ease;
  border-radius: 20px;
}

.decor__circle.answer-correct {
  background: rgba(0, 255, 0, 0.6);
}

.decor__circle.answer-wrong {
  background: rgba(249, 0, 0, 0.6);
}

.decor__lines {
  display: flex;
  justify-content: space-between;
  max-width: 95vw;
  width: 100%;
  padding: 0 20px;
  cursor: pointer;
}

.decor__line {
  width: auto;
  height: clamp(100px, 20vw, 180px);
  transition: opacity 0.2s;
}

.decor__line:hover {
  opacity: 0.8;
}

.pattern-area {
  width: 80%;
  padding: 0;
  margin: auto;
  display: flex;
  justify-content: center;
  border-radius: 20px;
  transition: background-color 0.3s ease;
  background-color: transparent;
  background-image: url('../img/background-2.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  cursor: none;
}

.pattern-area.correct {
  background-color: rgba(0, 255, 0, 0.6);
}

.pattern-area svg {
  width: 100%;
  height: auto;
  display: block;
}

.pattern-management {
  display: grid;
  grid-template-rows: 0.5fr 1fr;
  gap: 20px;
  justify-content: center;
  align-self: center;
  margin: 40px auto;
}

.pattern-hint {
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #f912a9;
  padding: 10px 20px;
  margin: 0 auto 20px auto;
  display: inline-block;
  max-width: 80%;
}

.palette {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 20px;
  justify-content: center;
  align-self: center;
  margin: 40px auto;
}

.ellipse {
  display: flex;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
}

/* Цвета эллипсов в соответствии с data-color */
.ellipse[data-color="#BB8DB0"] {
  background-color: #BB8DB0;
}

.ellipse[data-color="#FF751F"] {
  background-color: #FF751F;
}

.ellipse[data-color="#FF00AE"] {
  background-color: #FF00AE;
}

.ellipse[data-color="#A1C8E4"] {
  background-color: #A1C8E4;
}

.ellipse[data-color="#FCBE6C"] {
  background-color: #FCBE6C;
}

.ellipse[data-color="#FFFFFF"] {
  background-color: #FFFFFF;
}

.ellipse:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.ellipse.active {
  outline: 3px solid rgb(141, 247, 28);
  outline-offset: 2px;
}

.vector {
  margin: auto;
  width: 70%;
}

.custom-cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: none;
}

.custom-cursor svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wheel-area {
  position: relative;
  width: 600px;
  height: 600px;
  margin: 40px auto;
}

.wheel-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wheel-pointer {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: auto;
  z-index: 10;
  pointer-events: none;
}

.wheel-pointer svg {
  transform: rotate(180deg);
  width: 100%;
  height: auto;
  display: block;
}

.poster__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin: 40px 40px 0;
}

.footer__logo {
  width: min(582px, 40%);
  height: auto;
}

.footer__info {
  color: var(--color-text-dark);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 2.5rem);
  line-height: 1.4;
}

.footer__name {
  font-weight: 500;
  white-space: nowrap;
}

.footer__group {
  font-weight: 600;
}

@media (max-width: 1023px) {

  .main__actions,
  .main__actions-2,
  .main__actions-3 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto 40px;
  }

  .poster {
    padding: 20px 0 20px;
    gap: 30px;
  }

  .decor__circle {
    max-width: 60vw;
  }

  .decor__animal {
    max-width: 45vw;
  }

  .decor__lines {
    max-width: 100vw;
  }

  .decor__line {
    height: clamp(100px, 10vw, 180px);
  }

  .button {
    padding: 20px 40px;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .main__decor {
    margin: 20px 0;
  }

  .poster__main {
    gap: 20px;
  }

  .poster__subtitle,
  .poster__subtitle-two-lines,
  .poster__subtitle-three-lines {
    margin: 30px auto 0;
  }

  .decor__circle {
    width: 60vw;
  }

  .decor__line {
    height: clamp(70px, 2vw, 180px);
  }

  .decor__animal {
    width: 90%;
  }

  .button {
    padding: 10px 30px;
    min-width: 200px;
  }

  .wheel-area {
    width: 300px;
    height: 300px;
  }

  .wheel-pointer {
    width: 50px;
    bottom: -35px;
  }

  .poster__footer {
    margin: 0 14px;
    gap: 10px;
  }

  .footer__name,
  .footer__group {
    line-height: 1.1;
    text-align: end;
  }
}

@media (max-width: 475px) {
  .poster__header {
    margin: 0 14px;
  }

  .poster {
    gap: 14px;
  }

  .poster__subtitle,
  .poster__subtitle-two-lines,
  .poster__subtitle-three-lines {
    margin: 20px auto 0;
  }

  .title__two-lines {
    display: none;
  }

  .decor__circle {
    width: 50vw;
  }

  .main__actions,
  .main__actions-2,
  .main__actions-3 {
    flex-direction: column;
    margin: 20px auto;
  }

  .pattern-management {
    gap: 5px;
    margin: 10px auto;
  }

  .ellipse {
    width: 50px;
    height: 50px;
  }

  .palette,
  .pattern-hint {
    margin: 0 auto;
    padding: 0;
    min-height: 40px;
    line-height: 1.1;
  }

  .footer__name,
  .footer__group {
    font-size: clamp(1.1rem, 3vw, 2.5rem);
  }

}

@media (max-width: 375px) {
  .poster {
    gap: 6px;
  }

  .footer__name,
  .footer__group {
    text-align: start;
  }
}

@media (min-width: 476px) {
  .title__four-lines {
    display: none;
  }
}

@media (min-width: 1024px) {
  .poster {
    padding: 40px;
  }

  .poster__main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "subtitle subtitle"
      "kaleidoscope animal"
      "actions actions"
      "subtitle-two-lines subtitle-two-lines"
      "decor decor"
      "actions-2 actions-2"
      "subtitle-three-lines subtitle-three-lines"
      "wheel wheel"
      "actions-3 actions-3";
    gap: 40px;
    align-items: start;
  }

  .poster__subtitle {
    grid-area: subtitle;
    margin: 0 auto;
  }

  .poster__subtitle-two-lines {
    grid-area: subtitle-two-lines;
    margin: 0 auto;
  }

  .poster__subtitle-three-lines {
    grid-area: subtitle-three-lines;
    margin: 0 auto;
  }

  .wheel-area {
    grid-area: wheel;
  }

  .main__kaleidoscope-wrapper {
    padding: 50px;
    background-position: center 34%;
    background-size: 138%;
  }

  .main__decor {
    width: 100%;
    margin: auto;
  }

  .decor__circle {
    transform: rotate(90deg);
    width: 75%;
    height: auto;
  }

  .decor__animal {
    transform: translateY(-5%) rotate(0deg);
    max-width: 50%;
  }

  .decor__lines {
    max-width: 100%;
    width: 100%;
    padding: 0;
  }

  .decor__line {
    width: auto;
    height: clamp(100px, 2vw, 180px);
  }

  .main__buttons {
    margin: 0;
  }

  .button {
    white-space: nowrap;
  }
}

@media (min-width: 1200px) {
  .decor__circle {
    width: 80%;
  }

  .decor__lines {
    width: 97%;
  }
}

@media (min-width: 1920px) {
  .poster {
    margin: 0 auto;
  }
}