@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  /* https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/ */
  html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  figure,
  blockquote,
  dl,
  dd {
    margin: 0;
  }

  /* https://www.scottohara.me/blog/2019/01/12/lists-and-safari.html */
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  body {
    min-block-size: 100vh;
    line-height: 1.6;
  }

  h1,
  h2,
  h3,
  button,
  input,
  label {
    line-height: 1.1;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  p,
  li {
    text-wrap: pretty;
  }

  img,
  picture {
    max-inline-size: 100%;
    display: block;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }
}

@layer base {
  :root {
    --black: #000;
    --white: #fff;
    --purple: #a31a8a;
    --light-purple: #dda2de;
    --light-gray: #f5f5f5;
    --gray: #cccccc;
    --dark-gray: #d9d9d9;

    --border-radius-1: 1.875rem;
    --border-radius-2: 1.25rem;
    --border-radius-3: 0.938rem;
    --border-radius-4: 3.125rem;
  }

  @view-transition {
    navigation: auto;
  }

  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }
  }

  html {
    scroll-padding: 2rem;
    overflow-x: hidden;
  }
  body {
    font-family: "Syne", sans-serif;
    font-size: 1rem;
    color: var(--black);
    background-color: var(--white);
  }

  h1,
  h2,
  h3 {
    font-weight: 700;
    color: var(--black);
  }

  h2 {
    font-size: 1.875rem;
  }

  a {
    color: var(--black);
  }

  a:hover,
  a:focus-visible {
    color: var(--purple);
  }
  .btn {
    font-weight: 700;
    color: var(--white);
    font-size: 1.25rem;
    background-color: var(--black);
    border: none;
    border-radius: var(--border-radius-4);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
    font-family: "Syne Mono", monospace;
    padding: 1.25rem 3.125rem;
  }
}

@layer layout {
  .wrapper {
    --wrapper-max-width: 1400px;
    --wrapper-padding: 1rem;

    max-width: var(--wrapper-max-width);
    margin-inline: auto;
    padding-inline: var(--wrapper-padding);

    /* helps to match the Figma file */
    box-sizing: content-box;
  }

  .wrapper[data-width="narrow"] {
    --wrapper-max-width: 745px;
  }
  .wrapper[data-width="narrowXS"] {
    --wrapper-max-width: 400px;
  }

  .wrapper[data-width="wide"] {
    --wrapper-max-width: 1600px;
  }
  .section {
    padding-block: 3.125rem;

    @media (min-width: 760px) {
      padding-block: 6.25rem;

      &[data-padding="compact"] {
        padding-block: 4.5rem;
      }
    }
  }

  .modal-grid {
    display: grid;
    place-items: center;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    height: 100%;

    @media screen and (max-width: 815px) {
      grid-template-columns: 1fr;
    }
  }
}
@layer components {
  /* Navigation  */
  .site_header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding: 1.25rem 2.5rem;
    align-items: center;
    background: transparent;
    position: fixed;
    top: 0;
    z-index: 3;
    width: 100%;
    transition: background-color 0.3s ease;

    &.scrolled {
      background-color: var(--white);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    @media screen and (max-width: 650px) {
      padding: 1rem;
    }
  }

  .logo_header {
    grid-column: 2;
    justify-self: center;
    max-width: 240px;
    width: 100%;

    @media screen and (max-width: 650px) {
      max-width: 150px;
    }
  }

  .site_navigation {
    grid-column: 3;
    justify-self: end;

    @media screen and (max-width: 650px) {
      position: fixed;
      inset: 0;
      background: var(--white);
      transform: translateX(100%);
      transition: transform 0.3s ease-in-out;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 80%;
      z-index: 2;
      right: 0;
      left: auto;
      height: 100%;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch; /* Add for iOS smooth scrolling */
      -webkit-transform: translateX(100%); /* Ensure compatibility with older iOS */

      &.active {
        transform: translateX(0);
        -webkit-transform: translateX(0); /* For iOS compatibility */
      }

      ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;

        a {
          font-size: 1.5rem;
        }
      }
    }
  }

  .site_navigation ul {
    display: flex;
    gap: 1.25rem;

    a {
      text-decoration: none;
      font-weight: 700;
    }
  }

  .hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
    z-index: 3;

    span {
      display: block;
      width: 30px;
      height: 3px;
      background-color: var(--black);
      transition: 0.3s ease-in-out;
    }

    @media screen and (max-width: 650px) {
      display: flex;
      align-items: flex-end;
    }
  }

  /* When menu is open */
  .hamburger.active {
    span:first-child {
      transform: translateY(9px) rotate(45deg);
    }
    span:nth-child(2) {
      opacity: 0;
    }
    span:last-child {
      transform: translateY(-9px) rotate(-45deg);
    }
  }

  /* Hero Section */

  .page_hero {
    position: relative;
    padding-block-start: 6.125rem;
    padding-block-end: 5.125rem;
    text-align: center;
    color: var(--white);
    background-image: url(../../images/premium/header-background.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    .page_hero_title {
      h1 {
        font-size: 3.75rem;

        @media screen and (max-width: 1300px) {
          font-size: 3rem;
        }
        @media screen and (max-width: 950px) {
          font-size: 2.5rem;
        }
        @media screen and (max-width: 662px) {
          font-size: 2rem;
        }
      }
      p {
        margin-inline: auto;
        color: var(--black);
        font-size: 1.25rem;
        font-weight: 500;
        line-height: normal;
        margin-top: 1.44rem;
        max-width: 43.625rem;
      }
    }

    .btn {
      padding: 0.2rem 5.5rem;
      font-size: 2.5rem;
      margin-top: 2.25rem;
      background: transparent;
      border: 1px solid var(--black);
      color: var(--black);
      text-transform: uppercase;
      font-weight: 400;
      border-radius: 0.9375rem;

      @media screen and (max-width: 1300px) {
        font-size: 2rem;
        padding: 0.2rem 4.5rem;
      }
      @media screen and (max-width: 950px) {
        font-size: 1.75rem;
        padding: 0.2rem 3.5rem;
      }
      @media screen and (max-width: 662px) {
        font-size: 1.5rem;
        padding: 0.2rem 2.5rem;
      }
      @media screen and (max-width: 480px) {
        font-size: 1.25rem;
        padding: 0.2rem 2rem;
      }
    }
    .btn:hover,
    .btn:focus-visible {
      transform: scale(1.05);
    }

    img {
      margin: 0 auto;
    }
  }

  .streaming-section {
    background: url(../../images/premium/streaming-background.png) center no-repeat;
    background-size: cover;

    .wrapper > div {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 3rem;
    }

    img {
      max-width: 750px;
      width: 100%;
    }

    @media screen and (max-width: 1200px) {
      padding: 1.5rem 0;

      .wrapper > div {
        flex-direction: column;
      }

      .section_text {
        justify-content: center;
        align-items: center;
      }
    }
  }

  .gaming-section {
    background: url(../../images/premium/games-background.png) right no-repeat;
    background-size: cover;
    padding: 2rem 0;

    .wrapper > div {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 3rem;
    }

    img {
      max-width: 750px;
      width: 100%;
    }

    @media screen and (max-width: 1200px) {
      padding: 1.5rem 0;
      background-position: center;

      .wrapper > div {
        flex-direction: column-reverse;
      }

      .section_text {
        justify-content: center;
        align-items: center;
      }
    }
  }

  .section_text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: center;

    h2 {
      font-size: 2.5rem;
      font-weight: 700;

      @media screen and (max-width: 768px) {
        font-size: 2rem;
        text-align: center;
      }

      @media screen and (max-width: 480px) {
        font-size: 1.75rem;
      }
    }

    p {
      font-size: 1.125rem;
      text-align: justify;

      @media screen and (max-width: 768px) {
        font-size: 1rem;
        text-align: center;
      }
    }

    @media screen and (max-width: 768px) {
      align-items: center;
    }
  }

  .cards-section {
    background: url(../../images/premium/cards-background.png) center no-repeat;
    background-size: cover;

    .cards_new_games_title {
      margin-bottom: 4.5rem;
      h1 {
        font-size: 3.125rem;

        @media screen and (max-width: 1300px) {
          font-size: 3rem;
        }
        @media screen and (max-width: 950px) {
          font-size: 2.5rem;
        }
        @media screen and (max-width: 662px) {
          font-size: 2rem;
        }
      }
      p {
        margin-inline: auto;
        color: var(--black);
        font-size: 1.25rem;
        font-weight: 500;
        line-height: normal;
        margin-top: 1.44rem;
        max-width: 43.625rem;
      }
      .btn {
        padding: 0.2rem 5.5rem;
        font-size: 2.5rem;
        margin-top: 2.25rem;
        background: transparent;
        border: 1px solid var(--black);
        color: var(--black);
        text-transform: uppercase;
        font-weight: 400;
        border-radius: 0.9375rem;
        @media screen and (max-width: 1300px) {
          font-size: 2rem;
          padding: 0.2rem 4.5rem;
        }
        @media screen and (max-width: 950px) {
          font-size: 1.75rem;
          padding: 0.2rem 3.5rem;
        }
        @media screen and (max-width: 662px) {
          font-size: 1.5rem;
          padding: 0.2rem 2.5rem;
        }
        @media screen and (max-width: 480px) {
          font-size: 1.25rem;
          padding: 0.2rem 2rem;
        }
      }
    }

    .cards_new_games {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 1.25rem;
      text-align: left;
      justify-items: center;
    }
    .card_new_games {
      background: var(--white);
      border-radius: var(--border-radius-2);
      border: 1px solid var(--black);
      max-width: 300px;
      padding: 1rem;
      transition: transform 0.3s ease-in-out;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 1rem;

      h4 {
        text-transform: uppercase;
        font-size: 1.25rem;
        font-weight: 900;
      }

      p {
        text-transform: uppercase;
        font-weight: 500;
      }

      &:hover,
      &:focus-visible {
        transform: scale(1.05);
      }
    }
  }

  .ads-section {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 2rem;

    .ads-section-content {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    @media (max-width: 767px) {
      flex-direction: column;
      text-align: center;
      padding: 2rem 1rem;
    }

    .ads-section-content {
      flex: 1;

      gap: 1rem;

      img {
        margin: 0 auto 1rem;
      }

      @media (max-width: 767px) {
        max-width: 100%;
      }
    }
  }

  /* Footer  */
  .site_footer {
    padding-block: 3.125rem;

    a {
      color: var(--black);
      text-decoration: none;

      &:hover,
      &:focus-visible {
        color: var(--light-purple);
      }
    }
  }
  @media screen and (max-width: 760px) {
    ul {
      flex-direction: column;
      gap: 1.25rem;
    }
    .copyrights {
      font-size: 0.875rem;
    }
  }

  /* Modals  */
  .otp-modal,
  .login-modal,
  .unsub-modal,
  .sign-up-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;

    .close {
      position: absolute;
      right: 1.25rem;
      top: 1rem;
      font-size: 2rem;
      cursor: pointer;
      color: var(--black);

      @media screen and (max-width: 815px) {
        right: 0.5rem;
        top: 0.2rem;
      }
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      padding: 2rem;

      p {
        font-size: 0.875rem;
        text-align: center;
      }

      a {
        color: var(--purple);
      }

      @media screen and (max-width: 815px) {
        margin-top: 0;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        &label {
          font-size: 0.75rem;
        }
      }
    }

    .checkbox-group {
      label {
        color: #9c9c9c;
        font-size: 0.875rem;
      }

      input[type="checkbox"] {
        accent-color: var(--purple);
      }
    }

    .checkbox-group {
      label {
        color: #9c9c9c;
        font-size: 0.875rem;

        @media screen and (max-width: 815px) {
          font-size: 0.75rem;
        }
      }
    }

    input {
      padding: 0.5rem;
      border: 1px solid var(--gray);
      border-radius: var(--border-radius-3);
    }

    .btn {
      width: 100%;
      margin-top: 1rem;
      padding: 0.75rem;
    }

    @media screen and (max-width: 815px) {
      h2 {
        font-size: 1rem;
      }
      label {
        font-size: 0.75rem;
      }
      input {
        padding: 0.5rem;
      }
    }

    @media screen and (max-width: 815px) {
      padding: 0.75rem;
    }
  }
  .modal-content {
    background: var(--white);
    border-radius: var(--border-radius-2);
    box-shadow: 0px 0px 1rem rgb(221 162 222 / 67%);
    width: 90%;
    height: 100%;
    overflow: auto;
    max-inline-size: 1200px;
    position: relative;

    @media screen and (max-width: 815px) {
      width: 95%;
      margin-top: 2rem;
    }
  }
  .modal-bck {
    background: url(../../images/premium/modal-image.jpg) center no-repeat;
    background-size: cover;
    border-radius: var(--border-radius-2);
    height: 100%;
    width: 100%;

    @media screen and (max-width: 815px) {
      display: none;
    }
  }
  .form-group input {
    background: var(--light-gray);
    padding: 0.625rem 1.25rem;

    &:focus-visible {
      outline: none;
      border: 1px solid var(--light-purple);
    }

    &::placeholder {
      color: var(--gray);
    }

    @media screen and (max-width: 815px) {
      padding: 0.5rem;
    }
  }
}
@layer pages {
  .page {
    p {
      font-size: 14px;
      margin: 10px 0;
    }

    h1,
    h2 {
      color: var(--black);
      margin-top: 30px;
    }
    .title-border {
      display: block;
      width: 100%;
      height: 8px;
      margin: 15px 0 20px;
      background: var(--purple);
      border-radius: 4px;
    }
    .info-frame {
      background: linear-gradient(107deg, #c6b1ff 3.87%, #cbeffd 98.48%);

      padding: 30px;
      border-radius: 20px;

      h2 {
        text-align: center;
      }

      p {
        margin-bottom: 0;
      }

      .text-xl {
        font-size: 1.5rem;
        font-weight: 700;

        @media screen and (max-width: 991px) {
          font-size: 1.2rem;
        }
      }
    }
    ul,
    ol {
      li {
        margin: 15px;
        list-style: disc;
      }
    }
  }
  .btn.primary {
    padding: 12px 40px;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    transition: 0.25s ease-out;

    &:hover {
      transform: scale(1.1);
    }
  }

  .account_page {
    @media screen and (max-width: 750px) {
      flex-direction: column;
    }
  }
}

@layer utilites {
  .background-purple {
    background-color: var(--purple);
  }
  .d-flex {
    display: flex;
  }
  .flex-column {
    flex-direction: column;
  }
  .d-flex .column {
    flex-basis: 50%;
    flex-grow: 1;
  }
  .justify-center {
    justify-content: center;
  }
  .justify-between {
    justify-content: space-between;
  }
  .align-center {
    align-items: center;
  }
  .text-center {
    text-align: center;
  }
  .text-white {
    color: var(--white);
  }
  .text-black {
    color: var(--black);
  }
  .text-light-purple {
    color: #fed1ff;
  }
  .g-2 {
    gap: 0.625rem;
  }
  .pt-0 {
    padding-top: 0;
  }
  .mb-5 {
    margin-bottom: 3.125rem;
  }
  .gap-20 {
    gap: 20px;
  }
  .gap-50 {
    gap: 50px;
  }
  .border-bottom {
    border-bottom: 1px solid var(--black);
  }
}
