/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

 html {
    line-height: 1.15; /* 1 */
    -webkit-text-size-adjust: 100%; /* 2 */
  }
  
  /* Sections
     ========================================================================== */
  
  /**
   * Remove the margin in all browsers.
   */
  
  body {
    margin: 0;
  }
  
  /**
   * Render the `main` element consistently in IE.
   */
  
  main {
    display: block;
  }
  
  /**
   * Correct the font size and margin on `h1` elements within `section` and
   * `article` contexts in Chrome, Firefox, and Safari.
   */
  
  h1 {
    font-size: 2em;
    margin: 0.67em 0;
  }
  
  /* Grouping content
     ========================================================================== */
  
  /**
   * 1. Add the correct box sizing in Firefox.
   * 2. Show the overflow in Edge and IE.
   */
  
  hr {
    box-sizing: content-box; /* 1 */
    height: 0; /* 1 */
    overflow: visible; /* 2 */
  }
  
  /**
   * 1. Correct the inheritance and scaling of font size in all browsers.
   * 2. Correct the odd `em` font sizing in all browsers.
   */
  
  pre {
    font-family: monospace, monospace; /* 1 */
    font-size: 1em; /* 2 */
  }
  
  /* Text-level semantics
     ========================================================================== */
  
  /**
   * Remove the gray background on active links in IE 10.
   */
  
  a {
    background-color: transparent;
  }
  
  /**
   * 1. Remove the bottom border in Chrome 57-
   * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
   */
  
  abbr[title] {
    border-bottom: none; /* 1 */
    text-decoration: underline; /* 2 */
    text-decoration: underline dotted; /* 2 */
  }
  
  /**
   * Add the correct font weight in Chrome, Edge, and Safari.
   */
  
  b,
  strong {
    font-weight: bolder;
  }
  
  /**
   * 1. Correct the inheritance and scaling of font size in all browsers.
   * 2. Correct the odd `em` font sizing in all browsers.
   */
  
  code,
  kbd,
  samp {
    font-family: monospace, monospace; /* 1 */
    font-size: 1em; /* 2 */
  }
  
  /**
   * Add the correct font size in all browsers.
   */
  
  small {
    font-size: 80%;
  }
  
  /**
   * Prevent `sub` and `sup` elements from affecting the line height in
   * all browsers.
   */
  
  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  
  sub {
    bottom: -0.25em;
  }
  
  sup {
    top: -0.5em;
  }
  
  /* Embedded content
     ========================================================================== */
  
  /**
   * Remove the border on images inside links in IE 10.
   */
  
  img {
    border-style: none;
  }
  
  /* Forms
     ========================================================================== */
  
  /**
   * 1. Change the font styles in all browsers.
   * 2. Remove the margin in Firefox and Safari.
   */
  
  button,
  input,
  optgroup,
  select,
  textarea {
    font-family: inherit; /* 1 */
    font-size: 100%; /* 1 */
    line-height: 1.15; /* 1 */
    margin: 0; /* 2 */
  }
  
  /**
   * Show the overflow in IE.
   * 1. Show the overflow in Edge.
   */
  
  button,
  input { /* 1 */
    overflow: visible;
  }
  
  /**
   * Remove the inheritance of text transform in Edge, Firefox, and IE.
   * 1. Remove the inheritance of text transform in Firefox.
   */
  
  button,
  select { /* 1 */
    text-transform: none;
  }
  
  /**
   * Correct the inability to style clickable types in iOS and Safari.
   */
  
  button,
  [type="button"],
  [type="reset"],
  [type="submit"] {
    -webkit-appearance: button;
  }
  
  /**
   * Remove the inner border and padding in Firefox.
   */
  
  button::-moz-focus-inner,
  [type="button"]::-moz-focus-inner,
  [type="reset"]::-moz-focus-inner,
  [type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
  }
  
  /**
   * Restore the focus styles unset by the previous rule.
   */
  
  button:-moz-focusring,
  [type="button"]:-moz-focusring,
  [type="reset"]:-moz-focusring,
  [type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
  }
  
  /**
   * Correct the padding in Firefox.
   */
  
  fieldset {
    padding: 0.35em 0.75em 0.625em;
  }
  
  /**
   * 1. Correct the text wrapping in Edge and IE.
   * 2. Correct the color inheritance from `fieldset` elements in IE.
   * 3. Remove the padding so developers are not caught out when they zero out
   *    `fieldset` elements in all browsers.
   */
  
  legend {
    box-sizing: border-box; /* 1 */
    color: inherit; /* 2 */
    display: table; /* 1 */
    max-width: 100%; /* 1 */
    padding: 0; /* 3 */
    white-space: normal; /* 1 */
  }
  
  /**
   * Add the correct vertical alignment in Chrome, Firefox, and Opera.
   */
  
  progress {
    vertical-align: baseline;
  }
  
  /**
   * Remove the default vertical scrollbar in IE 10+.
   */
  
  textarea {
    overflow: auto;
  }
  
  /**
   * 1. Add the correct box sizing in IE 10.
   * 2. Remove the padding in IE 10.
   */
  
  [type="checkbox"],
  [type="radio"] {
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
  }
  
  /**
   * Correct the cursor style of increment and decrement buttons in Chrome.
   */
  
  [type="number"]::-webkit-inner-spin-button,
  [type="number"]::-webkit-outer-spin-button {
    height: auto;
  }
  
  /**
   * 1. Correct the odd appearance in Chrome and Safari.
   * 2. Correct the outline style in Safari.
   */
  
  [type="search"] {
    -webkit-appearance: textfield; /* 1 */
    outline-offset: -2px; /* 2 */
  }
  
  /**
   * Remove the inner padding in Chrome and Safari on macOS.
   */
  
  [type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  
  /**
   * 1. Correct the inability to style clickable types in iOS and Safari.
   * 2. Change font properties to `inherit` in Safari.
   */
  
  ::-webkit-file-upload-button {
    -webkit-appearance: button; /* 1 */
    font: inherit; /* 2 */
  }
  
  /* Interactive
     ========================================================================== */
  
  /*
   * Add the correct display in Edge, IE 10+, and Firefox.
   */
  
  details {
    display: block;
  }
  
  /*
   * Add the correct display in all browsers.
   */
  
  summary {
    display: list-item;
  }
  
  /* Misc
     ========================================================================== */
  
  /**
   * Add the correct display in IE 10+.
   */
  
  template {
    display: none;
  }
  
  /**
   * Add the correct display in IE 10.
   */
  
  [hidden] {
    display: none;
  }
body {
    position: relative;
    font-family: sans-serif;
	font-size: 20px;
}

ul, p {
    margin: 0;
    padding: 0;
}

.ya-share2 {
    margin-top: -4px;
    width: 240px;
    min-height: 24px;
}

#game {
    width: 100%;
    height: 100%;
}

#game iframe {
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

/* Fullscreen button styles */
.fullscreen-btn {
    width: 100%;
    border-radius: 20px;
    background-color: #5178d8;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    border: 0;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.fullscreen-btn:hover {
    background-color: #4168c8;
}

.fullscreen-btn__text {
    display: block;
    font-size: 18px;
    font-weight: bold;
}

/* Fullscreen mode styles */
#game:fullscreen {
    background: #000;
}

#game:-webkit-full-screen {
    background: #000;
}

#game:-moz-full-screen {
    background: #000;
}

#game:-ms-fullscreen {
    background: #000;
}

.header {
    box-shadow: 0px 8px 16px rgba(17, 17, 17, 0.04);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
}

.logo__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 901.1 / 427.31;
}

.logo {
  display: block;
  width: 150px;
}

.main-category__title, .instruction-header__title {
	font-weight: bold;
}

/* Заголовок гри та breadcrumbs */

.game-title {
    font-size: 36px;
    font-weight: bold;
    color: #000000;
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-align: left;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 16px;
    gap: 8px;
}

.breadcrumbs__link {
    color: #5178d8;
    text-decoration: none;
    transition: color 0.3s;
}

.main-menu__link {
    background: #5178d8;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    display: inline-block;
    font-weight: normal;
}

.breadcrumbs__link:hover {
    text-decoration: underline;
}

.breadcrumbs__separator {
    color: #666666;
    margin: 0 4px;
}

.breadcrumbs__current {
    color: #666666;
    font-style: italic;
}

.main-wrapper {
    display: flex;
    justify-content: center;
    padding: 1% 5%;
}

.main-content {
    max-width: 1044px;
    padding-right: 30px;
    flex: 1;
}

/* Головна сторінка без sidebar */
body:has(.main-wrapper > .main-content:only-child) .main-content {
    max-width: 100%;
    padding: 0;
}

.main-category {
    background-color: #FFFFFF;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.07);
    border-radius: 16px;
    padding: 16px 16px 0 16px;
	margin-bottom: 10px;
}

.main-category__title {
    
    font-size: 30px;
    line-height: 100%;
}

.main-category__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-bottom: 14px;
}

.main-category__social {
    display: flex;
}

.main-category__info {
    
    font-size: 18px;
    line-height: 100%;
    padding-right: 14px;
}

.main-category__link:not(:last-child) {
    padding-right: 12px;
}

.category-more {
    background-color: transparent;
    outline: none;
    cursor: pointer;
    border: none;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding-bottom: 11px;
}

.category-more__title {
    font-size: 14px;
    line-height: 14px;
    text-align: right;
    color: #007AE9;
    
    padding-right: 10px;
}

.cards {
    padding-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.card-item {
    background: #FFFFFF;
    box-shadow: 0px 4px 8px rgba(17, 17, 17, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 15px;
    flex-direction: column;
}

.card-item:hover {
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-item__img {
    width: 185px;
    height: 125px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.card-info {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 165px;
}

.card-item__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c2b2b;
    line-height: 1.2;
}

.card-more__link {
    text-decoration: none;
    color: inherit;
}

.main-sidebar {
    max-width: 280px;
    padding: 0 15px 0 0;
    flex: 1;
}

.main-sidebar__title {
    
    font-size: 22px;
    line-height: 100%;
    text-align: left;
}

.main-sidebar__list {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
}

.main-sidebar__link {
    display: flex;
    justify-content: center;
    width: 125px;
    height: 70px;
    overflow: hidden;
    align-items: center;
    border-radius: 12px;
}

.main-sidebar__img {
    max-width: 100%;
}

/* Additional games (після instruction) */
.additional-games {
    margin-top: 40px;
    background: #FFFFFF;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.07);
    border-radius: 16px;
    padding: 20px;
}

.additional-games__title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
    text-align: left;
}

.additional-games__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.additional-games__link {
    display: flex;
    justify-content: center;
    width: 122px;
    height: 70px;
    overflow: hidden;
    align-items: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.additional-games__link:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
}

.additional-games__img {
    max-width: 100%;
}

.footer {
    box-shadow: 0px -8px 16px rgba(17, 17, 17, 0.04);
    padding-top: 20px;
}

/* Footer menu з категоріями */
.footer-menu {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.footer-menu__list {
    display: flex;
    gap: 16px;
    list-style-type: none;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.footer-menu__item {
    margin: 0;
}

.footer-menu__link.category-card {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    transition: all 0.3s ease;
    gap: 12px;
    text-decoration: none;
}

.footer-menu__link.category-card:hover {
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.footer-menu__link.category-card.active {
    background: #F5F5F5;
    box-shadow: 0px 6px 12px rgba(239, 108, 0, 0.2);
}

.category-card__icon {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.category-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #2c2b2b;
    text-decoration: none;
    line-height: 1.2;
}

.container {
    max-width: 1100px;
    padding: 12px 15px;
    margin: 0 auto;
	text-align: center;
}

.footer-copyright {
    
    font-size: 16px;
    line-height: 100%;
}

.main-game {
    margin: 15px 0px;
    height: 600px;
    background: #BCD1FF;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-game__title {
    
    font-size: 72px;
    line-height: 100%;
    color: #FFFFFF;
}

.instruction {
    background: #FFFFFF;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.07);
    border-radius: 16px;
    padding: 16px;
}

.instruction-header {
    display: flex;
    padding-bottom: 14px;
}

.instruction-header__title {
    
    font-size: 25px;
    line-height: 100%;
    padding-right: 64px;
}

.instruction-info {
    font-size: 16px;
    line-height: 140%;
    color: #374A59;
}

/* Category sections on home page */
.category-section {
    margin-bottom: 60px;
}

.category-header {
    margin-bottom: 30px;
}

.category-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    box-shadow: 0px 4px 8px rgba(17, 17, 17, 0.08);
    border-radius: 12px;
    padding: 12px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-title:hover {
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.category-title__icon {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.category-title__text {
    font-size: 28px;
    font-weight: bold;
    color: #2c2b2b;
    margin: 0;
    line-height: 1.2;
}


@media screen and (max-width: 1080px) {
    .main-sidebar {
      max-width: 190px;
    }
}

@media screen and (max-width: 1000px) {
    .card-item__title {
        font-size: 16px;
    }
    

    .main-game__title {
        font-size: 58px;
    }

    .main-game {
        height: 500px;
    }
  }

  @media screen and (max-width: 991px) {
      .main-menu {
        padding-left: 50px;
      }
  }



  @media screen and (max-width: 860px) {
    .main-game__title {
        font-size: 45px;
    }

    .main-game {
        height: 400px;
    }
    
    .footer-menu__list {
        gap: 12px;
    }
    
    .category-card__icon {
        width: 40px;
        height: 40px;
    }
    
    .category-card__title {
        font-size: 14px;
    }
    
    .game-title {
        font-size: 28px;
    }
    
    .breadcrumbs {
        font-size: 14px;
    }
}

  @media screen and (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
    }

    .header .container {
      padding: 15px;
    }

    .logo {
      width: 180px;
    }

    .main-sidebar {
        width: auto;
        max-width: 100%;
        margin-top: 40px;
        padding: 0 30px;
    }

    .main-sidebar__list {
        display: flex;
        justify-content: space-between;
        padding-top: 30px;
    }

    .main-wrapper {
        padding-left: 0;
    }

    .main-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    .main-sidebar__link {
        margin: 0;
    }
}

@media screen and (max-width: 560px) {
    .main-game__title {
        font-size: 35px;
    }

    .main-game {
        height: 300px;
    }

    .main-sidebar__img {
        max-width: 85%;
    }
    
    .main-menu__list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-title {
        font-size: 24px;
    }
    
    .breadcrumbs {
        font-size: 13px;
    }
    
    
    .card-item__title {
        font-size: 14px;
    }
    
    .category-title__icon {
        width: 40px;
        height: 40px;
    }
    
    .category-title__text {
        font-size: 20px;
    }
    
    .additional-games__title {
        font-size: 20px;
    }
    
    .additional-games__link {
        width: 100px;
        height: 56px;
    }
}

@media screen and (max-width: 425px) {
    .card-item {
        width: 100%;
    }

    .main-sidebar__list {
        padding-top: 10px;
    }

    .main-category__title {
        padding-bottom: 5px;
    }
    
    .category-title {
        padding: 10px 15px;
    }
    
    .category-title__icon {
        width: 36px;
        height: 36px;
    }
    
    .category-title__text {
        font-size: 18px;
    }
}

@media screen and (max-width: 380px) {
    .main-game__title {
        font-size: 25px;
        text-align: center;
    }
}

@media screen and (max-width: 345px) {
    .instruction-header {
        flex-wrap: wrap;
    }

    .instruction-header__title {
        font-size: 12px;
    }

    .footer-copyright {
        font-size: 13px;
    }
}

@media screen and (max-width: 570px) {
    .ya-share2 { width: 24px; }
}
