:root {
  --bg-color: rgb(51, 51, 51);
  --surface-dark: rgb(20, 20, 20);
  --text-primary: #eaeaea;
  --orange: #ff8a00;
  --text-secondary: #9c9b9b;
  --surface-mid: rgb(44, 44, 44);
  --surface-light: rgb(68, 68, 68);
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}
html {
  font-size: 10px;
  font-family: "Montserrat", sans-serif;
}

body {
  background: var(--bg-color);
  min-height: 100vh;
  min-width: 100vh;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
nav {
  background-color: var(--surface-dark);
  display: flex;
  justify-content: space-between;
  position: relative;
}
nav ul {
  display: flex;
}
ul {
  display: flex;
  font-size: 3rem;
  gap: 10px;
  text-decoration: none;
  list-style: none;
}
ul li {
  color: var(--text-primary);
  padding: 1.5rem 4rem;
}

nav .home_li {
  margin-right: auto;
}

.nav-center li a {
  position: relative;
  text-decoration: none;
  color: #ebebeb;
}
.nav-center li a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 0.3rem;
  left: 0;
  bottom: 0;
  background: var(--orange);
  transform: scale(0, 1);
  transform-origin: 0% 100%;
  transition: transform 0.3s ease;
}
.nav-center li a:hover::after {
  transform: scale(1, 1);
}
.nav-left,
.nav-right {
  flex: 1;
}

.nav-right {
  display: flex;
  justify-content: flex-end;
}
.logo_game {
  color: var(--orange);
}

.nav-right_basket {
  padding: 1.5rem 1.5rem;
}
.nav-right_basket:hover,
.nav-right_user:hover {
  color: var(--orange);
  cursor: pointer;
  transform: scale(1.1);
}

.nav-right_search {
  padding: 1.5rem 1.5rem;
  margin-right: 1rem;
}

.nav-right_search:hover {
  color: var(--orange);
  background-color: black;
  transform: scale(1.1);
}

.search-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font-size: inherit;
}
.search-bar {
  position: absolute;
  width: 100%;
  max-width: 450px;
  transition: 0.3s ease;
  top: 10rem;
  right: 2rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: 0.3s ease;
  pointer-events: none;
}

.search-bar.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.search-bar::after {
  content: "";
  position: absolute;
  right: 16px;
  top: -10px;
  height: 20px;
  width: 20px;
  transform: rotate(-45deg);
  background-color: var(--orange);
  z-index: -1;
}
.search-bar i {
  position: absolute;
  right: 2rem;
  top: 2rem;
  font-size: 2.5rem;
  cursor: pointer;
}
.search-bar_input {
  width: 100%;
  padding: 2rem 6rem 2rem 2rem;
  border-radius: 1rem;
  outline: none;
  border: solid 2px var(--orange);
  font-size: 2rem;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--surface-dark);
  color: var(--text-primary);
}
.search-bar i {
  color: var(--text-primary);
}
.adgame-img {
  width: 100vw;
  height: 50vh;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  clip-path: polygon(
    0 0,
    /* lewy górny */ 100% 0,
    /* prawy górny */ 100% 100%,
    /* prawy dół (normalnie) */ 0 90% /* lewy dół podniesiony */
  );
  object-position: 50% 25%;
}
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3 ease;
  z-index: 5;
}
.search-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.search-results {
  position: absolute;
  width: 60rem;
  min-height: 10rem;
  background: var(--surface-mid);
  top: 10rem;
  z-index: 100;
  left: 50%;
  transform: translateY(-50%);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.search-results.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
  pointer-events: auto;
}
.search-results-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--surface-light);
  overflow: hidden;
}
.search-results-box_left {
  padding: 1rem;
  display: flex;
  align-items: center;
}

.search-results-box:hover,
.search-results-bottom:hover {
  cursor: pointer;
  background: var(--surface-light);
}
.search-results-img {
  object-fit: cover;
  object-position: 20% center;
  width: 12rem;
  height: 8rem;
  flex-shrink: 0;
  padding: 0;
  border-radius: 0.8rem;
}

.search-results-right {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-size: 2rem;
  color: var(--text-primary);
}
.search-results-bottom {
  font-size: 1.5rem;
  color: var(--text-secondary);
  padding: 1.5rem;
  text-align: center;
}
.banner {
  position: relative;
}

.banner-caption {
  position: absolute;
  color: var(--text-primary);
  top: 15rem;
  left: 10rem;
}

.banner-caption_title-game {
  font-size: 3rem;
  font-weight: 600;
}

.banner-caption_under-title-game {
  display: flex;
  align-items: center;
  font-size: 3rem;
  margin: 2rem 0m;
}

.banner-caption_under-title-game_discount {
  background-color: var(--orange);
  margin: 0 3rem;
  font-size: 2rem;
  clip-path: polygon(0 0, 75% 0, 80% 10%, 100% 100%, 0 100%);
  border-radius: 1rem;
  padding: 0.5rem 1rem;
}

main {
  flex: 1;
}

h1 {
  color: var(--text-primary);
  font-size: 3rem;
  width: 16%;
}
h1 i {
  color: #5f5f5f;
}
h1:hover {
  cursor: pointer;
}
h1:hover i {
  cursor: pointer;
  color: var(--text-primary);
}

.store {
  width: 70%;
  margin: 0 auto;
}

.template-img {
  width: 40rem;
  height: 25rem;
  object-fit: cover;
  border-radius: 1rem;

  transition: 0.4s ease-in-out;
}
.games-grid {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.games-grid_box:hover {
  cursor: pointer;
}

.under-box-section {
  display: flex;
  justify-content: space-between;
  color: var(--text-primary);
  font-size: 2rem;
}
.under-box-section_price {
  font-weight: 700;
}

.box-image-section {
  position: relative;
  overflow: hidden;
}
.image-section_discount {
  position: absolute;
  bottom: 0rem;
  left: -3.5rem;
  background-color: var(--orange);
  margin: 0 3rem;
  font-size: 2rem;
  clip-path: polygon(0 0, 75% 0, 80% 10%, 100% 100%, 0 100%);
  border-radius: 1rem;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
}

.template-img:hover {
  transform: scale(1.2);
}

footer {
  background-color: var(--surface-dark);
  display: flex;
  justify-content: space-around;
  margin-top: 5rem;
}

.footer-section {
  position: relative;
  display: flex;
  padding: 2rem 1rem;
  margin: 2rem 3rem;
}

.footer-section-left {
  color: var(--orange);
  font-size: 3rem;
}
.section-right_up {
  font-size: 3rem;
  color: var(--text-primary);
}

.section-right_bottom {
  font-size: 1.5rem;
  color: var(--text-secondary);
}
