/* bsc-gp.de — Billardtisch-Startseite + Impressum */

:root {
  --bg-room: #050a08;
  --felt: #0f3d28;
  --felt-mid: #145232;
  --felt-light: #1a6b3f;
  --rail-wood: #4a3220;
  --rail-dark: #2a1a10;
  --pocket: #030504;
  --ink: #e9e6dd;
  --ink-muted: #c4c0b4;
  --ink-faint: #a8a49a;
  --line: rgba(233, 230, 220, 0.14);
  --line-strong: rgba(233, 230, 220, 0.22);
  --link: #86c98f;
  --link-hover: #b5e0bb;
  --gold: #e0c058;
  --focus: #edd06a;
  --max: 72rem;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

::selection {
  background: rgba(134, 201, 143, 0.35);
  color: var(--ink);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-room);
  -webkit-font-smoothing: antialiased;
}

body.page-table {
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--bg-room);
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* —— Header —— */

.site-header {
  flex-shrink: 0;
  z-index: 50;
  background: rgba(5, 10, 8, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand:hover {
  color: inherit;
}

.brand__mark--site {
  width: 2rem;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand__short {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.brand__name {
  font-family: var(--serif);
  font-size: clamp(0.78rem, 2.5vw, 0.92rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}

.site-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-muted);
}

.site-nav a:hover {
  color: var(--link-hover);
}

/* —— Billardtisch —— */

.table-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 3vw 2vh;
  background-color: var(--bg-room);
  background-image:
    radial-gradient(ellipse 82% 62% at 50% 46%, rgba(36, 52, 40, 0.5) 0%, transparent 56%),
    radial-gradient(ellipse 115% 95% at 50% 50%, transparent 38%, rgba(0, 0, 0, 0.38) 100%);
}

.table-room {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pool-table {
  position: relative;
  width: min(92vw, calc((100dvh - 7.5rem) * 1.9));
  max-width: 96rem;
  aspect-ratio: 1.9 / 1;
  max-height: calc(100dvh - 7.5rem);
  height: auto;
}

.pool-table__rail--outer {
  position: absolute;
  inset: 0;
  border-radius: 0.35rem;
  background: linear-gradient(145deg, #6b4a30 0%, var(--rail-wood) 35%, var(--rail-dark) 100%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.pool-table__rail--inner {
  position: absolute;
  inset: 0.55rem;
  border-radius: 0.2rem;
  background: linear-gradient(160deg, #3d2818, #25160e);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.pool-table__felt {
  position: absolute;
  inset: 1.05rem;
  border-radius: 0.12rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, var(--felt-light) 0%, var(--felt-mid) 45%, var(--felt) 100%);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.35);
}

.pool-table__felt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    93deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.03) 3px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
}

.pool-table__watermark {
  position: absolute;
  inset: 8% 12%;
  background: url("/assets/img/bscgpde-mark.png") center / contain no-repeat;
  opacity: 0.11;
  filter: blur(0.3px);
  pointer-events: none;
}

.pool-table__head-string {
  position: absolute;
  left: 28%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.pool-pocket {
  position: absolute;
  width: 4.2%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1a1a18 0%, var(--pocket) 55%, #000 100%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

.pool-pocket--tl { left: -1.2%; top: -1.2%; }
.pool-pocket--tr { right: -1.2%; top: -1.2%; }
.pool-pocket--bl { left: -1.2%; bottom: -1.2%; }
.pool-pocket--br { right: -1.2%; bottom: -1.2%; }
.pool-pocket--ml { left: -1.2%; top: 50%; transform: translateY(-50%); }
.pool-pocket--mr { right: -1.2%; top: 50%; transform: translateY(-50%); }

.ball-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
}

#balls-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ball-link {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  z-index: 10;
  text-decoration: none;
  background: transparent;
  transition: box-shadow 0.15s ease;
}

.ball-link__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.35rem);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  background: rgba(5, 10, 8, 0.92);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ball-link:hover .ball-link__label,
.ball-link:focus-visible .ball-link__label,
.ball-link.is-focused .ball-link__label,
.ball-link.is-paused .ball-link__label {
  opacity: 1;
}

.ball-link:hover,
.ball-link:focus-visible,
.ball-link.is-paused {
  box-shadow: 0 0 0 3px var(--focus), 0 0 18px rgba(237, 208, 106, 0.45);
}

/* —— Footer-Leiste —— */

.table-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line-strong);
  background: rgba(5, 10, 8, 0.95);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.table-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.45rem 1rem 0.55rem;
}

.table-footer__club {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 0.88rem;
  color: var(--ink);
}

.table-footer__club-mark {
  flex-shrink: 0;
  border-radius: 2px;
}

.table-footer__notice {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 70ch;
}

.table-footer__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.78rem;
}

.table-footer__legal {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

.table-footer__nav a {
  text-decoration: none;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.table-footer__nav a:hover {
  color: var(--link-hover);
}

.nav-ball-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

@media (max-width: 899px) {
  .table-stage {
    align-items: center;
    justify-content: center;
    padding: 2vh 3vw;
  }

  .table-room {
    align-items: center;
    height: 100%;
  }

  .pool-table {
    width: 94vw;
    max-width: none;
    aspect-ratio: 1.4 / 1;
    max-height: min(calc(100dvh - 11rem), 72vh);
  }

  .site-header__inner {
    padding: 0.4rem 0.75rem;
  }

  .table-footer__inner {
    padding: 0.35rem 0.75rem 0.45rem;
  }

  .table-footer__notice {
    font-size: 0.72rem;
    margin-bottom: 0.25rem;
  }
}

@media (max-width: 480px) {
  .brand__name {
    display: none;
  }

  .table-footer__nav {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* —— Impressum / Legal —— */

body.page-legal {
  min-height: 100dvh;
  background: var(--bg-room);
}

.legal-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.legal-page h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.legal-page h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}

.legal-page h3 {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink-faint);
}

.legal-intro {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.legal-page p {
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line-strong);
  background: #060e0a;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 1.75rem;
}

.site-footer a {
  color: var(--link);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
  }
}

.footer-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.35rem;
}

.footer-fine {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}
