/*
 * Kartenspiele – Schnellübersichten
 * Design-System: Dark Gold Theme
 */

/* ============================================================
   SELF-HOSTED FONTS
   ============================================================ */
@font-face {
  font-family: 'Playfair Display';
  src: url("/assets/playfair-display-latin-400-normal-316033a8.woff2") format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url("/assets/playfair-display-latin-700-normal-a51941ef.woff2") format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url("/assets/playfair-display-latin-900-normal-10d3f597.woff2") format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url("/assets/source-serif-4-latin-300-normal-1b9ed97e.woff2") format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url("/assets/source-serif-4-latin-400-normal-9a523421.woff2") format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url("/assets/source-serif-4-latin-600-normal-6988c85a.woff2") format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url("/assets/jetbrains-mono-latin-400-normal-849c32ea.woff2") format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url("/assets/jetbrains-mono-latin-500-normal-9590a15c.woff2") format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --bg: #1a1714;
  --card: #231f1b;
  --card-alt: #2a2520;
  --gold: #c9a84c;
  --gold-dim: #8b7535;
  --gold-bright: #e8c84a;
  --cream: #f0e6d2;
  --cream-dim: #b8a98a;
  --red: #b84233;
  --green: #4a7c59;
  --blue: #4a6a8c;
  --border: #3a332c;
  --text: #e8dcc8;
  --text-dim: #9a8e7e;
}

/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ============================================================
   INDEX – SITE HEADER
   ============================================================ */
.site-header {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.header-suits {
  font-size: 0.9rem;
  letter-spacing: 1.2em;
  color: var(--gold-dim);
  margin-bottom: 1rem;
}

.site-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 3rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.site-subtitle {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--cream-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.6rem;
}

/* ============================================================
   INDEX – SECTION HEADINGS
   ============================================================ */
.games-section {
  margin-bottom: 3rem;
}

.games-section__title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gold-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.games-section__title-icon {
  color: var(--gold);
  font-size: 0.75rem;
}

/* ============================================================
   INDEX – GAMES GRID
   ============================================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.6rem 1.5rem;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.game-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(201, 168, 76, 0.1);
}

.game-card__header {
  margin-bottom: 1rem;
}

.game-card__name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--gold);
  line-height: 1.2;
}

.game-card__subtitle {
  display: block;
  font-size: 0.78rem;
  color: var(--cream-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.game-card__description {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.2rem;
}

.game-card__meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.game-card__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.game-card__meta-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-card__meta-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold-bright);
}

.complexity { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; font-weight: 500; }
.complexity--einfach { color: #7bc490; }
.complexity--mittel  { color: #e8c84a; }
.complexity--komplex { color: #e07a6e; }

/* Featured card variant */
.game-card--featured {
  border-color: var(--gold-dim);
  background: linear-gradient(135deg, var(--card) 0%, rgba(201,168,76,0.06) 100%);
  position: relative;
}

.game-card--featured:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 168, 76, 0.25);
}

.game-card__cta {
  font-size: 0.78rem;
  color: var(--gold-dim);
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.game-card:hover .game-card__cta {
  color: var(--gold);
}

/* ============================================================
   INDEX – EMPTY STATE & FOOTER
   ============================================================ */
.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 4rem 0;
  font-style: italic;
}

.site-footer {
  text-align: center;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* ============================================================
   SHOW – BACK NAVIGATION
   ============================================================ */
.back-nav {
  margin-bottom: 1.5rem;
}

.back-nav--bottom {
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.back-link {
  font-size: 0.82rem;
  color: var(--gold-dim);
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--gold);
}

/* ============================================================
   GAME CONTENT – SHARED (used in content partials)
   ============================================================ */
.container {
  max-width: 900px;
  margin: 0 auto;
}

header.game-header {
  text-align: center;
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  position: relative;
}

header.game-header::before {
  content: '♠ ♥ ♦ ♣';
  display: block;
  font-size: 0.9rem;
  letter-spacing: 1.2em;
  color: var(--gold-dim);
  margin-bottom: 1rem;
}

h1.game-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2.6rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1.15;
}

h1.game-title span {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  font-family: 'Source Serif 4', serif;
  color: var(--cream-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

h2.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
}

h2.section-title .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--gold-dim);
  margin-right: 0.5rem;
  vertical-align: middle;
}

h3.subsection-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cream);
  margin: 1.5rem 0 0.6rem;
}

.game-section {
  margin-bottom: 2.5rem;
}

.game-section p {
  margin-bottom: 0.8rem;
  color: var(--text);
}

.note {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Tables */
.game-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0 1.2rem;
  font-size: 0.92rem;
}

.game-section th {
  text-align: left;
  padding: 0.55rem 0.7rem;
  background: var(--card-alt);
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--gold-dim);
}

.game-section td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.game-section tr:last-child td { border-bottom: none; }
.game-section tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

.val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--gold-bright);
  font-size: 0.92rem;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  letter-spacing: 0.03em;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.tag-pos  { background: rgba(74,124,89,0.3);   color: #7bc490; border: 1px solid rgba(74,124,89,0.4); }
.tag-neg  { background: rgba(184,66,51,0.25);  color: #e07a6e; border: 1px solid rgba(184,66,51,0.35); }
.tag-solo { background: rgba(74,106,140,0.3);  color: #7ab0d8; border: 1px solid rgba(74,106,140,0.4); }
.tag-rufer { background: rgba(201,168,76,0.2); color: var(--gold); border: 1px solid rgba(201,168,76,0.3); }
.tag-farbe { background: rgba(160,80,160,0.25);color: #c89ac8; border: 1px solid rgba(160,80,160,0.35); }

.desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.15rem;
}

/* Example box */
.example-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  padding: 1.2rem 1.4rem;
  margin: 1rem 0 1.5rem;
  border-radius: 0 6px 6px 0;
}

.example-box h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0;
}

.card-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.card-chip.tarock { background: rgba(201,168,76,0.15); color: var(--gold-bright); border-color: var(--gold-dim); }
.card-chip.herz   { background: rgba(184,66,51,0.15);  color: #e07a6e; }
.card-chip.pik    { background: rgba(80,80,100,0.25);  color: #a0a8c0; }
.card-chip.karo   { background: rgba(184,66,51,0.12);  color: #e07a6e; }
.card-chip.kreuz  { background: rgba(80,80,100,0.2);   color: #a0a8c0; }

.calc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--cream-dim);
  line-height: 1.8;
  margin: 0.6rem 0;
}

.calc .result { color: var(--gold-bright); font-weight: 500; }

/* Trull highlight */
.trull-box {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.trull-item {
  text-align: center;
  padding: 0.7rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  min-width: 110px;
}

.trull-item .name  { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--gold); font-size: 1rem; }
.trull-item .roman { font-family: 'JetBrains Mono', monospace; color: var(--cream-dim); font-size: 0.78rem; margin-top: 0.15rem; }
.trull-item .pts   { font-family: 'JetBrains Mono', monospace; color: var(--gold-bright); font-size: 0.85rem; margin-top: 0.3rem; }

/* Kontra chips */
.kontra-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.kontra-chip {
  padding: 0.3rem 0.7rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.82rem;
}

.kontra-chip .label { color: var(--cream-dim); margin-right: 0.3rem; }
.kontra-chip .multi { font-family: 'JetBrains Mono', monospace; color: var(--gold-bright); font-weight: 500; }

/* Divider */
.divider {
  text-align: center;
  color: var(--gold-dim);
  margin: 2rem 0;
  font-size: 0.85rem;
  letter-spacing: 0.8em;
}

/* Game footer */
.game-footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .site-title { font-size: 2.2rem; }
  h1.game-title { font-size: 1.9rem; }
  .page-container { padding: 1rem 1rem 3rem; }
  .game-section table { font-size: 0.82rem; }
  .game-section td,
  .game-section th { padding: 0.4rem 0.5rem; }
  .trull-box { gap: 0.8rem; }
  .trull-item { min-width: 90px; padding: 0.5rem 0.8rem; }
  .games-grid { grid-template-columns: 1fr; }
}
