      /* =========================
   FONT
========================= */

@font-face{
  font-family:"GameGlyph";
  src:url("./fonts/gamefont.woff2") format("woff2");
}

/* =========================
   RESET
========================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  background:#050816;
  color:white;
  overflow:hidden;
  font-family:"GameGlyph",Arial,sans-serif;
  height:100vh;
}

/* =========================
   ANIMATED BACKGROUND
========================= */

.bg{
  position:fixed;
  inset:0;
  overflow:hidden;
  z-index:-1;

  background:
  radial-gradient(circle at top,#3a61fc,#000413 60%);
}

.icon{
  position:absolute;
  color:rgba(255,255,255,.08);
  user-select:none;

  animation:floatUp linear infinite;

  text-shadow:
  0 0 12px rgba(255,255,255,.4);
}

@keyframes floatUp{

  0%{
    transform:
    translateY(100vh)
    rotate(0deg);

    opacity:0;
  }

  10%{
    opacity:1;
  }

  100%{
    transform:
    translateY(-20vh)
    rotate(360deg);

    opacity:0;
  }
}

/* =========================
   HEADER
========================= */

header{
  padding:18px;
  backdrop-filter:blur(14px);

  background:
  rgba(0,0,0,.35);

  border-bottom:
  1px solid rgba(255,255,255,.06);

  position:sticky;
  top:0;
  z-index:10;
}

/* =========================
   TOP BAR
========================= */

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.logo{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo span{
  font-size:28px;
  color:#63d8ff;

  animation:pulse 2s infinite;
}

.logo h1{
  font-size:24px;
  letter-spacing:2px;
}

@keyframes pulse{

  0%,100%{
    transform:scale(1);
  }

  50%{
    transform:scale(1.15);
  }
}

/* =========================
   FAVORITES BUTTON
========================= */

.favorite-toggle{
  border:none;
  background:#2f3d61;

  color:white;

  padding:10px 14px;

  border-radius:14px;

  cursor:pointer;

  transition:.2s;
}

.favorite-toggle:hover{
  background:#3e5896;
}

/* =========================
   SEARCH
========================= */

.search-bar input{
  width:100%;

  padding:14px 16px;

  border:none;
  outline:none;

  border-radius:16px;

  background:
  rgba(255,255,255,.08);

  color:white;

  border:
  1px solid rgba(255,255,255,.06);

  font-size:15px;
}

.search-bar input::placeholder{
  color:#aaa;
}

/* =========================
   GRID
========================= */

.grid{
  display:grid;

  grid-template-columns:
  repeat(auto-fit,minmax(160px,1fr));

  gap:16px;

  padding:18px;

  overflow-y:auto;

  height:calc(100vh - 130px);
}

/* =========================
   CARD
========================= */

.card{
  position:relative;

  overflow:hidden;

  border-radius:20px;

  background:
  linear-gradient(
  145deg,
  rgba(255,255,255,.08),
  rgba(255,255,255,.02)
  );

  border:
  1px solid rgba(255,255,255,.08);

  backdrop-filter:blur(12px);

  display:flex;
  flex-direction:column;

  min-height:240px;

  cursor:pointer;

  transition:
  transform .25s,
  box-shadow .25s;
}

/* =========================
   HOVER GLOW
========================= */

.card::before{

  content:"";

  position:absolute;
  inset:-2px;

  background:
  linear-gradient(
  45deg,
  #00c6ff,
  #6f00ff,
  #00c6ff
  );

  z-index:-1;

  opacity:0;

  transition:.3s;

  filter:blur(20px);
}

.card:hover{

  transform:
  translateY(-6px)
  scale(1.02);

  box-shadow:
  0 0 30px rgba(0,180,255,.18);
}

.card:hover::before{
  opacity:.55;
}

/* =========================
   IMAGE
========================= */

.card img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
}

/* =========================
   CONTENT
========================= */

.content{
  padding:12px;

  display:flex;
  flex-direction:column;

  flex:1;
}

.content h3{
  font-size:15px;
  margin-bottom:6px;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.genre{
  font-size:12px;
  color:#74d8ff;

  margin-bottom:12px;
}

/* =========================
   BUTTONS
========================= */

.buttons{

  margin-top:auto;

  display:grid;

  grid-template-columns:1fr 1fr 42px;

  gap:8px;
}

.btn{

  border:none;

  border-radius:12px;

  padding:10px 6px;

  color:white;

  font-size:11px;
  font-weight:bold;

  cursor:pointer;

  transition:.2s;

  white-space:nowrap;
}

.play{
  background:#0ea5e9;
}

.play:hover{
  background:#38bdf8;
}

.open{
  background:#7c3aed;
}

.open:hover{
  background:#9f67ff;
}

/* FAVORITE */

.favorite{
  background:#182947;
}

.favorite.active{
  background:#ff4f87;
}

/* =========================
   MODAL
========================= */

.modal{

  position:fixed;
  inset:0;

  background:
  rgba(0,0,0,.8);

  display:none;

  align-items:center;
  justify-content:center;

  padding:20px;

  z-index:100;
}

/* =========================
   VIEWER
========================= */

.viewer{

  width:96%;
  height:92%;

  border-radius:24px;

  overflow:hidden;

  position:relative;

  background:black;

  border:
  2px solid rgba(255,255,255,.1);
}

iframe{
  width:100%;
  height:100%;
  border:none;
}

/* =========================
   VIEWER CONTROLS
========================= */

.viewer-controls{

  position:absolute;

  top:12px;
  right:12px;

  display:flex;
  gap:10px;

  z-index:10;
}

.control-btn{

  width:44px;
  height:44px;

  border:none;

  border-radius:50%;

  cursor:pointer;

  font-size:18px;

  color:white;

  backdrop-filter:blur(10px);
}

.close-btn{
  background:#ff426f;
}

.fullscreen-btn{
  background:#1967ff;
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar{
  width:10px;
}

::-webkit-scrollbar-thumb{
  background:#20324f;
  border-radius:20px;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:700px){

  .grid{
    grid-template-columns:
    repeat(2,1fr);

    gap:12px;
    padding:12px;
  }

  .card{
    min-height:210px;
  }

  .buttons{
    grid-template-columns:1fr 1fr 36px;
  }

  .btn{
    font-size:10px;
    padding:8px 4px;
  }

}
