/* Moderne, serverseitig begrenzte Spielstatistiken */

.statistics-layout {
  align-items: start;
}

.statistics-content {
  min-width: 0;
}

.statistics-content > * + * {
  margin-top: 24px;
}

.statistics-heading {
  display: grid;
  min-height: 190px;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 26px 30px;
  border-bottom: 1px solid var(--cream-400);
}

.statistics-heading-icon {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border: 1px solid var(--cream-400);
  border-radius: 24px;
  color: var(--green-800);
  background:
    radial-gradient(circle at 32% 22%, rgb(255 255 255 / 78%), transparent 34%),
    linear-gradient(145deg, #fffdf4, #ece5c9);
  box-shadow: inset 0 1px #fff, 0 7px 17px rgb(40 54 36 / 14%);
}

.statistics-heading-icon svg {
  width: 68px;
  height: 68px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.statistics-eyebrow,
.statistics-section-heading p {
  margin: 0 0 6px;
  color: #9a6812;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.statistics-heading h1 {
  margin: 0;
  color: var(--green-950);
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 5vw, 3.85rem);
  line-height: 1;
}

.statistics-heading p:last-child {
  max-width: 780px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.55;
}

.statistics-note,
.statistics-section,
.statistics-panel,
.statistics-definition-grid article,
.statistics-error {
  border: 1px solid var(--cream-400);
  border-radius: 13px;
  background: rgb(255 254 249 / 90%);
  box-shadow: 0 4px 14px rgb(38 49 34 / 8%);
}

.statistics-note {
  padding: 20px 24px;
  border-left: 5px solid var(--gold);
}

.statistics-note h2,
.statistics-panel h3,
.statistics-definition-grid h2 {
  margin: 0;
  color: var(--green-950);
  font-family: var(--font-display);
}

.statistics-note p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.statistics-note a {
  display: inline-flex;
  margin-top: 11px;
  color: var(--green-800);
  font-weight: 800;
}

.statistics-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  padding: 17px 20px;
  border: 1px solid var(--cream-400);
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f3dd, #fffdf7);
}

.statistics-filter > div {
  display: grid;
  gap: 6px;
}

.statistics-filter label {
  color: var(--green-950);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.statistics-filter select,
.statistics-filter button {
  min-height: 43px;
  border: 1px solid rgb(7 91 46 / 28%);
  border-radius: 8px;
  font: inherit;
}

.statistics-filter select {
  min-width: 150px;
  padding: 7px 38px 7px 12px;
  color: var(--green-950);
  background: #fff;
}

.statistics-filter button {
  padding: 8px 18px;
  color: #fff;
  background: linear-gradient(105deg, var(--green-800), var(--green-700));
  box-shadow: inset 0 1px rgb(255 255 255 / 24%);
  cursor: pointer;
  font-weight: 800;
}

.statistics-filter button:hover {
  background: var(--green-900);
}

.statistics-section {
  overflow: hidden;
}

.statistics-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--cream-400);
  background: linear-gradient(145deg, rgb(255 255 255 / 85%), rgb(247 242 222 / 75%));
}

.statistics-section-heading h2 {
  margin: 0;
  color: var(--green-950);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.statistics-section-heading > span {
  color: var(--muted);
  font-size: 0.9rem;
}

.statistics-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-color: var(--green-700) var(--cream-200);
}

.statistics-table {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.92rem;
}

.statistics-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.statistics-table th,
.statistics-table td {
  padding: 12px 13px;
  border-right: 1px solid rgb(218 209 176 / 55%);
  border-bottom: 1px solid var(--cream-300);
  text-align: right;
  vertical-align: middle;
}

.statistics-table th:first-child,
.statistics-table td:first-child {
  text-align: left;
}

.statistics-table tr > :last-child {
  border-right: 0;
}

.statistics-table thead th {
  color: var(--green-950);
  background: #eee9d3;
  font-weight: 800;
  white-space: nowrap;
}

.statistics-table thead tr:first-child th:not(:first-child) {
  border-bottom-color: #d4c79c;
  color: #fff;
  background: var(--green-800);
  text-align: center;
}

.statistics-table tbody tr:nth-child(even) {
  background: rgb(247 244 232 / 68%);
}

.statistics-table tbody tr:hover {
  background: #fff9df;
}

.statistics-table tfoot th,
.statistics-table tfoot td {
  color: var(--green-950);
  background: #f0e2ae;
  font-weight: 800;
}

.statistics-table small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.statistics-table--months {
  min-width: 1120px;
  font-size: 0.82rem;
}

.statistics-table--usage {
  min-width: 870px;
}

.statistics-table--usage th:first-child {
  min-width: 150px;
}

.statistics-table--login td:first-child {
  width: 76px;
  color: #9a6812;
  font-size: 1.1rem;
  font-weight: 900;
}

.statistics-table--login td:last-child {
  color: var(--green-800);
  font-size: 1.13rem;
}

.statistics-new {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: #a4261c;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.statistics-explanation,
.statistics-scroll-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.statistics-explanation {
  padding: 10px 20px 15px;
}

.statistics-scroll-hint {
  padding: 10px 16px;
  border-bottom: 1px solid var(--cream-300);
  background: #fffdf5;
}

.statistics-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.statistics-panel {
  min-width: 0;
  overflow: hidden;
}

.statistics-panel h3 {
  padding: 17px 19px;
  border-bottom: 1px solid var(--cream-400);
  font-size: 1.35rem;
}

.statistics-table--compact th,
.statistics-table--compact td {
  padding: 10px;
}

.statistics-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 20px;
}

.statistics-chart-grid figure {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--cream-300);
  border-radius: 10px;
  background: #fff;
}

.statistics-chart-grid figure:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.statistics-chart-grid img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}

.statistics-chart-grid figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.statistics-definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.statistics-definition-grid article {
  padding: 18px;
}

.statistics-definition-grid h2 {
  font-size: 1.15rem;
}

.statistics-definition-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.statistics-error {
  padding: 18px 21px;
  border-color: #d99a92;
  border-left: 5px solid #b33a2e;
  background: #fff5f2;
}

.statistics-error h2 {
  margin: 0;
  color: #80291f;
  font-size: 1.1rem;
}

.statistics-error p,
.statistics-empty {
  margin: 7px 0 0;
  color: var(--muted);
}

.statistics-empty {
  padding: 24px;
  text-align: center;
}

.statistics-muted {
  color: var(--muted);
}

@media (max-width: 1120px) {
  .statistics-heading {
    grid-template-columns: 100px minmax(0, 1fr);
    min-height: 160px;
    gap: 20px;
  }

  .statistics-heading-icon {
    width: 92px;
    height: 92px;
  }

  .statistics-heading-icon svg {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 820px) {
  .statistics-day-grid,
  .statistics-definition-grid {
    grid-template-columns: 1fr;
  }

  .statistics-chart-grid {
    grid-template-columns: 1fr;
  }

  .statistics-chart-grid figure:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .statistics-content > * + * {
    margin-top: 18px;
  }

  .statistics-heading {
    grid-template-columns: 66px minmax(0, 1fr);
    min-height: 128px;
    gap: 14px;
    padding: 19px 15px;
  }

  .statistics-heading-icon {
    width: 62px;
    height: 62px;
    border-radius: 15px;
  }

  .statistics-heading-icon svg {
    width: 38px;
    height: 38px;
  }

  .statistics-heading h1 {
    font-size: clamp(1.72rem, 9vw, 2.3rem);
  }

  .statistics-heading p:last-child {
    font-size: 0.94rem;
  }

  .statistics-note,
  .statistics-definition-grid article {
    padding: 16px;
  }

  .statistics-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  .statistics-filter select {
    width: 100%;
    min-width: 0;
  }

  .statistics-filter button {
    grid-column: 1 / -1;
  }

  .statistics-section-heading {
    align-items: start;
    flex-direction: column;
    padding: 16px;
  }

  .statistics-table {
    font-size: 0.84rem;
  }

  .statistics-table th,
  .statistics-table td {
    padding: 10px;
  }

  .statistics-chart-grid {
    padding: 14px;
  }
}
