/* =========================================================
   CBRA SYSTEMS - GENRE GRID
   Responsive from 676 × 384 to large desktop
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;

  width: 100%;
  min-height: 100%;

  background: #111;
  color: #fff;

  font-family: 'Roboto', Arial, sans-serif;
}


/* =========================================================
   MAIN GRID
   Default CBRA layout:
   6 columns × 4 rows
   ========================================================= */

.genre-grid {
  width: 100%;
  height: 100vh;
  min-height: 384px;

  display: grid;

  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  grid-template-rows:
    repeat(4, minmax(0, 1fr));

  gap: 6px;

  padding: 7px;

  overflow: hidden;
}


/* =========================================================
   GENRE CARD
   ========================================================= */

.genre {
  position: relative;

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

  min-width: 0;
  min-height: 0;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.045),
      rgba(255,255,255,0.015)
    );

  border:
    1px solid rgba(255,255,255,0.08);

  border-radius: 3px;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}


/* =========================================================
   LINK
   Entire card is clickable
   ========================================================= */

.genre a {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;

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

  gap: 4px;

  padding: 3px;

  overflow: hidden;

  color: #fff;
  text-decoration: none;

  outline: none;
}


/* =========================================================
   IMAGE
   ========================================================= */

.genre img {
  display: block;

  width: auto;
  height: auto;

  max-width: 64px;
  max-height: 52px;

  object-fit: contain;

  user-select: none;

  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}


/* =========================================================
   LABEL
   ========================================================= */

.genre label {
  display: block;

  width: 100%;

  margin: 0;
  padding: 0;

  font-family: 'Electrolize', sans-serif;

  font-size: 9px;
  line-height: 1.05;

  font-weight: 400;

  text-align: center;

  color: rgba(255,255,255,0.92);

  white-space: normal;

  cursor: pointer;

  user-select: none;
}


/* =========================================================
   HOVER
   Only devices with a real mouse
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

  .genre:hover {
    z-index: 2;

    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,0.10),
        rgba(255,255,255,0.035)
      );

    border-color:
      rgba(255,255,255,0.28);

    transform:
      translateY(-2px);

    box-shadow:
      0 5px 14px
      rgba(0,0,0,0.35);
  }


  .genre:hover img {
    transform:
      scale(1.08);
  }


  .genre:hover label {
    color: #fff;
  }

}


/* =========================================================
   KEYBOARD FOCUS
   ========================================================= */

.genre a:focus-visible {
  box-shadow:
    inset 0 0 0 2px
    rgba(255,255,255,0.8);
}


/* =========================================================
   CBRA 676 × 384
   ========================================================= */

@media
(max-width: 700px)
and (min-width: 521px) {

  .genre-grid {
    height: 100vh;

    grid-template-columns:
      repeat(6, minmax(0, 1fr));

    grid-template-rows:
      repeat(4, minmax(0, 1fr));

    gap: 5px;

    padding: 6px;
  }


  .genre a {
    gap: 3px;
    padding: 2px;
  }


  .genre img {
    max-width: 58px;
    max-height: 48px;
  }


  .genre label {
    font-size: 8.5px;
  }

}


/* =========================================================
   MEDIUM SCREEN
   701 - 999px
   6 columns × 4 rows,
   but larger cards
   ========================================================= */

@media
(min-width: 701px)
and (max-width: 999px) {

  .genre-grid {
    height: auto;
    min-height: 100vh;

    grid-template-columns:
      repeat(6, minmax(90px, 1fr));

    grid-template-rows:
      repeat(4, minmax(115px, 1fr));

    gap: 9px;

    padding: 12px;
  }


  .genre a {
    gap: 7px;
    padding: 7px;
  }


  .genre img {
    max-width: 76px;
    max-height: 68px;
  }


  .genre label {
    font-size: 11px;
  }

}


/* =========================================================
   DESKTOP
   8 columns × 3 rows
   ========================================================= */

@media
(min-width: 1000px)
and (max-width: 1499px) {

  body {
    display: flex;
    justify-content: center;
  }


  .genre-grid {
    width: 100%;
    max-width: 1380px;

    height: auto;
    min-height: 100vh;

    grid-template-columns:
      repeat(8, minmax(100px, 1fr));

    grid-template-rows:
      repeat(3, minmax(150px, 1fr));

    gap: 14px;

    padding: 24px;
  }


  .genre {
    border-radius: 5px;
  }


  .genre a {
    gap: 9px;
    padding: 12px;
  }


  .genre img {
    max-width: 96px;
    max-height: 88px;
  }


  .genre label {
    font-size: 12px;
  }

}


/* =========================================================
   LARGE DESKTOP
   12 columns × 2 rows
   ========================================================= */

@media (min-width: 1500px) {

  body {
    display: flex;
    justify-content: center;
    align-items: center;
  }


  .genre-grid {
    width: 100%;

    max-width: 1800px;

    height: auto;
    min-height: auto;

    grid-template-columns:
      repeat(12, minmax(105px, 1fr));

    grid-template-rows:
      repeat(2, minmax(175px, 1fr));

    gap: 16px;

    padding: 32px;
  }


  .genre {
    border-radius: 6px;
  }


  .genre a {
    gap: 11px;

    padding: 15px;
  }


  .genre img {
    max-width: 112px;
    max-height: 100px;
  }


  .genre label {
    font-size: 13px;
  }

}


/* =========================================================
   MOBILE
   3 columns
   ========================================================= */

@media (max-width: 520px) {

  html,
  body {
    min-height: 100%;
  }


  .genre-grid {
    height: auto;
    min-height: 100vh;

    grid-template-columns:
      repeat(3, minmax(0, 1fr));

    grid-template-rows: none;

    gap: 6px;

    padding: 7px;

    overflow: visible;
  }


  .genre {
    min-height: 93px;
  }


  .genre a {
    gap: 5px;

    padding: 5px;
  }


  .genre img {
    max-width: 60px;
    max-height: 52px;
  }


  .genre label {
    font-size: 9px;
  }

}


/* =========================================================
   VERY SMALL MOBILE
   2 columns
   ========================================================= */

@media (max-width: 340px) {

  .genre-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


  .genre {
    min-height: 105px;
  }


  .genre img {
    max-width: 65px;
    max-height: 58px;
  }


  .genre label {
    font-size: 10px;
  }

}