:root {
    /* Theme Variables */
    --background-color: rgb(31, 31, 31);
    --main-text-color: white;
    --main-font: main-font;
}

/* ===================== */
/* Fonts */
/* ===================== */

@font-face {
    font-family: dimis;
    src: url('../fonts/DIMIS.TTF');
}

@font-face {
    font-family: thebold;
    src: url('../fonts/THEBOLD.ttf');
}

@font-face {
    font-family: cubic;
    src: url('../fonts/CUBIC.ttf'),
}

@font-face {
    font-family: bebas;
    src: url('../fonts/BEBAS.ttf'),
}

/* ===================== */
/* Global Styles */
/* ===================== */

* {
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--main-text-color);
    font-family: thebold;
    margin: 0;
}

body::-webkit-scrollbar {
  display: none;
}


/* ===================== */
/* Grid Layout */
/* ===================== */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
}

/* ===================== */
/* Tiles */
/* ===================== */

.tile {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 10px;
}

.tile img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tile .title {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 23px 11px;
    height: 25px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.568));
    color: white;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ===================== */
/* Tile Hover Effects */
/* ===================== */

.tile:hover .thumb {
    opacity: 1;
}

.tile:hover img {
    transform: scale(1.05);
}

.tile:hover .title {
    opacity: 1;
}

/* ===================== */
/* Recently Played       */
/* ===================== */

.recent-wrapper {
  margin: 20px 0;
  margin-left: 20px;
  color: white;
}

.recent-wrapper h2 {
  margin-left: 10px;
  font-size: 22px;
  opacity: 0.8;
}

.recent-grid {
  display: flex;
  gap: 10px;
  padding: 10px;
  margin-top: -15px;
  overflow-x: auto;
}

.recent-tile {
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  transition: transform 0.2s;
}

.recent-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-tile:hover {
  transform: scale(1.1);
}

.no-recent {
  opacity: 0.6;
  padding: 10px;
  font-size: 14px;
}

/* ===================== */
/* Filters               */
/* ===================== */
.filters-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  width: calc(100% - 50px);
  padding: 5px 0;
  margin-left: auto;
  margin-right: auto;
}



.filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;

  flex: 1;
  padding: 10px;


  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 40px,
    black calc(100% - 100px),
    transparent
  );

  mask-image: linear-gradient(
    to right,
    transparent,
    black 40px,
    black calc(100% - 100px),
    transparent
  );

  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(30,30,30,0.85);
  color: white;
  cursor: pointer;
  white-space: nowrap;
}

.filter-btn.active {
  background: #00bfff;
  color: black;
}

.filter-btn:hover {
  background: #333333;
  color: rgb(255, 255, 255);
}

/* scroll arrows */
.scroll-btn {
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;

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

  position: absolute;
  z-index: 10;

  opacity: 0;
  transform: translateY(0) scale(0.85);
  pointer-events: none;

  transition: opacity 0.25s ease, transform 0.25s ease;
}

.scroll-btn.left {
  left: 0;
}

.scroll-btn.right {
  right: 0;
}


.scroll-btn.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.scroll-btn:hover {
  transform: scale(1.05);
  border: ridge rgb(56, 56, 56) 1px;
}
.thumb-wrapper {
  position: relative;
}

.badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #000000;
  color: white;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 6px;
  font-weight: bold;
  pointer-events: none;
}
/* ===================== */
/* Search UI             */
/* ===================== */

.search-category {
  font-size: 11px;
  opacity: 0.5;
  padding: 6px 15px;
}

.search-item[data-tag] {
  color: #ffffff;
  font-weight: 600;
}

.no-results, #resultsTitle {
  margin-left: 20px;
}

.no-results {
 padding: 20px;
}
