/* ―――――― [ SCHRIFTARTEN ] ―――――― */
@charset "UTF-8";

:root {
  --background1: #ffffff;
  --background2: #f5f5f5;
  --background3: #ebebeb;

  --body: var(--background3);
  --text: #323433;
  --grau: #a3a5ac1e;

  --accent1: #ddc3aa;
  --accent2: #7f5839;
  --accent3: #aa8771;
  --accent4: #462b1a;

  --scrollbar-bg: var(--background3);
  --scrollbar-thumb: var(--accent4);
}

/* ―――――― [ RESET ] ―――――― */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
  transition:
    background 0.6s ease,
    color 0.6s ease,
    filter 0.6s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--body);
  font: 13pt Calibri;
  color: var(--text);
  margin: 0px auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
  transition:
    background 0.6s ease,
    color 0.6s ease,
    filter 0.6s ease;
}

::selection {
  color: var(--text);
  background-color: var(--accent4);
}

a {
  text-decoration: none;
  transition: all 0.5s ease-in-out;
}

p {
  margin: 0 auto 20px;
}

.left {
  float: left;
}

.right {
  float: right;
}

.spacer {
  clear: both;
}

b,
strong {
  color: var(--accent3);
  font-weight: 700;
  letter-spacing: 0.01em;
}

i,
em {
  color: var(--accent2);
  font-style: italic;
}

u {
  text-decoration: none;
  position: relative;
  text-underline-offset: 0.2em;
}

u::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.12em;
  background: color-mix(in oklab, var(--accent4) 70%, transparent);
  transform: translateY(0.02em);
}

/* LAYOUT
--------------------------------------------------- */
#container {
  margin: 0 auto;
  max-width: 1300px;
  display: grid;
  flex-wrap: wrap;
  height: 100%;
  align-items: start;
}

/* SIDEBAR
----------------------------------------------------- */
#sidebar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: min(1300px, calc(100% - 32px));
}

.header-container {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 24px;
  border-top: 1px dashed rgba(95, 117, 129, 0.22);
  border-bottom: 1px dashed rgba(95, 117, 129, 0.22);
  background: var(--background3);
}

.header-left {
  flex: 0 0 auto;
  min-width: max-content;
}

#sidebar h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;

  background: linear-gradient(180deg,
      var(--accent1) 0%,
      var(--accent4) 100%);

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#sidebar h2 {
  margin: 8px 0 0;
  padding: 0;
  color: var(--accent2);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 400;
}

#sidebar h2 b {
  font-weight: 700;
}

.filter-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 170px;
}

.search-wrapper span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-52%);
  color: var(--accent2);
  font-size: 20px;
  pointer-events: none;
}

#search {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid rgba(95, 117, 129, 0.18);
  outline: none;
  background: #fff;
  color: var(--accent2);
  font: inherit;
  transition: 0.2s ease;
}

#search::placeholder {
  color: #9b9994;
}

#search:focus {
  border-color: var(--accent1);
  box-shadow: 0 0 0 3px rgba(164, 113, 74, 0.12);
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-buttons button {
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(164, 113, 74, 0.25);
  background: #fff;
  color: var(--accent2);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: 0.2s ease;
}

.filter-buttons button:hover,
.filter-buttons button:active {
  background: var(--accent1);
  border-color: var(--accent1);
  color: #fff;
  transform: translateY(-1px);
}

.filter-buttons .reset-button {
  background: var(--accent1);
  color: #fff;
}

/* FOOTER
----------------------------------------------------- */
#footer {
  padding: 14px 20px;
  margin: 12px auto 0;
  max-width: 1200px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 8pt;
  color: #5f7581;
  border-top: 1px dashed rgba(95, 117, 129, 0.22);
  background: transparent;
}

#footer a {
  text-decoration: none;
  margin: 10px 2px;
  padding: 5px;
  border: 1px solid rgba(164, 113, 74, 0.25);
  background: #fff;
  color: var(--accent2);
}

#footer a:hover {
  background: var(--accent1);
  color: #fff;
}

/* CONTENT
----------------------------------------------------- */
#content {
  flex: 1;
  padding: 20px;
  box-sizing: border-box;
  margin-top: 80px;
  overflow-y: auto;
  scrollbar-width: thin;
}

#content #box {
  clear: both;
  padding: 20px;
  box-sizing: border-box;
  max-width: 100%;
}

/* —————————— < GALLERIE > —————————— */
#games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.card {
  border: 1px solid var(--background3);
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-rows: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-content: space-between;
  align-items: center;
  outline: 10px solid var(--background2);
}

.img {
  padding: 8px;
  min-width: 0;
  box-sizing: border-box;
}

.img .img-item {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 90px;
  object-fit: cover;
  box-sizing: border-box;
  outline: 5px solid var(--background2);
}

.title {
  text-align: center;
  font-size: 13pt;
  color: var(--accent2);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: lighter;
}

.meta {
  padding: 10px 10px 8px 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.meta-actions .count,
.meta-actions .exp {
  background: #a3a5ac;
  color: var(--background1);
  padding: 4px 9px;
}

.meta-actions .players {
  background: var(--accent2);
  color: var(--background1);
  padding: 4px 9px;
}

.meta-actions {
  grid-column: 1 / -1;
  padding: 8px 10px 10px 10px;
  border-top: 1px solid #eee;
  font-size: 10pt;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  text-align: right;
}


#pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 25px;
  padding: 10px 0;
}

#pagination button {
  border: 0;
  background: var(--background3);
  color: var(--accent3);
  min-width: 35px;
  height: 35px;
  padding: 0 10px;
  cursor: pointer;
  font-weight: bold;
}

#pagination button:hover {
  background: var(--accent2);
  color: white;
}

#pagination button.active {
  background: var(--accent3);
  color: var(--background3);
}

#pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

#pagination button:disabled:hover {
  background: var(--background3);
  color: var(--accent3);
}

/* Mobile Anpassungen ab einem bestimmten Breakpoint */
@media (max-width: 768px) {

  /* Container anpassen, um volle Breite zu nutzen */
  #container {
    padding: 0 10px;
  }

  #content {
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
    margin-top: 210px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  #sidebar {
    top: 0;
    width: calc(100% - 20px);
  }

  .header-container {
    display: block;
    padding: 17px 16px 15px;
  }

  .header-left {
    text-align: center;
  }

  #sidebar h1 {
    font-size: 24px;
    letter-spacing: 1.5px;
  }

  #sidebar h2 {
    margin-top: 7px;
    font-size: 9px;
    letter-spacing: 1px;
  }

  .filter-area {
    display: block;
    margin-top: 15px;
  }

  .search-wrapper {
    width: 100%;
  }

  #search {
    height: 44px;
    font-size: 14px;
  }

  .filter-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 9px;
  }

  .filter-buttons button {
    width: 100%;
    height: 40px;
    padding: 0 5px;
    font-size: 11px;
  }

  /* Gallerie anpassen, damit Karten untereinander stehen */
  #games {
    grid-template-columns: 1fr;
    /* nur eine Spalte */
    gap: 20px;
    /* weniger Abstand */
  }

  .card {
    grid-template-columns: 1fr;
    /* Inhalte untereinander */
    padding: 5%;
  }

  .img {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
  }

  .img-item {
    height: 80px;
    /* kleinere Bilder */
  }

  .title {
    font-size: 12pt;
    text-align: center;
  }

  /* Footer anpassen */
  #footer {
    font-size: 10pt;
  }

  #pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
    /* eventuell anpassen */
    padding: 8px 0;
    /* eventuell anpassen */
  }

  #pagination button {
    border: 0;
    background: var(--background3);
    color: var(--accent3);
    min-width: 30px;
    /* kleineres Minimum für kleinere Bildschirme */
    height: 30px;
    /* kleinere Höhe */
    padding: 0 8px;
    /* geringeres Padding */
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    /* ggf. Schriftgröße anpassen */
  }

  #pagination button:hover {
    background: var(--accent2);
    color: white;
  }

  #pagination button.active {
    background: var(--accent3);
    color: var(--background3);
  }

  #pagination button:disabled {
    opacity: 0.4;
    cursor: default;
  }

  #pagination button:disabled:hover {
    background: var(--background3);
    color: var(--accent3);
  }
}