/* REMOVE BLUE TAP HIGHLIGHT */

*{
  -webkit-tap-highlight-color: transparent;
}

/* REMOVE BUTTON OUTLINES */

button,
input,
textarea,
select,
a{
  outline:none;
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Arial, Helvetica, sans-serif;
}

body{
  background:#f4f5f7;
  color:#111;
  padding:18px;
}

/* TOP */

.top{

  display:flex;

  align-items:center;

  gap:16px;

  margin-bottom:22px;
}

/* SEARCH AREA */

.search-area{
  flex:1;
}

/* SEARCH BOX */

.search-box{
  position:relative;
}

.search-box input{

  width:100%;

  border:none;

  background:white;

  padding:14px 20px;

  padding-left:48px;

  border-radius:24px;

  font-size:12px;

  outline:none;

  box-shadow:
    0 6px 20px rgba(0,0,0,0.04);

  transition:0.25s ease;
}

/* SEARCH FOCUS */

.search-box input:focus{

  transform:scale(1.01);

  box-shadow:
    0 10px 30px rgba(0,0,0,0.08);
}

/* SEARCH ICON */

.search-box::before{

  content:"⌕";

  position:absolute;

  left:20px;
  top:46%;

  transform:translateY(-50%);

  font-size:20px;

  color:#777;
}

/* TAGS */

.tags{
  display:flex;
  gap:12px;

  overflow:auto;

  margin-bottom:26px;
}

.tag{
  background:white;

  padding:12px 16px;

  border-radius:16px;

  min-width:max-content;
}

/* TITLE */

.section-title{
  margin-bottom:18px;
}

/* GAMES */

..games{
  gap:16px;
  padding-bottom:30px;
}

.card{
  background:white;

  border-radius:24px;

  overflow:hidden;
}

.card img{
  width:100%;
  height:160px;

  object-fit:cover;
}

.content{
  padding:14px;
}

.content h3{
  margin-bottom:8px;
}

.content p{
  color:#666;

  font-size:14px;

  line-height:1.5;

  margin-bottom:12px;
}

.game-tags{
  display:flex;
  flex-wrap:wrap;

  gap:8px;
}

.game-tags span{
  background:#eceef3;

  padding:7px 10px;

  border-radius:10px;

  font-size:12px;
}

/* MOBILE */

@media(max-width:700px){

  .games{
    grid-template-columns:1fr;
  }

}

/* VIEW SWITCH */

.view-switch{
  display:flex;
  gap:10px;

  margin-bottom:18px;
}

.view-switch button{
  border:none;

  background:white;

  padding:12px 18px;

  border-radius:14px;

  font-size:14px;
}

.active-view{
  background:#111 !important;
  color:white;
}

/* GRID MODE */

.games.grid-view{
  display:grid;
  grid-template-columns:1fr 1fr;
}

/* LIST MODE */

.games.list-view{
  display:flex;
  flex-direction:column;
}

/* LIST CARD */

.games.list-view .card{
  display:flex;
  align-items:center;
}

.games.list-view .card img{
  width:130px;
  height:130px;
}

.games.list-view .content{
  flex:1;
}

/* MOBILE */

@media(max-width:700px){

  .games.grid-view{
    grid-template-columns:1fr;
  }

}

/* GAMES */

.games{
  display:grid;
  gap:16px;

  padding-bottom:30px;
}

/* GRID MODE */

.games.grid-view{
  grid-template-columns:1fr 1fr;
}

/* LIST MODE */

.games.list-view{
  grid-template-columns:1fr;
}

/* CARD */

.card{
  background:white;

  border-radius:24px;

  overflow:hidden;
}

/* GRID CARD IMAGE */

.games.grid-view .card img{
  width:100%;
  height:150px;

  object-fit:cover;
}

/* LIST CARD */

.games.list-view .card{
  display:flex;
  align-items:center;
}

/* LIST IMAGE */

.games.list-view .card img{
  width:130px;
  height:130px;

  object-fit:cover;
}

/* CONTENT */

.content{
  padding:14px;
  flex:1;
}

.content h3{
  margin-bottom:8px;
}

.content p{
  color:#666;

  font-size:14px;

  line-height:1.5;

  margin-bottom:12px;
}

/* TAGS */

.game-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.game-tags span{
  background:#eceef3;

  padding:7px 10px;

  border-radius:10px;

  font-size:12px;
}

/* MOBILE */

@media(max-width:700px){

  .games.grid-view{
    grid-template-columns:1fr 1fr;
  }

}

.active-tag {
  background: white;
  color: black;
}

.card {
  transition: 0.3s ease;
  cursor: pointer;
}

.card.open {
  transform: scale(1.03);
}

.card.open .content p,
.card.open .game-tags {
  display: block;
}

/* FULLSCREEN GAME PAGE */

.game-page{
  position:fixed;

  inset:0;

  background:inherit;

  z-index:999;

  overflow:auto;

  padding:18px;

  transform:translateX(100%);

  transition:0.35s ease;
}

.show-page{
  transform:translateX(0);
}

.game-page-content{
  max-width:900px;
  margin:auto;
}

#closePage{
  border:none;

  background:#111;
  color:white;

  padding:12px 18px;

  border-radius:14px;

  margin-bottom:20px;

  cursor:pointer;
}

.full-game{
  background:white;

  border-radius:30px;

  overflow:hidden;
}

.full-game img{
  width:100%;
  height:320px;

  object-fit:cover;
}

.full-content{
  padding:22px;
}

.full-content h1{
  margin-bottom:14px;
}

.full-content p{
  color:#666;

  line-height:1.7;

  margin-bottom:18px;
}

.download-btn{
  width:100%;

  border:none;

  background:#111;
  color:white;

  padding:15px;

  border-radius:16px;

  margin-top:20px;

  font-size:16px;

  cursor:pointer;
}

/* FILTER BUTTONS */

.filter-tags{
  display:flex;

  gap:10px;

  overflow:auto;

  padding-bottom:4px;
}

.filter-tags::-webkit-scrollbar{
  display:none;
}

.filter-btn{

  border:none;

  background:white;

  padding:12px 16px;

  border-radius:16px;

  font-size:13px;

  cursor:pointer;

  min-width:max-content;

  transition:0.25s ease;
}

.active-filter{
  background:#111;
  color:white;
}

/* THEME TOGGLE */

#themeToggle{

  width:52px;
  height:52px;

  border:none;

  background:white;

  border-radius:18px;

  display:flex;

  justify-content:center;
  align-items:center;

  cursor:pointer;

  flex-shrink:0;

  box-shadow:
    0 6px 20px rgba(0,0,0,0.04);

  transition:0.25s ease;
}

#themeToggle:hover{
  transform:scale(1.05);
}

/* DARK MODE */

body.dark{

  background:#0f1115;

  color:white;
}

/* DARK CARDS */

body.dark .card,
body.dark .full-game,
body.dark .search-box input,
body.dark #themeToggle{

  background:#1a1d24;

  color:white;
}

/* DARK TEXT */

body.dark p{
  color:#a7acb5;
}

body.dark .game-tags span{
  background:#2a2f38;
  color:white;
}

body.dark .download-btn,
body.dark #closePage,
body.dark .active-view{

  background:white !important;
  color:#111;
}

/* SEARCH PLACEHOLDER */

body.dark input::placeholder{
  color:#8d94a0;
}

/* DARK VIEW BUTTONS */

body.dark .view-switch button{

  background:#1a1d24;

  color:white;
}

/* ACTIVE BUTTON */

body.dark .active-view{

  background:white !important;

  color:#111 !important;
}

/* BRAND */

.brand{

  display:flex;

  align-items:center;

  gap:10px;

  flex-shrink:0;
}

/* LOGO IMAGE */

.logo-img{

  width:102px;
  height:52px;

  object-fit:center;

  display:block;

  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    filter 0.35s ease;
}

/* LOGO TEXT */

.logo{

  font-size:15px;

  letter-spacing:2px;

  font-weight:700;

  white-space:nowrap;

  opacity:0.9;
}

/* DARK GAME PAGE */

body.dark .game-page{
  background:#0f1115;
}

/* DOWNLOAD LINK */

.download-btn{

  display:flex;

  justify-content:center;
  align-items:center;

  text-decoration:none;
}