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

/* Nav Bar */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: space-between;
  position: relative;
}

nav {
  width: 100%;
  margin: 1rem 0;
}

ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
  height: 2.875rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.left-items {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.right-items {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background-color: #FFC358;
  border: 1px solid #68594A;
  border-radius: 50%;
}

.left-items a, .right-items a {
  text-decoration: none;
  border: 1px solid #DDD5CD;
  border-radius: 30px;
  padding: 6px 21px;
  color: #68594A;
  background-color: #FDF7F1;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.left-items a:focus, .right-items a:focus {
  border: 1px solid #68594A;
  border-radius: 30px;
}

.nickname {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #68594A;
  font-weight: 600;
  white-space: nowrap;
}

.nickname:hover {
  color: #4a3c2a;
  text-decoration: underline;
}

.nickname i {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
  margin-right: 4px;
}

.left-items a:hover, .right-items a:hover {
  background-color: #F7EADD;
  border-color: #68594A;
  box-shadow: 0 2px 8px rgba(104, 89, 74, 0.15);
}

.left-items a.active, .right-items a.active {
  background-color: #FFC358;
  border-color: #68594A;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 195, 88, 0.3);
}

/* Mobile menu trigger */
.mobile-menu-trigger {
  display: none;
  cursor: pointer;
  z-index: 1001;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.nav--open {
  transform: translateX(0) !important;
}

/* Body */
body {
  background-image:
  linear-gradient(0deg, rgba(255, 241, 227, 0.55), rgba(255, 241, 227, 0.55)),
  url(/static/home/images/background.jpg);
  background-size: cover;
  height: 100%;
  background-attachment: fixed;
  margin: 0 2.5rem !important;
  overflow-x: hidden;
}

.white_bg {
  background: #fff;
  border: none;
  border-radius: 0 0 2.5rem 2.5rem;
  padding: 0 20px 35px;
  margin-bottom: 100px;
}

/* Texts and button */
.quiz {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1 {
  font-family: "Inter", sans-serif;
  font-size: 60px !important;
  text-align: center;
  color: #68594A;
  font-weight: 700 !important;
  margin-bottom: 24px !important;
  line-height: 1.1 !important;
  margin-top: 60px !important;
}

.quiz_desc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 45px;
  max-width: 700px;
  width: 100%;
}

.about_quiz {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  text-align: center;
  color: #68594A;
  font-weight: 400;
  line-height: 1.5;
}

/* Lists style */

/* ol {
  counter-reset: li;
  list-style: none;
  *list-style: decimal;
  padding: 0;
}

ol ol {
  margin: 0 0 0 2em;
}

span {
  font-family: "Inter", sans-serif;
  color: #68594A;
  font-weight: 600;
  line-height: 1;
  font-size: 1rem;
}

.rounded-list a{
  position: relative;
  display: block;
  padding: .75em .4em .75em 2em;
  *padding: .4em;
  margin: 1em 0;
  background: #F7EADD;
  text-decoration: none;
  border-radius: .5em;
  transition: all .3s ease-out;

  font-family: "Inter", sans-serif;
  color: #68594A;
  font-weight: 400;
  line-height: 1;
  font-size: 1rem;
}

.rounded-list a:hover{
  background: #FDF7F1;
}

.rounded-list a:hover:before{
  transform: rotate(360deg);
}

.rounded-list a:before{
  content: counter(li);
  counter-increment: li;
  position: absolute;
  left: -1.3em;
  top: 50%;
  margin-top: -1.3em;
  background: #FFC358;
  height: 2.5em;
  width: 2.5em;
  line-height: 2em;
  border: .3em solid #fff;
  text-align: center;
  font-weight: bold;
  border-radius: 2em;
  transition: all .3s ease-out;
} */

/* Level sections */

.level_section_header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
}

.level_section_title {
  font-family: 'Inter', sans-serif;
  color: #68594A;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.see_all_btn {
  font-family: 'Inter', sans-serif;
  color: #68594A;
  font-size: 16px;
  text-align: right;
}

.see_all_btn:hover {
  color: #4a3c2a;
  text-decoration: underline;
}

/* Cards Container */
.cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto 80px;
  padding: 0;
  max-height: none;
  overflow: hidden;
  position: relative;
}

.cards-container .card:nth-child(n+7) {
  display: none;
}


.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  border-radius: 24px;
  min-height: 200px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.green {
  background: #F8E9D6;
}

.pink {
  background: #FFD2EE;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: 40px;
}

.card-icon {
  font-size: 32px;
}

.card-title {
  font-family: "Inter", sans-serif;
  font-size: 24px;
  color: #68594A;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.play-btn {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #68594A;
  font-weight: 500;
  background: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 32px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.play-btn:hover {
  background: #68594A;
  color: #FDF7F1;
  transform: scale(1.05);
}

.play-btn:active {
  transform: scale(0.95);
}

/* Cats container */
/* dialog windows */
.bubble {
  position: absolute;
  animation: float 3s ease-in-out infinite;
}

/* Хвостик слева (для Булочки) */
.bubble-left::after {
  content: "";
  position: absolute;
  top: 25px;
  left: 92%;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 25px solid transparent;
  border-top: 30px solid #D5FFA9;
}

/* Хвостик справа (для Пирожка) */
.bubble-right::after {
  content: "";
  position: absolute;
  bottom: -10%;
  right: 88%;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 40px solid #FFD2EE;
  transform: rotate(148deg);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}


@media (max-width: 900px) {

  html {
    height: 100%;
    overflow-x: hidden;
  }

  body {
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: auto;
  }

  header {
    justify-content: flex-end;
    padding: 1rem 0 !important;
    margin: 0 !important;
    position: relative;
  }

  .white_bg {
    padding-top: 1.5rem;
  }

  .nickname {
    position: static;
    transform: none;
    order: 2;
    margin: 16px 0;
    font-size: 20px;
    padding-top: 2rem !important;
    width: 100%;
    text-align: center;
  }

  .mobile-menu-trigger {
    display: flex;
  }

  .mobile-menu-trigger .logo {
    margin: 0 !important;
    transition: transform 0.3s ease;
  }

  .mobile-menu-trigger .logo:hover {
    transform: scale(1.1);
  }

  nav {
    position: fixed;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(253, 247, 241, 0.95);
    backdrop-filter: blur(10px);
    margin: 0 !important;
    padding: 80px 2rem 2rem !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  
  ul {
    flex-direction: column;
    height: auto;
    min-height: auto;
    align-items: center;
    gap: 0;
    justify-content: center;
  }
  
  .left-items {
    flex-direction: column;
    gap: 0;
    margin-top: 2rem !important;
    width: 100%;
    align-items: center;
  }
  
  .right-items {
    flex-direction: column;
    gap: 0;
    margin-left: 0 !important;
    width: 100%;
    align-items: center;
  }

  .right-items .logo {
    display: none;
  }
  
  nav a {
    border: none;
    padding: 16px 24px;
    font-size: 18px;
    text-align: center;
    min-width: 200px;
    margin: 8px 0 !important;
    display: block;
    background: none;
  }
  
  nav a:focus {
    border: none;
    outline: 2px solid #68594A;
    outline-offset: 2px;
  }
}

/* Tablet */
@media (max-width: 768px) {

  html {
    height: 100%;
    overflow-x: hidden;
  }

  h1 {
    margin-top: 40px !important;
    margin-bottom: 24px !important;
    font-size: 30px !important;
  }

  .about_quiz {
    font-size: 18px !important;
  }

  .cards-container {
  grid-template-columns: repeat(1, 1fr);
  margin-bottom: 60px;
  }

  .cards-container .card:nth-child(n+5) {
    display: none;
  }

  .card {
    padding: 40px;
    min-height: 180px;
  }

  .card-content {
    margin-bottom: 40px;
  }

  .card-icon {
    font-size: 28px;
  }

}

/* Mobile */
@media (max-width: 520px) {

  body {
    margin: 0 1.625rem !important;
  }

  .card {
    padding: 40px;
    min-height: 160px;
  }

  .card-content {
    margin-bottom: 40px;
  }

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

  .card-icon {
    font-size: 26px;
  }

  .cards-container {
  grid-template-columns: repeat(1, 1fr);
  margin-bottom: 40px;
  }

  .level_section_title {
  font-size: 30px;
  }
}