/* === Grundlayout === */

:root {
  /* Default (Light) */
  --bg: #f8f9fa;
  --fg: #000;
}
[data-theme="dark"] {
  --bg: #121212;
  --fg: #eee;
}
#theme-toggle {
    width: var(--toggle-size);
    height: var(--toggle-size);
    background-color: var(--marine);
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-left: 10px;
    padding: 0;
  }
  #theme-toggle:hover {
    transform: scale(1.1);
  }
  #theme-toggle svg {
    width: 60%;
    height: 60%;
    fill: var(--icon-color);
  }
body {
  background-color: var(--bg);
  color: var(--fg);
}


body {
  font-family: 'Segoe UI', sans-serif;
  font-size: 20px;
 /* background-color: #f8f9fa; */
  margin-top: 0;
  padding: 0;
}

.beta-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff8a00, #e52e71);
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  font-size: 0.75rem;       /* je nach Geschmack z.B. auch 0.8rem */
  line-height: 1;
  padding: 0.15em 0.35em;   /* vertikal, horizontal */
  border-radius: 0.25em;    /* macht die Ecken schÃƒÂ¶n rund */
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  vertical-align: middle;   /* damit das Badge gut zur Textlinie passt */
}
.beta-badge:hover {
  background: linear-gradient(135deg, #e52e71, #ff8a00);
}

.link-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1a73e8, #155ab6);
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    font-size: 1.75rem;
    line-height: 1;
    padding: 0.15em 0.35em;
    border-radius: 0.25em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    vertical-align: middle;
    text-decoration: none;
    transition: background 0.3s ease;
  }
  .link-badge:hover {
    background: linear-gradient(135deg, #155ab6, #1a73e8);
  }
  
  .player-meta {
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem; /* nach Bedarf anpassen */
  color: #555;      /* nach Design anpassen */
}

.player-meta p {
  margin: 0;
  padding: 0.25em 0;
}

/* Optional: Bei sehr schmalen Bildschirmen untereinander statt nebeneinander */
@media (max-width: 800px) {
  .player-meta {
	font-size: 0.6rem; /* nach Bedarf anpassen */
  }
}
  
/* suggestions */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  max-height: 250px;
  overflow-y: auto;
  font-size: 0.95rem;
  border-radius: 6px;
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
  color: #333;
  white-space: nowrap;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

/* Spielerprofil */
.player-info {
  text-align: center;
  margin-bottom: 30px;
}

/* ÃƒÅ“bersicht */
.stats-overview {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto 20px auto;
  padding: 0 10px;
}

.stat-card {
  flex: 1 1 calc(23% - 10px);
  background-color: #fff;
  border-radius: 12px;
  padding: 10px;
  min-width: 300px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 5px;
  border-radius: 5px;
  background: linear-gradient(to bottom, #3498db, #2980b9);
}

.stat-card.avg-damage::before {
  background: linear-gradient(to bottom, #f39c12, #e67e22);
}

.stat-card.winrate::before {
  background: linear-gradient(to bottom, #2ecc71, #27ae60);
}

.stat-card.wn8::before {
  background: linear-gradient(to bottom, #9b59b6, #8e44ad);
}

.stat-card .label {
  color: #7f8c8d;
  font-size: 16px;
  margin-bottom: 8px;
}

.stat-card .value {
  color: #000;
  font-size: 24px;
  font-weight: bold;
}















/* ---------------------- */
/* 1. Light-Mode (Default) */
/* ---------------------- */

/* Basis-Styles fÃƒÂ¼r alle Statistik-Tabellen */
.color-schema-table,
.custom-sort-table,
#shipTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;           /* heller Hintergrund */
  color: #1e293b;                /* dunklere Standard-Schrift */
  border-radius: 10px;
  overflow: hidden;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* Tabellenkopf */
.color-schema-table th,
.custom-sort-table th,
#shipTable th {
  background: #f3f4f6;
  color: #1e293b;                /* dunkle Kopfzeilen-Schrift */
  padding: 10px 6px;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}

/* Tabellenzellen */
.color-schema-table td,
.custom-sort-table td,
#shipTable td {
  padding: 6px 6px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
  background: transparent;
  color: #2d3748;                /* krÃƒÂ¤ftigere Zellen-Schrift */
}

/* Letzte Zeile ohne Linie */
.color-schema-table tr:last-child td,
.custom-sort-table tr:last-child td,
#shipTable tr:last-child td {
  border-bottom: none;
}

/* Wechselnde Zeilenfarbe */
.color-schema-table tr:nth-child(even),
.custom-sort-table tr:nth-child(even),
#shipTable tr:nth-child(even) {
  background: #f9fafb;
}

.color-schema-table tr:nth-child(odd),
.custom-sort-table tr:nth-child(odd),
#shipTable tr:nth-child(odd) {
  background: #ffffff;
}

/* Hover-Effekt */
.color-schema-table tr:hover,
.custom-sort-table tr:hover,
#shipTable tr:hover {
  background: #e5e7eb;
  color: #1e293b;                /* Hover-Schrift ebenfalls dunkel */
}

/* ---------------------- */
/* 2. Dark-Mode Overrides  */
/* ---------------------- */

html[data-theme="dark"] .color-schema-table,
html[data-theme="dark"] .custom-sort-table,
html[data-theme="dark"] #shipTable {
  background: #17324c;
  color: #fff;
  box-shadow: 0 2px 12px rgba(16,42,67,0.10);
}

html[data-theme="dark"] .color-schema-table th,
html[data-theme="dark"] .custom-sort-table th,
html[data-theme="dark"] #shipTable th {
  background: #204060;
  color: #fff;
  border-bottom: 2px solid #102a43;
}

html[data-theme="dark"] .color-schema-table td,
html[data-theme="dark"] .custom-sort-table td,
html[data-theme="dark"] #shipTable td {
  border-bottom: 1px solid #1c2e4a;
  color: #fff;                    /* weiÃƒÅ¸e Zellen-Schrift */
}

html[data-theme="dark"] .color-schema-table tr:nth-child(even),
html[data-theme="dark"] .custom-sort-table tr:nth-child(even),
html[data-theme="dark"] #shipTable tr:nth-child(even) {
  background: #1c2e4a;
}

html[data-theme="dark"] .color-schema-table tr:nth-child(odd),
html[data-theme="dark"] .custom-sort-table tr:nth-child(odd),
html[data-theme="dark"] #shipTable tr:nth-child(odd) {
  background: #17324c;
}

html[data-theme="dark"] .color-schema-table tr:hover,
html[data-theme="dark"] .custom-sort-table tr:hover,
html[data-theme="dark"] #shipTable tr:hover {
  background: #243f5e;
  color: #000 !important;
}

html[data-theme="dark"] .color-schema-table tr:last-child td,
html[data-theme="dark"] .custom-sort-table tr:last-child td,
html[data-theme="dark"] #shipTable tr:last-child td {
  border-bottom: none;
}












/* Flaggen und Typ-Bilder kleiner & schÃƒÂ¶ner */
.ship-type img,
.ship-nation img {
    display: block;
    margin: 0 auto 2px;
    height: 26px;
    border-radius: 2px;
    box-shadow: 0 0 4px #0e1b2c55;
}

/* Optional: Schiffname linksbÃƒÂ¼ndig */
.ship-name {
    text-align: left;
    font-weight: 500;
    padding-left: 12px;
}


/* Farben fÃƒÂ¼r Farbschema-Tabelle */
.color-schema-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-weight: bold;
}

.color-schema-table th,
.color-schema-table td {
  padding: 12px;
  border: 1px solid #ddd;
}

.color-schema-table thead {
  background-color: white;
  color: black;
}




/* Footer */
footer,
.site-footer {
  background-color: #f5f5f5;
  color: #333;
  font-size: 0.85em;
  padding: 20px;
  text-align: center;
  border-top: 1px solid #ccc;
  margin-top: 40px;
}
.site-footer a {
  color: #336699;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

html[data-theme="dark"] .site-footer {
  background-color: #102a43;
  color: #ccc;
  border-top: 1px solid #2a4a6b;
}
html[data-theme="dark"] .site-footer a {
  color: #80bfff;
}

.site-footer .footer-social img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  filter: invert(100%);
  transition: transform 0.3s ease;
}

.site-footer .footer-social a:hover img {
  transform: scale(1.1);
}









/* Responsive Grid Layouts */
.cards-grid,
.grid-3,
.grid-2 {
  display: grid;
  gap: 1.5rem;
  padding: 1rem;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.card {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.card.wide {
  grid-column: span 2;
}

@media (max-width: 1100px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .cards-grid,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .card.wide {
    grid-column: span 1;
  }
}

/* === Schiffstabelle Ã¢â‚¬â€œ shipTable === */
.ship-stats-section {
  width: 90%;
  margin: 0 auto 40px auto;
  padding: 0 10px;
  text-align: center;
}

.ship-stats-section-heading {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #222; /* Standard (Light Mode) */
  cursor: pointer;
}

html[data-theme="dark"] .ship-stats-section-heading {
  color: #e0e0e0;
}
.ship-stats-section-heading:hover {
  opacity: 0.85;
  text-decoration: underline;
}

#ship-stats-wrapper {
  display: flex;
  justify-content: center;
  padding: 10px;
}


#shipTable {
  width: fit-content;  /* Ã¢â€ Â zentriert! */
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#shipTable thead {
  background-color: #f8f9fa;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#shipTable th,
#shipTable td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
}

#shipTable tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

#shipTable td.ship-name {
  font-size: 1.15em;
  font-weight: 600;
}

#shipTable td.ship-type,
#shipTable td.ship-nation {
  font-size: 0.85em;
  font-weight: 400;
  color: #bbb;
}
#shipTable td.winrate,
#shipTable td.wn8 {
  font-size: 1.1em;
  font-weight: 600;
}

/* Dark Mode UnterstÃƒÂ¼tzung */
body.dark-mode #shipTable {
  background: #102a43;
  color: #e0e0e0;
}

body.dark-mode #shipTable thead {
  background-color: #1a3b5c;
  color: #f0f0f0;
}

body.dark-mode #shipTable td,
body.dark-mode #shipTable th {
  border-color: #2a4a6b;
}

body.dark-mode #shipTable tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}



body.dark-mode #player-name {
  color: #e0e0e0;
}

/* --- ErgÃƒÂ¤nzt aus player.php --- */
.stats-overview,
.stats-section .table-wrapper {
  width: 90%;
  margin: 0 auto 30px auto;
}
.stats-overview {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
}
.stat-card {
  flex: 1 1 140px;
  background: #f0f0f0;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.stat-card .label {
  font-size: 0.9em;
  color: #555;
}
.stat-card .value {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 5px;
}

/* Dark Mode UnterstÃƒÂ¼tzung fÃƒÂ¼r stat-card */
html[data-theme="dark"] .stat-card {
  background: #1e1e1e;
}
html[data-theme="dark"] .stat-card .label {
  color: #bbb;
}
html[data-theme="dark"] .stat-card .value {
  color: #fff;
}

/* Dark Mode fÃƒÂ¼r stats-table */
html[data-theme="dark"] .stats-table {
  background-color: #102a43;
  color: #e0e0e0;
}
html[data-theme="dark"] .stats-table th,
html[data-theme="dark"] .stats-table td {
  background-color: #102a43;
  color: #ffffff;
  border-color: #2a4a6b;
}
html[data-theme="dark"] .stats-table thead {
  background-color: #1a3b5c;
  color: #f0f0f0;
}
html[data-theme="dark"] .stats-table tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Spielername und ÃƒÅ“berschriften Style */
/* Spielername */
#player-name {
  text-align: center;
  font-size: 2em;
  color: #222;
  margin-top: 1rem;
}
html[data-theme="dark"] #player-name {
  color: #e0e0e0;
}

/* ÃƒÅ“berschriften zentrieren */
.stats-section h2,
.ship-stats-section h2 {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 0.8rem;
  color: #222;
}
html[data-theme="dark"] .stats-section h2,
html[data-theme="dark"] .ship-stats-section h2 {
  color: #e0e0e0;
}

/* Kopfzeile dunkler im Dark Mode */
/* Kopfzeile dunkler als Zellen im Dark Mode */
html[data-theme="dark"] .stats-table thead th {
  background-color: #0b1e33;
  color: #ffffff;
}

/* Stat-Card gleiche Farbe wie Tabellenkopf im Dark Mode */
/* stat-card Farbe im Dark Mode an Tabellen-Kopfzeile angleichen */
html[data-theme="dark"] .stat-card {
  background: #0b1e33;
  color: #ffffff;
}

/* Schiffsstatistik-Tabelle im Dark Mode anpassen */
/* Dark Mode fÃƒÂ¼r Schiffsstatistik (color-schema-table) */
html[data-theme="dark"] .color-schema-table {
  background-color: #14324F;
  color: #e0e0e0;
}
html[data-theme="dark"] .color-schema-table th,
html[data-theme="dark"] .color-schema-table td {
  background-color: #102a43;
  color: #ffffff;
  border-color: #2a4a6b;
  border-bottom: 1px solid #386EA1;  /* horizontale Trennlinien */
  border-right: ;   /* vertikale Trennlinien */
  padding: 0.6rem 0.8rem;          /* etwas Luft in den Zellen */
}
html[data-theme="dark"] .color-schema-table thead th {
  background-color: #0b1e33;
  color: #ffffff;
}
html[data-theme="dark"] .color-schema-table tr:hover {
  background-color: background-color: #ffffff;
}


/* GrÃƒÂ¶ÃƒÅ¸ere Schrift und Highlight fÃƒÂ¼r Winrate & WN8 in .stats-table */
.stats-table .winrate,
.stats-table .wn8 {
  font-weight: bold;
  font-size: 1.35em;
  border-radius: 0.5em;
  padding: 2px 8px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.12);
  transition: background 0.25s, color 0.25s;
}

.stats-table .winrate:hover, .stats-table .wn8:hover {
  box-shadow: 0 0 8px 2px rgba(80,180,255,0.22);
  filter: brightness(1.08);
}

.stats-table .pr {
  font-weight: bold;
  font-size: 1.2em;
  border-radius: 0.5em;
  padding: 2px 8px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.12);
}

.pr {
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;
    /* ggf. wie bei .wn8 einfÃƒÂ¤rben */
}
.pr.neutral {
    color: #555;
}

/* Tabelle auÃƒÅ¸en abgerundet, innen eckig */
.stats-section .table-wrapper {
    border-radius: 16px;         /* AuÃƒÅ¸en abgerundet */
    overflow: hidden;            /* Ecken der Tabelle "abschneiden" */
}

.stats-table {
    border-radius: 0;            /* Tabelle selbst nicht abrunden */
    width: 100%;
    border-collapse: separate;   /* damit overflow: hidden wirkt */
    border-spacing: 1;
}

.stats-table th,
.stats-table td {
    border-radius: 0 !important; /* Eckig, keine Rundung in den Zellen */
    /* Optional: border fÃƒÂ¼r optisch saubere Trennung */
    border: none;
    /* FÃƒÂ¼r bÃƒÂ¼ndiges Aussehen evtl. padding anpassen */
}

/* Farbcodes fÃƒÂ¼r PR/WN8/Winrate weiterhin wie gehabt, ohne border-radius */
.pr, .wn8, .winrate {
    border-radius: 0 !important;
    /* Rest wie gehabt, z.B. padding, font-size */
}

/* Optional, damit keine Ecke einzeln abgerundet wird (falls alte Styles vorhanden): */
.stats-table td:first-child,
.stats-table th:first-child,
.stats-table td:last-child,
.stats-table th:last-child {
    border-radius: 0 !important;
}



/* Top-Spieler & Clan Tabellen */
/* Allgemeines Table-Styling */
/* Grundlegende Tabellengestaltung bleibt */

.stats-table th, .stats-table td {
  /* Beibehalten, falls schon in deiner CSS */
  padding: 0.45em 0.8em;
  text-align: center;
  border: none;
}


/* Nickname auffÃƒÂ¤llig und groÃƒÅ¸ */
.player-link .nickname {
  font-size: 1.23em;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 12px #1da2ff66, 0 1px 0 #111d; /* leichter Glow */
  letter-spacing: 0.01em;
  transition: color 0.2s, text-shadow 0.2s;
  line-height: 1.2;
}

.player-link {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  color: #fff !important;
  font-size: 1.23em;
  font-weight: 800;
  text-shadow: 0 2px 12px #1da2ff66, 0 1px 0 #111d;
  letter-spacing: 0.01em;
  transition: color 0.2s, text-shadow 0.2s;
  line-height: 1.2;
  display: inline;
}

/* Hover bleibt auffÃƒÂ¤llig */
.player-link:hover .nickname {
  color: #ffe678;
  text-shadow: 0 2px 12px #ffe67899, 0 1px 0 #111d;
}

/* Keine Unterstreichung */
.player-link,
.player-link:hover {
  text-decoration: none !important;
}


.player-link .external-link-icon {
  color: #fff4b8;
  font-size: 1em;
  opacity: .75;
  transition: color 0.18s;
}
.player-link:hover .external-link-icon {
  color: #ffe678;
  opacity: 1;
}



/* Tabellenzellen, Standard: dÃƒÂ¼nne Schrift, hell */
.stats-table td,
.stats-table th {
  font-weight: 400;
  color: #c6d8f2;
  font-size: 1.03em;
}
.stats-table th {
  font-weight: 800;
  color: #fff;
}

/* WN8: Fetter, viel grÃƒÂ¶ÃƒÅ¸er, prÃƒÂ¤senter */
.wn8-cell {
  font-size: 1.38em !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: 0.02em;
  box-shadow: 0 0 18px #12e2ff14 inset;

  /* Hintergrundfarbe kommt weiter per JS */
}

/* ---------------------- */
/* 1. Light-Mode (Default) */
/* ---------------------- */
.pr-cell,
.winrate-cell,
.tier-cell,
.battles-cell {
  font-size: 1em !important;
  font-weight: 400 !important;
  color: #0b263b !important;       /* dunkles Marineblau */
  background: none !important;
  box-shadow: none !important;
}

/* ---------------------- */
/* 2. Dark-Mode Overrides  */
/* ---------------------- */
html[data-theme="dark"] .pr-cell,
html[data-theme="dark"] .winrate-cell,
html[data-theme="dark"] .tier-cell,
html[data-theme="dark"] .battles-cell {
  /* behalte deine bisherigen Dark-Mode-Werte */
  font-size: 1em !important;
  font-weight: 400 !important;
  color: #c6d8f2 !important;
  background: none !important;
  box-shadow: none !important;
}



.custom-sort-table td.nickname-cell {
  background: linear-gradient(90deg, #194686 70%, #209af5 100%);
  border-radius: 0;
  padding-left: 0.8em;
  padding-right: 0.8em;
  box-shadow: 0 2px 12px 0 #209af544;
  transition: background 0.22s;
}

/* SchÃƒÂ¶ne ZeilenÃƒÂ¼bergÃƒÂ¤nge beim Hover */
.stats-table tr:hover {
  background: #213960 !important;
}

html[data-theme="dark"] .stats-table tbody tr {
  border-bottom: 1px solid #283b52;
}
body[data-theme="light"] .stats-table tbody tr {
  border-bottom: 1px solid #e3e3e3;
}
.stats-section .stats-table tbody tr {
  border-bottom: 1px solid #ffffff;
}
.stats-table tbody tr:last-child { border-bottom: none !important; }


.player-header {
  text-align: center;
  margin-top: 20px;
}
.player-nick {
  display: inline;
  font-size: 2.2em;
  font-weight: bold;
  color: #fff;
}
.player-clan {
  display: inline;
  margin-left: 0.7em;
  font-weight: normal;
  font-size: 1.1em;
  color: #c9d7ea;
  letter-spacing: 0.5px;
}
.clan-link {
  color: #c9d7ea;
  text-decoration: none;
  font-weight: normal;
  padding: 0 1px;
  transition: color 0.18s;
}
.clan-link:hover,
.clan-link:focus {
  color: #e7e9ff;
}

/* ---------------------- */
/* 1. Light-Mode (Default) */
/* ---------------------- */
.player-header {
  background: none; /* falls du einen Hintergrund haben willst, hier anpassen */
  padding: 1rem 0;
}

.player-header .player-info,
.player-header .player-info a.site-titlel,
.player-header .player-info .player-clan,
.player-header .player-info .player-clan a.clan-link {
  color: #0b263b;            /* dunkles Marineblau fÃƒÂ¼r Light-Mode */
  text-decoration: none;
}

/* Optional: Hover-Effekt im Light-Mode */
.player-header .player-info a.site-titlel:hover,
.player-header .player-info .player-clan a.clan-link:hover {
  color: #09203a;            /* noch dunkler im Hover */
  text-decoration: underline;
}

/* ---------------------- */
/* 2. Dark-Mode Overrides  */
/* ---------------------- */
html[data-theme="dark"] .player-header .player-info,
html[data-theme="dark"] .player-header .player-info a.site-titlel,
html[data-theme="dark"] .player-header .player-info .player-clan,
html[data-theme="dark"] .player-header .player-info .player-clan a.clan-link {
  color: #e2e8f0;            /* helle Schrift im Dark-Mode */
}

/* Optional: Hover-Effekt im Dark-Mode */
html[data-theme="dark"] .player-header .player-info a.site-titlel:hover,
html[data-theme="dark"] .player-header .player-info .player-clan a.clan-link:hover {
  color: #ffffff;            /* reines WeiÃƒÅ¸ im Hover */
}












/* ==== Flex-Wrapper fÃƒÂ¼r die beiden Tabellen-Cards ==== */
.stats-cards-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.0rem;
  align-items: flex-start;
}
/* Jede Card belegt 50% minus Half-Gap */
.stats-cards-container .stats-card {
  flex: 1 1 calc(50% - 0.75rem);
}
/* Ab 800px Breite aufspalten, darunter stapeln */
@media (max-width: 1400px) {
  .stats-cards-container {
    flex-direction: column;
  }
  .stats-cards-container .stats-card {
    flex: 1 1 100%;
  }
}


/* 1) Scroll-Wrapper fÃƒÂ¼r Tabellen */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* 2) Basis-Stil fÃƒÂ¼r alle .custom-sort-table */
.custom-sort-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 1rem;       /* GrundgrÃƒÂ¶ÃƒÅ¸e */
}
.custom-sort-table th,
.custom-sort-table td {
  padding: 0.55rem 0.85rem; /* groÃƒÅ¸zÃƒÂ¼gige Polsterung */
  text-align: center;
  white-space: nowrap;   /* verhindert Zeilenumbruch */
}
/* Erlaubt in Nickname-Spalte Zeilenumbruch */
.custom-sort-table .nickname-cell,
.custom-sort-table .player-link {
  white-space: normal;
}
/* 3) Kleinere Schrift und Polster auf engen Viewports */
@media (max-width: 1600px) {
  .custom-sort-table {
    font-size: 0.925rem;    /* 14px */
  }
  .custom-sort-table th,
  .custom-sort-table td {
    padding: 0.4rem 0.55rem;
  }
}
/* 3) Kleinere Schrift und Polster auf engen Viewports */
@media (max-width: 1200px) {
  .custom-sort-table {
    font-size: 0.925rem;    /* 14px */
  }
  .custom-sort-table th,
  .custom-sort-table td {
    padding: 0.3rem 0.55rem;
  }
}
/* Responsive, falls gewÃƒÂ¼nscht */
@media (max-width: 1000px) {
  .stats-table, .color-schema-table, .custom-sort-table, #shipTable {
    font-size: 0.92rem;
  }
  .ship-type img, .ship-nation img { height: 18px; }
}
/* 3) Kleinere Schrift und Polster auf engen Viewports */
@media (max-width: 800px) {
  .custom-sort-table {
    font-size: 0.875rem;    /* 14px */
  }
  .custom-sort-table th,
  .custom-sort-table td {
    padding: 0.2rem 0.45rem;
  }
}
@media (max-width: 600px) {
  .custom-sort-table {
    font-size: 0.55rem;     /* 12px */
  }
  .custom-sort-table th,
  .custom-sort-table td {
    padding: 0.02rem 0.04rem;
  }
}
/* Basis-Style fÃƒÂ¼r den Note-Block */
.top-list-note {
  margin-bottom: 0.5em;
  color: #1765ad;
  font-size: 1rem;
}
/* Dark Mode */
html[data-theme="dark"] .top-list-note {
  color: #a3d4f7;
}
/* Auf kleinen Bildschirmen Schrift verkleinern */
@media (max-width: 800px) {
  .top-list-note {
    font-size: 0.875rem;
	}
	/* h2 in den Top-Listen etwas kleiner */
  .stats-card h2,
  .stats-section h2,
  .ship-stats-section h2 {
    font-size: 1.2rem;
	margin-bottom: 0.25rem;
  }
  }


/* === Stats-Section-Tabelle ins Top-List-Styling ÃƒÂ¼bernehmen === */
.stats-section .table-wrapper {
  /* wie .table-responsive */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem; /* passt zum .custom-sort-table */
}

/* Basis-Stil kopiert von .custom-sort-table.color-schema-table */
/* ersetzt die Ã¢â‚¬Å“immer dunkleÃ¢â‚¬Â Default-Tabelle durch Light-Mode-Variablen */
.stats-section .stats-table {
  background: var(--bg);   /* aus :root Ã¢â‚¬â€œ in Light #f8f9fa */
  color:      var(--fg);   /* in Light #000 */
  /* behalte border-radius, Schatten etc. bei, wenn Du magst */
  border-radius: 10px;
  box-shadow:    0 2px 12px rgba(0,0,0,0.05);
}
/* Tabellenkopf */
.stats-section .stats-table th {
  background: #204060;
  color: #fff;
  padding: 10px 6px;
  border-bottom: 2px solid #102a43;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}
/* Zellen */
.stats-section .stats-table td {
  padding: 6px 6px;
  border-bottom: 1px solid #1c2e4a;
  text-align: center;
  background: transparent;
}
/* Zebra-Rows */
.stats-section .stats-table tr:nth-child(even) {
  background: #1c2e4a;
}
.stats-section .stats-table tr:nth-child(odd) {
  background: #17324c;
}
/* Hover */
.stats-section .stats-table tr:hover {
  color: #000 !important;
  background: #243f5e;
}
.stats-table tr > td:first-child,
.stats-table thead tr > th:first-child {
  font-weight: bold;
}
/* Responsive Font & Padding (wie bei custom-sort-table) */
@media (max-width: 1200px) {
  .stats-section .stats-table {
    font-size: 0.925rem;
  }
  .stats-section .stats-table th,
  .stats-section .stats-table td {
    padding: 0.3rem 0.55rem;
  }
}
@media (max-width: 800px) {
  .stats-section .stats-table {
    font-size: 0.875rem;
  }
  .stats-section .stats-table th,
  .stats-section .stats-table td {
    padding: 0.2rem 0.45rem;
  }
}
@media (max-width: 600px) {
  .stats-section .stats-table {
    font-size: 0.75rem;
  }
  .stats-section .stats-table th,
  .stats-section .stats-table td {
    padding: 0.1rem 0.2rem;
  }
}

/* neutral: keine Hintergrundfarbe */
.wn8.neutral {
  background-color: transparent !important;            /* oder eine dezente Textfarbe */
}
/* neutral: keine Hintergrundfarbe */
.pr.neutral {
  background-color: transparent !important;            /* oder eine dezente Textfarbe */
}
/* neutral: keine Hintergrundfarbe */
.winrate.neutral {
  background-color: transparent !important;            /* oder eine dezente Textfarbe */
}

/* Wrapper um den Text, damit das Popup relativ dazu positioniert wird */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
/* Das eigentliche Popup, standardmÃƒÂ¤ÃƒÅ¸ig unsichtbar */
.tooltip .tooltip-content {
  visibility: hidden;
  opacity: 0;
  width: 200px;                     /* Passe die Breite an */
  background-color: #204060;        /* Dunkler Hintergrund passend zu deinem Design */
  color: #fff;                      /* Helle Schrift */
  text-align: left;
  padding: 0.5rem;
  border-radius: 4px;
  position: absolute;
  bottom: 125%;                     /* Popup oberhalb des Textes */
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.2s ease-in-out;
  z-index: 10;
}
/* Pfeil nach unten unter dem Popup */
.tooltip .tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;  /* unten am Popup */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #204060 transparent transparent transparent;
}
/* Sichtbar werden beim Hover */
.tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}
/* 1) GrundgrÃƒÂ¶ÃƒÅ¸e fÃƒÂ¼r Tabellenkopf */
.table-wrapper .stats-table thead th {
  padding: 0.4rem 0.6rem;
  font-size: 1.3rem;    /* z.B. 19.2px auf Desktop */
}
/* 2) Ab 1200px Breite etwas kleiner */
@media (max-width: 1200px) {
  .table-wrapper .stats-table thead th {
    font-size: 1rem;  /* z.B. 17.6px */
  }
  .table-wrapper .stats-table td {
    padding: 0.2rem 0.3rem;
	font-size: 1rem;
  }
  #player-name {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}
}
@media (max-width: 800px) {
  .table-wrapper .stats-table {
    font-size: 0.55rem;
  }
  .table-wrapper .stats-table th,
  .table-wrapper .stats-table td {
    padding: 0.05rem 0.05rem;
	font-size: 0.5rem;
  }
    .nickname-cell td {
    padding: 0.05rem 0.05rem;
	font-size: 0.5rem;
  }
  }
/* 3) Ab 600px Breite noch kompakter */
@media (max-width: 650px) {
	
  .table-wrapper .stats-table thead th {
    font-size: 0.4rem;    /* z.B. 16px */
	padding: 0.03rem 0.03rem;
  }
    .table-wrapper .stats-table td {
    padding: 0.03rem 0.03rem;
	font-size: 0.4rem;
  }
  .nickname-cell td {
    padding: 0.02rem 0.02rem;
	font-size: 0.4rem;
  }  
  .player-link .nickname {
    font-size: 0.6em;
  }
  .wn8-cell {
    font-size: 0.6 !important;
  }
    #player-name {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
}
}

/* 3) Ab 500px Breite noch kompakter */
@media (max-width: 480px) {
  /* Kopf- und Zellen-Styling bleibt so, wie du es hast */
  .table-wrapper .stats-table thead th {
    font-size: 0.4rem;
    padding: 0.01rem 0.01rem;
}
  .table-wrapper .stats-table td {
    padding: 0.01rem 0.01rem;
    font-size: 0.4rem;
}
  .pr-cell, .winrate-cell, .tier-cell, .server-cell, .battles-cell {
  font-size: 0.5rem !important;
}
  .nickname-cell{
  font-size: 0.5rem !important;
}
  .wn8-cell {
    font-size: 0.5rem !important;
}
  .break-20ch {
  max-width: 20ch;
  overflow-wrap: break-word;
  word-break: break-all;
}
}
/* WeiÃƒÅ¸er Rahmen nur ab der 2. Spalte in der Winrate-Zeile */
.stats-table tr.row-winrate td:not(:first-child) {
  border: 1px solid #ffffff !important;
}
/* WeiÃƒÅ¸er Rahmen nur ab der 2. Spalte in der WN8-Zeile */
.stats-table tr.row-wn8 td:not(:first-child) {
  border: 1px solid #ffffff !important;
}
#openCardsBtn {
      padding: 0.6em 1.2em;
      font-size: 1rem;
      background: #3498db;
      color: #fff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: background 0.2s;
    }
    #openCardsBtn:hover {
      background: #2980b9;
    }
	
	
/* ---------------------- */
/* 1. Light-Mode Overrides */
/* ---------------------- */
html[data-theme="light"] .stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff !important;       /* heller Hintergrund */
  color: #0b263b !important;            /* dunkles Marineblau */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .stats-table thead th {
  background: #f3f4f6 !important;
  color: #0b263b !important;            /* Marineblau im Header */
  padding: 10px 6px !important;
  border-bottom: 2px solid #e5e7eb !important;
}

html[data-theme="light"] .stats-table tbody td {
  padding: 6px 6px !important;
  border-bottom: 1px solid #e5e7eb !important;
  text-align: center !important;
  color: #0b263b !important;            /* Marineblau fÃƒÂ¼r alle Zellen */
}

html[data-theme="light"] .stats-table tbody tr:nth-child(even) {
  background: #f9fafb !important;
}

html[data-theme="light"] .stats-table tbody tr:nth-child(odd) {
  background: #ffffff !important;
}

html[data-theme="light"] .stats-table tbody tr:hover {
  background: #e5e7eb !important;
  color: #0b263b !important;
}

/* Spezielle Zellen im Light-Mode */
html[data-theme="light"] .stats-table .pr-cell,
html[data-theme="light"] .stats-table .winrate-cell,
html[data-theme="light"] .stats-table .tier-cell,
html[data-theme="light"] .stats-table .battles-cell {
  color: #0b263b !important;            /* dunkles Marineblau */

  box-shadow: none !important;
}

/* Tooltips und Links im Light-Mode */
html[data-theme="light"] .stats-table .tooltip-content a {
  color: #0b263b !important;
}

/* ---------------------- */
/* 2. Dark-Mode Overrides  */
/* ---------------------- */
html[data-theme="dark"] .stats-table {
  background: #17324c;
  color: #fff;
  box-shadow: 0 2px 12px rgba(16,42,67,0.10);
}

html[data-theme="dark"] .stats-table thead th {
  background: #204060;
  color: #fff;
  border-bottom: 2px solid #102a43;
}

html[data-theme="dark"] .stats-table tbody td {
  border-bottom: 1px solid #1c2e4a;
  color: #fff;
}

html[data-theme="dark"] .stats-table tbody tr:nth-child(even) {
  background: #1c2e4a;
}

html[data-theme="dark"] .stats-table tbody tr:nth-child(odd) {
  background: #17324c;
}

html[data-theme="dark"] .stats-table tbody tr:hover {
  background: #243f5e;
  color: #000 !important;
}

/* Spezielle Zellen im Dark-Mode */
html[data-theme="dark"] .stats-table .pr-cell,
html[data-theme="dark"] .stats-table .winrate-cell,
html[data-theme="dark"] .stats-table .tier-cell,
html[data-theme="dark"] .stats-table .battles-cell {
  color: #c6d8f2 !important;
}

/* Tooltips und Links im Dark-Mode */
html[data-theme="dark"] .stats-table .tooltip-content a {
  color: #80bfff;
}

/* Nur Nicht-Winrate/WN8/PR-Zellen transparent halten */
html[data-theme="light"] .stats-table tbody td:not(.winrate):not(.wn8) {
  background: transparent !important;
}

html[data-theme="light"] .stats-table tbody td.winrate,
html[data-theme="light"] .stats-table tbody td.wn8 {
  color: #fff !important;
  /* background bleibt per JS/inline-Style */
}

html[data-theme="light"] main.player-overview-page .stats-table tbody td.empty-stat {
  color: #0b263b !important;
}

/* 1) Nicknames in Tables im Light-Mode dunkel und ohne Glow */
html[data-theme="light"] .stats-table .player-link {
  color: #0b263b !important;
  text-shadow: none !important;
}


html[data-theme="light"] .custom-sort-table.color-schema-table td[style*="background-color"] {
  color: #fff !important;
}

html[data-theme="light"] .stats-table tbody td:not(.winrate):not(.wn8) {
  background-color: transparent !important;
}

/* Light-Mode: Clan-Header anpassen */
html[data-theme="light"] .clan-header h1 {
  /* Dunkles Marineblau statt WeiÃƒÅ¸ */
  color: #0b263b !important;
}

html[data-theme="light"] .clan-header span {
  /* Leicht helleres Grau statt #c9d7ea */
  color: #6b7a8f !important;
}

/* Optional: Text unter dem Header (Server/Mitglieder) */
html[data-theme="light"] .clan-header + div {
  /* Etwas dunkleres Grau */
  color: #4a5a6b !important;
}
/* Stylisches Hover fÃƒÂ¼r Spieler-Nicknames in der Clan-Tabelle */
.stats-table.color-schema-table .player-link {
  position: relative;
  color: inherit;                /* behÃƒÂ¤lt die normale Farbe */
  text-decoration: none;
  transition: color 0.3s ease;
}

.stats-table.color-schema-table .player-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;         /* knapp unterhalb der Schrift */
  height: 2px;
  width: 0;
  background: currentColor;      /* nutzt die Textfarbe */
  transition: width 0.3s ease;
}

.stats-table.color-schema-table .player-link:hover::after {
  width: 100%;
}
.stats-table.color-schema-table .player-link:hover {
  color: #4DB8FF !important;  /* helleres Blau */
}

.stats-table.color-schema-table .player-link:hover::after {
  background: currentColor;   /* bleibt synchron zur Textfarbe */
}

/* === Serverstats-Tabellen-Optimierung === */
.serverstats-table {
  width: 90%;
  margin: 0.5em auto 2em auto;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: center;
}

/* Header-Zellen */
.serverstats-table th {
  padding: 0.6em 0.8em;
  background-color: #f3f4f6;
  color: #0b263b;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
}

/* Daten-Zellen */
.serverstats-table td {
  padding: 0.5em 0.8em;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Feste Spaltenbreiten */
.serverstats-table th:nth-child(1),
.serverstats-table td:nth-child(1) { width: 5%; }
.serverstats-table th:nth-child(2),
.serverstats-table td:nth-child(2) { width: 45%; }
.serverstats-table th:nth-child(3),
.serverstats-table td:nth-child(3),
.serverstats-table th:nth-child(4),
.serverstats-table td:nth-child(4) { width: 15%; }
.serverstats-table th:nth-child(5),
.serverstats-table td:nth-child(5) { width: 20%; }

/* Hover-Effekt */
.serverstats-table tbody tr:hover {
  background-color: rgba(11, 38, 59, 0.1);
}

/* Responsive: ab 800px */
@media (max-width: 800px) {
  .serverstats-table {
    width: 100%;
    font-size: 0.9rem;
  }
  .serverstats-table th,
  .serverstats-table td {
    padding: 0.4em 0.5em;
  }
}

/* Responsive: ab 500px */
@media (max-width: 500px) {
  .serverstats-table {
    font-size: 0.8rem;
  }
  .serverstats-table th,
  .serverstats-table td {
    padding: 0.3em 0.4em;
  }
}
/* Light-Mode: alle Texte in der Serverstats-Tabelle marinblau */
html[data-theme="light"] .serverstats-table,
html[data-theme="light"] .serverstats-table th,
html[data-theme="light"] .serverstats-table td {
  color: #0b263b !important;
}

/* ===== Layout ===== */
.ship-page {
  background: var(--bg-page);
  color: var(--fg-text);
  padding: 2rem 1rem;
  max-width: 900px;
  margin: auto;
}

/* A) Header-Karte */
.ship-card {
  background: var(--accent);
  color: var(--bg-card);
  padding: 1.5rem;
  text-align: center;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 4px 8px var(--shadow);
}
.ship-card h1 { margin: 0 0 0.5rem; font-size: 2rem; }
.ship-card p  { margin: 0; font-size: 1rem; }

/* B) Detail-Grid */
.ship-details dl {
  display: grid;
  grid-template-columns: 1fr 2fr;
  row-gap: 0.75rem;
  column-gap: 1rem;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px var(--shadow);
  margin-top: -1rem;
}
.ship-details dt {
  font-weight: 600;
  color: var(--fg-text);
  text-transform: capitalize;
}
.ship-details dd {
  margin: 0;
  color: var(--fg-muted);
}

/* C) Toggle-Sektionen */
.ship-extra {
  margin-top: 1.5rem;
}
.toggle-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: var(--bg-card);
  border: none;
  padding: 0.75rem;
  margin-bottom: 0.25rem;
  text-align: left;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background .2s;
}
.toggle-btn:hover {
  background: var(--accent-hover);
}
.toggle-content {
  display: none;
  background: var(--bg-card);
  color: var(--fg-text);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px var(--shadow);
  overflow-x: auto;
}
.toggle-content img {
  max-width: 100px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

        .btn-download {
		display: inline-flex;
          display: inline-block;
          margin-top: 20px;
          padding: 12px 24px;
          background: linear-gradient(135deg, #1a73e8, #155ab6);
          color: #fff;
          text-decoration: none;
          font-size: 16px;
          font-weight: bold;
          border-radius: 8px;
          box-shadow: 0 4px 12px rgba(0,0,0,0.15);
          transition: transform 0.1s ease-in-out, box-shadow 0.1s;
        }
        .btn-download:hover {
          background: linear-gradient(135deg, #155ab6, #1a73e8);
          box-shadow: 0 6px 16px rgba(0,0,0,0.2);
        }

/* nur fÃƒÂ¼r unsere WN8-Farbschema-Tabelle */
.wn8-schema td.col-winrate,
.wn8-schema td.col-wn8 {
  font-weight: 800; /* fett = bold */
  font-size: 1.6rem;
}
/* Responsive: ab 600px */
@media (max-width: 600px) {
    font-size: 0.8rem;
	.wn8-schema td.col-winrate,
.wn8-schema td.col-wn8 {
  font-weight: 800; /* fett = bold */
  font-size: 0.7rem;
}
}
.top-stats-heading {
    text-align: center;
    color: #102a43; /* Light Mode: Marineblau */
    font-weight: bold;
    font-size: 1.6rem;
    margin-bottom: 10px;
    margin-top: 30px;
}
/* Dark Mode mit data-theme-Attribut */
html[data-theme="dark"] .top-stats-heading {
    color: #cfe8ff; /* Hellblau fÃƒÂ¼r dunklen Hintergrund */
}
}


    /* Light mode: dark blue title, half the default font size */
    html[data-theme="light"] .welcome {
      color: #155ab6;
      font-size: 80%;
    }
    /* Dark mode: lighter title, half the default font size */
    html[data-theme="dark"] .welcome  {
      color: #a8d0e6;
      font-size: 80%;
    }
	
	.ship-link {
  color: inherit;
  text-decoration: none;
  padding: .2em .4em;
  border-radius: .3em;
  transition: background .2s, color .2s;
}

html[data-theme="light"] .ship-link {
  color: #155ab6;
}
html[data-theme="light"] .ship-link:hover {
  background: rgba(21,90,182,0.1);
}

html[data-theme="dark"] .ship-link {
  color: #58a6ff;
}
html[data-theme="dark"] .ship-link:hover {
  background: rgba(88,166,255,0.2);
}
/* === Homepage layout refresh: restrained content width and unified spacing === */
body > main,
.home-main {
  width: min(100% - 48px, 1760px);
  max-width: 1760px !important;
  margin: 28px auto 0;
  padding-left: 0;
  padding-right: 0;
}

body > main .welcome,
.home-main .welcome,
body > main .stats-cards-container,
.home-main .stats-cards-container,
body > main .social-share,
.home-main .social-share,
body > main iframe,
.home-main iframe {
  max-width: 100%;
}

body > main .welcome,
.home-main .welcome {
  margin: 0 0 22px;
  padding: 22px 26px;
  border: 1px solid rgba(52, 91, 125, 0.16);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(13, 35, 56, 0.08);
}

body > main .welcome-title,
.home-main .welcome-title {
  margin-top: 0;
  margin-bottom: 12px;
}

body > main .stats-cards-container,
.home-main .stats-cards-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 22px 0;
}

body > main .stats-cards-container .stats-card,
.home-main .stats-cards-container .stats-card {
  width: 100%;
  min-width: 0;
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(13, 35, 56, 0.1);
}

body > main .top-stats-heading,
.home-main .top-stats-heading {
  margin-top: 12px;
}

body > main iframe,
.home-main iframe {
  width: 100% !important;
  border-radius: 10px;
}

html[data-theme="dark"] body > main .welcome,
html[data-theme="dark"] .home-main .welcome,
html[data-theme="dark"] body > main .stats-cards-container .stats-card,
html[data-theme="dark"] .home-main .stats-cards-container .stats-card {
  border-color: rgba(124, 183, 228, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

@media (max-width: 1100px) {
  body > main,
  .home-main {
    width: min(100% - 24px, 1180px);
  }

  body > main .stats-cards-container,
  .home-main .stats-cards-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body > main,
  .home-main {
    width: min(100% - 16px, 100%);
    margin-top: 16px;
  }

  body > main .welcome,
  .home-main .welcome {
    padding: 18px 16px;
    margin-bottom: 16px;
  }

  body > main .stats-cards-container,
  .home-main .stats-cards-container {
    gap: 16px;
    margin: 16px 0;
  }
}
/* === Homepage typography step down === */
body {
  font-size: 18px;
}

body > main .welcome,
.home-main .welcome {
  font-size: 0.95rem;
  line-height: 1.48;
}

body > main .welcome-title,
.home-main .welcome-title {
  font-size: 1.55rem;
}

body > main .top-stats-heading,
.home-main .top-stats-heading {
  font-size: 1.42rem;
}

body > main .top-list-note,
.home-main .top-list-note {
  font-size: 0.95rem;
  line-height: 1.42;
}

body > main .custom-sort-table,
.home-main .custom-sort-table {
  font-size: 0.94rem;
}

body > main .player-link .nickname,
.home-main .player-link .nickname {
  font-size: 1.08em;
}

body > main .wn8-cell,
.home-main .wn8-cell {
  font-size: 1.2em !important;
}

@media (max-width: 800px) {
  body {
    font-size: 17px;
  }

  body > main .top-stats-heading,
  .home-main .top-stats-heading {
    font-size: 1.24rem;
  }
}
/* === Homepage card and note polish === */
body > main .stats-cards-container .stats-card,
.home-main .stats-cards-container .stats-card {
  overflow: hidden;
  border: 1px solid rgba(52, 91, 125, 0.12);
  box-shadow: 0 6px 18px rgba(13, 35, 56, 0.06);
}

body > main .stats-cards-container .stats-card:hover,
.home-main .stats-cards-container .stats-card:hover {
  box-shadow: 0 8px 22px rgba(13, 35, 56, 0.08);
}

body > main .top-list-note,
.home-main .top-list-note {
  margin: 0 18px 12px;
  color: #315f92;
  text-align: left;
}

body > main .custom-sort-table,
.home-main .custom-sort-table {
  margin-bottom: 0;
  box-shadow: none;
}

html[data-theme="dark"] body > main .stats-cards-container .stats-card,
html[data-theme="dark"] .home-main .stats-cards-container .stats-card {
  border-color: rgba(124, 183, 228, 0.14);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] body > main .top-list-note,
html[data-theme="dark"] .home-main .top-list-note {
  color: #9ec8ee;
}
/* === Full-width footer refresh === */
.site-footer {
  width: auto;
  margin-left: 0;
  max-width: none;
  box-sizing: border-box;
  margin-right: 0;
  margin-top: 54px;
  padding: 34px 36px;
  color: #dbe8f5;
  background:
    linear-gradient(135deg, #12283c 0%, #183c5b 52%, #0e2235 100%);
  border-top: 1px solid rgba(111, 177, 229, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 -10px 28px rgba(13, 35, 56, 0.08);
  text-align: center;
}

.site-footer p,
.site-footer .footer-content,
.site-footer .footer-links {
  max-width: 1760px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer p {
  margin-top: 0;
  margin-bottom: 13px;
  line-height: 1.55;
}

.site-footer .footer-content {
  display: grid;
  gap: 8px;
  padding: 8px 0 12px;
}

.site-footer .footer-links {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(219, 232, 245, 0.16);
}

.site-footer a {
  color: #9ed0ff;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #ffffff;
  text-decoration: none;
}

html[data-theme="light"] .site-footer,
html[data-theme="dark"] .site-footer {
  color: #dbe8f5;
  background:
    linear-gradient(135deg, #12283c 0%, #183c5b 52%, #0e2235 100%);
  border-top-color: rgba(111, 177, 229, 0.28);
}

html[data-theme="light"] .site-footer a,
html[data-theme="dark"] .site-footer a {
  color: #9ed0ff;
}

html[data-theme="light"] .site-footer a:hover,
html[data-theme="dark"] .site-footer a:hover {
  color: #ffffff;
}

@media (max-width: 700px) {
  .site-footer {
    margin-top: 34px;
    padding: 28px 18px;
    font-size: 0.88rem;
  }
}

/* Prevent decorative footer/background overflow from creating horizontal scroll */
html,
body {
  overflow-x: clip;
}

/* === Ship Wiki side navigation === */
main.wiki-layout {
  width: min(100% - 48px, 1760px);
  max-width: 1760px !important;
  margin: 32px auto 48px !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.wiki-side-nav {
  position: sticky;
  top: 96px;
  align-self: start;
}

.wiki-nav-card,
.wiki-main-panel,
.wiki-search-panel {
  border: 1px solid rgba(52, 91, 125, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(13, 35, 56, 0.07);
}

.wiki-nav-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 12px;
}

.wiki-main-panel {
  min-width: 0;
  padding: 22px;
  border-radius: 14px;
}

.wiki-nav-home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  color: #ffffff !important;
  background: linear-gradient(135deg, #14324d, #1d629d);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none !important;
}

.wiki-nav-overview {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  color: #17496f !important;
  background: #eef6fd;
  font-weight: 750;
  text-decoration: none !important;
}

.wiki-current-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  background: #f5f9fc;
  color: #17344c;
  border: 1px solid rgba(52, 91, 125, 0.12);
}

.wiki-current-box strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.wiki-current-box span {
  color: #587086;
  font-size: 0.86rem;
}

.wiki-side-nav section {
  display: grid;
  gap: 8px;
}

.wiki-side-nav h2 {
  margin: 0;
  color: #17344c;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wiki-tier-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.wiki-nav-pill,
.wiki-nav-link {
  border: 1px solid rgba(52, 91, 125, 0.14);
  color: #17496f !important;
  background: #f8fbfe;
  text-decoration: none !important;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.wiki-nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 9px;
  font-weight: 800;
}

.wiki-link-stack {
  display: grid;
  gap: 7px;
}

.wiki-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-weight: 700;
}

.wiki-nav-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wiki-nav-link small {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: #5a748a;
  background: #edf4fa;
  font-size: 0.74rem;
  font-weight: 800;
}

.wiki-nav-pill:hover,
.wiki-nav-link:hover,
.wiki-nav-overview:hover,
.wiki-nav-pill.active,
.wiki-nav-link.active {
  color: #ffffff !important;
  border-color: #1d73b2;
  background: #1d73b2;
}

.wiki-nav-link.active small,
.wiki-nav-link:hover small {
  color: #1d4f78;
  background: #ffffff;
}

.wiki-search-panel {
  margin: 0 0 18px !important;
  padding: 14px;
  border-radius: 12px;
}

.wiki-main-panel .view-switcher {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.wiki-main-panel .view-switcher button {
  margin: 0;
  border-radius: 999px;
  border-color: rgba(52, 91, 125, 0.18);
  background: #f5f9fc;
  color: #17344c;
  font-weight: 800;
}

.wiki-main-panel .view-switcher button.active {
  color: #fff;
  background: #1d73b2;
  border-color: #1d73b2;
}

.wiki-main-panel .tier-details,
.wiki-main-panel h2[id^="nation-"],
.wiki-main-panel h2[id^="class-"] {
  scroll-margin-top: 110px;
}

.wiki-ship-panel > h1 {
  margin-top: 0;
}

html[data-theme="dark"] .wiki-nav-card,
html[data-theme="dark"] .wiki-main-panel,
html[data-theme="dark"] .wiki-search-panel {
  background: rgba(17, 43, 66, 0.96);
  border-color: rgba(124, 183, 228, 0.16);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .wiki-current-box,
html[data-theme="dark"] .wiki-nav-overview,
html[data-theme="dark"] .wiki-nav-pill,
html[data-theme="dark"] .wiki-nav-link,
html[data-theme="dark"] .wiki-main-panel .view-switcher button {
  background: #0d2235;
  border-color: rgba(124, 183, 228, 0.16);
  color: #dbe8f5 !important;
}

html[data-theme="dark"] .wiki-side-nav h2,
html[data-theme="dark"] .wiki-current-box {
  color: #e5f2ff;
}

html[data-theme="dark"] .wiki-current-box span,
html[data-theme="dark"] .wiki-nav-link small {
  color: #9fb4c7;
}

html[data-theme="dark"] .wiki-nav-pill:hover,
html[data-theme="dark"] .wiki-nav-link:hover,
html[data-theme="dark"] .wiki-nav-pill.active,
html[data-theme="dark"] .wiki-nav-link.active,
html[data-theme="dark"] .wiki-main-panel .view-switcher button.active {
  background: #1d73b2;
  border-color: #2a8bd1;
  color: #ffffff !important;
}

@media (max-width: 980px) {
  main.wiki-layout {
    width: min(100% - 28px, 1760px);
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px !important;
  }

  .wiki-side-nav {
    position: static;
  }

  .wiki-nav-card {
    gap: 14px;
    padding: 14px;
  }

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

  .wiki-main-panel {
    padding: 16px;
  }
}
/* Keep shared footer full browser width, even inside constrained page layouts */
body .site-footer {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box;
}

/* Player pages include the shared footer inside main; keep its band viewport-wide */
body > main > .site-footer {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
}
/* Player overview polish */
main.player-overview-page {
  width: min(100% - 64px, 1760px) !important;
  max-width: 1760px !important;
  margin: 44px auto 0 !important;
}

main.player-overview-page > iframe {
  max-width: 100%;
  border-radius: 12px;
}

main.player-overview-page .player-header {
  margin: 36px auto 30px;
  text-align: center;
}

main.player-overview-page .player-info {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin: 0;
  color: #102a43;
  font-size: clamp(2.25rem, 4.4vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: 0;
}

main.player-overview-page .player-info a.site-titlel {
  color: #102a43 !important;
  text-decoration: none !important;
  font-weight: 900;
}

main.player-overview-page .player-clan {
  color: #28465f;
  font-weight: 600;
}

main.player-overview-page .player-clan a.clan-link {
  color: #28465f !important;
  text-decoration: none !important;
}

main.player-overview-page .stats-overview {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 20px;
  margin: 0 0 38px;
  padding: 0;
}

main.player-overview-page .stat-card {
  min-width: 0;
  min-height: 108px;
  padding: 20px 18px 18px 24px;
  background: linear-gradient(180deg, #ffffff, #f5f8fb);
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(13, 35, 56, 0.08);
}

main.player-overview-page .stat-card .label {
  color: #65798a;
  font-size: 0.98rem;
  font-weight: 700;
}

main.player-overview-page .stat-card .value {
  margin-top: 8px;
  color: #071e33;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 900;
}

main.player-overview-page .stats-section,
main.player-overview-page .ship-stats-section {
  width: 100%;
  margin: 0 auto 34px;
  padding: 0;
}

main.player-overview-page .stats-section-heading,
main.player-overview-page .ship-stats-section-heading,
main.player-overview-page .stats-card h2 {
  color: #102a43;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  margin: 0 0 20px;
  text-align: center;
  letter-spacing: 0;
}

main.player-overview-page .stats-section .table-wrapper,
main.player-overview-page .stats-card {
  width: 100%;
  margin: 0 auto 32px;
  padding: 18px;
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 14px 34px rgba(13, 35, 56, 0.08);
  overflow-x: auto;
}

main.player-overview-page .stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
}

main.player-overview-page .stats-table thead th {
  background: #eaf2f8 !important;
  color: #102a43 !important;
  border-bottom: 1px solid #d8e4ee !important;
  padding: 14px 12px;
  font-weight: 900;
}

main.player-overview-page .stats-table tbody td {
  padding: 13px 12px;
  border-bottom: 1px solid #e1e8ef !important;
  color: #263f55;
  font-weight: 700;
}

main.player-overview-page .stats-table tbody td:first-child {
  color: #102a43;
  font-weight: 900;
  text-align: left;
  min-width: 190px;
}

main.player-overview-page .stats-table tbody tr:nth-child(even) td {
  background: #f7fafc;
}

main.player-overview-page .stats-table .winrate,
main.player-overview-page .stats-table .wn8 {
  color: #ffffff !important;
  font-size: 1.1rem;
  font-weight: 900;
  text-shadow: none;
}

main.player-overview-page .player-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
  color: #49647a;
  font-size: 0.95rem;
}

main.player-overview-page .player-meta p {
  margin: 0;
  padding: 7px 12px;
  border: 1px solid #d8e4ee;
  border-radius: 999px;
  background: #f8fbfe;
  font-weight: 700;
}

main.player-overview-page .link-badge,
main.player-overview-page .btn-download {
  border: 1px solid rgba(29, 115, 178, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, #1d73b2, #145d94);
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(13, 35, 56, 0.14);
  text-decoration: none !important;
}

main.player-overview-page .link-badge {
  padding: 0.38em 0.55em;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

main.player-overview-page .btn-download {
  margin: 6px 8px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

main.player-overview-page .link-badge:hover,
main.player-overview-page .btn-download:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

html[data-theme="dark"] main.player-overview-page .player-info,
html[data-theme="dark"] main.player-overview-page .player-info a.site-titlel,
html[data-theme="dark"] main.player-overview-page .stats-section-heading,
html[data-theme="dark"] main.player-overview-page .ship-stats-section-heading,
html[data-theme="dark"] main.player-overview-page .stats-card h2 {
  color: #e5f2ff !important;
}

html[data-theme="dark"] main.player-overview-page .player-clan,
html[data-theme="dark"] main.player-overview-page .player-clan a.clan-link {
  color: #9fc6e8 !important;
}

html[data-theme="dark"] main.player-overview-page .stat-card,
html[data-theme="dark"] main.player-overview-page .stats-section .table-wrapper,
html[data-theme="dark"] main.player-overview-page .stats-card {
  background: linear-gradient(180deg, #12283c, #0d1f30);
  border-color: rgba(124, 183, 228, 0.16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] main.player-overview-page .stat-card .label,
html[data-theme="dark"] main.player-overview-page .player-meta {
  color: #9fb4c7;
}

html[data-theme="dark"] main.player-overview-page .stat-card .value {
  color: #ffffff;
}

html[data-theme="dark"] main.player-overview-page .stats-table thead th {
  background: #0d2235 !important;
  color: #e5f2ff !important;
  border-color: rgba(124, 183, 228, 0.16) !important;
}

html[data-theme="dark"] main.player-overview-page .stats-table tbody td {
  background: #112b42;
  color: #dbe8f5;
  border-color: rgba(124, 183, 228, 0.12) !important;
}

html[data-theme="dark"] main.player-overview-page .stats-table tbody tr:nth-child(even) td {
  background: #0f263a;
}

html[data-theme="dark"] main.player-overview-page .stats-table tbody td:first-child {
  color: #e5f2ff;
}

html[data-theme="dark"] main.player-overview-page .player-meta p {
  background: #0d2235;
  border-color: rgba(124, 183, 228, 0.16);
}

/* Dashboard page */
main.dashboard-page {
  width: min(100% - 64px, 1240px) !important;
  max-width: 1240px !important;
  margin: 44px auto 0 !important;
}

main.dashboard-page .player-header {
  margin: 36px auto 30px;
  text-align: center;
}

main.dashboard-page .player-info {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  margin: 0;
  color: #102a43;
  font-size: clamp(2.25rem, 4.4vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: 0;
}

main.dashboard-page .player-info a.site-titlel {
  color: #102a43 !important;
  text-decoration: none !important;
  font-weight: 900;
}

main.dashboard-page .dashboard-panel {
  width: 100%;
  margin: 0 auto 42px;
  padding: 22px;
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 14px 34px rgba(13, 35, 56, 0.08);
}

main.dashboard-page .dashboard-heading {
  margin: 0 0 20px;
  color: #102a43;
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0;
}

main.dashboard-page .dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 24px;
}

main.dashboard-page .stat-card {
  min-width: 0;
  min-height: 104px;
  padding: 20px 18px 18px 24px;
  background: linear-gradient(180deg, #ffffff, #f5f8fb);
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(13, 35, 56, 0.08);
}

main.dashboard-page .stat-card .label {
  color: #65798a;
  font-size: 0.98rem;
  font-weight: 700;
}

main.dashboard-page .stat-card .value {
  margin-top: 8px;
  color: #071e33;
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  font-weight: 900;
  overflow-wrap: anywhere;
}

main.dashboard-page .dashboard-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

main.dashboard-page .dashboard-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(29, 115, 178, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, #1d73b2, #145d94);
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(13, 35, 56, 0.14);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

main.dashboard-page .dashboard-button.secondary {
  background: linear-gradient(180deg, #2d8a6b, #1d6b52);
}

main.dashboard-page .dashboard-button.danger {
  background: linear-gradient(180deg, #7a466f, #5c3454);
}

main.dashboard-page .dashboard-button:hover,
main.dashboard-page .dashboard-button:focus {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

main.dashboard-page .dashboard-result {
  min-height: 28px;
  margin: 18px auto 0;
  color: #49647a;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
}

main.dashboard-page .dashboard-result.error {
  color: #9f2f37;
}

html[data-theme="dark"] main.dashboard-page .player-info,
html[data-theme="dark"] main.dashboard-page .player-info a.site-titlel,
html[data-theme="dark"] main.dashboard-page .dashboard-heading,
body[data-theme="dark"] main.dashboard-page .player-info,
body[data-theme="dark"] main.dashboard-page .player-info a.site-titlel,
body[data-theme="dark"] main.dashboard-page .dashboard-heading {
  color: #e5f2ff !important;
}

html[data-theme="dark"] main.dashboard-page .dashboard-panel,
html[data-theme="dark"] main.dashboard-page .stat-card,
body[data-theme="dark"] main.dashboard-page .dashboard-panel,
body[data-theme="dark"] main.dashboard-page .stat-card {
  background: linear-gradient(180deg, #12283c, #0d1f30);
  border-color: rgba(124, 183, 228, 0.16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] main.dashboard-page .stat-card .label,
html[data-theme="dark"] main.dashboard-page .dashboard-result,
body[data-theme="dark"] main.dashboard-page .stat-card .label,
body[data-theme="dark"] main.dashboard-page .dashboard-result {
  color: #9fb4c7;
}

html[data-theme="dark"] main.dashboard-page .stat-card .value,
body[data-theme="dark"] main.dashboard-page .stat-card .value {
  color: #ffffff;
}

html[data-theme="dark"] main.dashboard-page .dashboard-result.error,
body[data-theme="dark"] main.dashboard-page .dashboard-result.error {
  color: #ffb4bd;
}

@media (max-width: 980px) {
  main.player-overview-page {
    width: min(100% - 28px, 1760px) !important;
    margin-top: 24px !important;
  }

  main.player-overview-page .stats-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  main.dashboard-page {
    width: min(100% - 28px, 1240px) !important;
    margin-top: 24px !important;
  }

  main.dashboard-page .dashboard-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main.player-overview-page {
    width: min(100% - 18px, 1760px) !important;
  }

  main.player-overview-page .stats-overview {
    grid-template-columns: 1fr;
  }

  main.player-overview-page .player-info {
    gap: 10px;
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  main.player-overview-page .stats-section .table-wrapper,
  main.player-overview-page .stats-card {
    padding: 10px;
  }

  main.dashboard-page {
    width: min(100% - 18px, 1240px) !important;
  }

  main.dashboard-page .player-info {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  main.dashboard-page .dashboard-panel {
    padding: 14px;
  }

  main.dashboard-page .dashboard-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Clan overview polish */
main.clan-overview-page {
  width: min(100% - 64px, 1760px) !important;
  max-width: 1760px !important;
  margin: 44px auto 0 !important;
}

main.clan-overview-page .clan-hero {
  margin: 36px auto 30px;
  text-align: center;
}

main.clan-overview-page .clan-kicker {
  margin-bottom: 10px;
  color: #4f7698;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

main.clan-overview-page .clan-hero h1 {
  margin: 0;
  color: #102a43;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

main.clan-overview-page .clan-hero p {
  margin: 12px auto 0;
  color: #28465f;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
}

main.clan-overview-page .clan-summary {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 auto 28px;
  padding: 0;
}

main.clan-overview-page .stat-card {
  flex: 0 1 240px;
  min-width: 180px;
  max-width: 260px;
  min-height: 88px;
  padding: 16px 16px 14px 22px;
  background: linear-gradient(180deg, #ffffff, #f5f8fb);
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(13, 35, 56, 0.08);
}

main.clan-overview-page .stat-card .label {
  color: #65798a;
  font-size: 0.98rem;
  font-weight: 700;
}

main.clan-overview-page .stat-card .value {
  margin-top: 6px;
  color: #071e33;
  font-size: clamp(1.35rem, 1.7vw, 1.75rem);
  font-weight: 900;
}

main.clan-overview-page .clan-members-section {
  width: 100%;
  margin: 0 auto 34px;
  padding: 0;
}

main.clan-overview-page .table-wrapper {
  width: 100%;
  margin: 0 auto 32px;
  padding: 18px;
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 14px 34px rgba(13, 35, 56, 0.08);
  overflow-x: auto;
}

main.clan-overview-page .clan-members-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 12px;
}

main.clan-overview-page .clan-members-table thead th {
  background: #eaf2f8 !important;
  color: #102a43 !important;
  border-bottom: 1px solid #d8e4ee !important;
  padding: 14px 12px;
  font-weight: 900;
}

main.clan-overview-page .clan-members-table tbody td {
  padding: 13px 12px;
  border-bottom: 1px solid #e1e8ef !important;
  color: #263f55;
  font-weight: 450;
}

main.clan-overview-page .clan-members-table tbody td:first-child {
  font-weight: 500 !important;
}

main.clan-overview-page .clan-members-table tbody td:nth-child(2) {
  min-width: 220px;
  text-align: left;
}

main.clan-overview-page .clan-members-table .player-link {
  color: #1d73b2 !important;
  font-weight: 650;
  text-decoration: none !important;
}

main.clan-overview-page .clan-members-table .winrate,
main.clan-overview-page .clan-members-table .wn8 {
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 650;
}

html[data-theme="dark"] main.clan-overview-page .clan-kicker {
  color: #9fc6e8;
}

html[data-theme="dark"] main.clan-overview-page .clan-hero h1 {
  color: #e5f2ff;
}

html[data-theme="dark"] main.clan-overview-page .clan-hero p {
  color: #9fb4c7;
}

html[data-theme="dark"] main.clan-overview-page .stat-card,
html[data-theme="dark"] main.clan-overview-page .table-wrapper {
  background: linear-gradient(180deg, #12283c, #0d1f30);
  border-color: rgba(124, 183, 228, 0.16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] main.clan-overview-page .stat-card .label {
  color: #9fb4c7;
}

html[data-theme="dark"] main.clan-overview-page .stat-card .value {
  color: #ffffff;
}

html[data-theme="dark"] main.clan-overview-page .clan-members-table thead th {
  background: #0d2235 !important;
  color: #e5f2ff !important;
  border-color: rgba(124, 183, 228, 0.16) !important;
}

html[data-theme="dark"] main.clan-overview-page .clan-members-table tbody td {
  background: #112b42;
  color: #dbe8f5;
  border-color: rgba(124, 183, 228, 0.12) !important;
}

html[data-theme="dark"] main.clan-overview-page .clan-members-table tbody tr:nth-child(even) td {
  background: #0f263a;
}

html[data-theme="dark"] main.clan-overview-page .clan-members-table .player-link {
  color: #8cc8ff !important;
}

@media (max-width: 980px) {
  main.clan-overview-page {
    width: min(100% - 28px, 1760px) !important;
    margin-top: 24px !important;
  }

  main.clan-overview-page .clan-summary {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  main.clan-overview-page {
    width: min(100% - 18px, 1760px) !important;
  }

  main.clan-overview-page .table-wrapper {
    padding: 10px;
  }

  main.clan-overview-page .stat-card {
    flex-basis: 100%;
    max-width: none;
  }
}

/* Player shipstats polish */
main.player-shipstats-page {
  width: min(100% - 64px, 1760px) !important;
  max-width: 1760px !important;
  margin: 46px auto 0 !important;
}

main.player-shipstats-page .player-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 42px 0 34px;
  color: #102a43;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: 0;
}

main.player-shipstats-page .player-back-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(29, 115, 178, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbfe, #eaf4fb);
  color: #1d73b2 !important;
  font-size: 0;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(13, 35, 56, 0.10);
  transform: translateY(-2px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

main.player-shipstats-page .player-back-link::before {
  content: "";
  width: 12px;
  height: 12px;
  border-left: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  border-radius: 2px;
  transform: translateX(2px) rotate(45deg);
}

main.player-shipstats-page .player-back-link:hover {
  background: #1d73b2;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(29, 115, 178, 0.24);
  transform: translate(-3px, -2px);
}

main.player-shipstats-page .stats-overview {
  width: 100%;
  max-width: none;
  gap: 20px;
  margin-bottom: 34px;
}

main.player-shipstats-page .stat-card {
  min-height: 96px;
  background: linear-gradient(180deg, #fff, #f5f8fb);
  border: 1px solid rgba(52, 91, 125, 0.12);
  box-shadow: 0 10px 26px rgba(13, 35, 56, 0.08);
}

main.player-shipstats-page .ship-stats-section {
  width: 100%;
  padding: 0;
}

main.player-shipstats-page .ship-stats-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 24px 0;
}

main.player-shipstats-page #ship-stats-wrapper {
  display: block !important;
  padding: 18px;
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f7fafc);
  box-shadow: 0 14px 34px rgba(13, 35, 56, 0.08);
  overflow-x: auto;
}

main.player-shipstats-page .dataTables_wrapper .dataTables_length,
main.player-shipstats-page .dataTables_wrapper .dataTables_filter {
  margin: 0 0 14px;
  color: #102a43;
  font-weight: 700;
}

main.player-shipstats-page .dataTables_wrapper .dataTables_filter input,
main.player-shipstats-page .dataTables_wrapper .dataTables_length select {
  border: 1px solid #c8d8e6;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
}

main.player-shipstats-page #shipTable {
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

main.player-shipstats-page #shipTable thead th {
  background: #eaf2f8 !important;
  color: #102a43 !important;
  border-color: #d8e4ee !important;
  padding: 13px 12px;
}

main.player-shipstats-page #shipTable tbody td {
  border-color: #e1e8ef !important;
  padding: 12px;
  vertical-align: middle;
}

main.player-shipstats-page #shipTable tbody tr:nth-child(even) td {
  background: #f7fafc;
}

main.player-shipstats-page .ship-name-card {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #0759af;
  font-weight: 900;
  text-decoration: none;
  min-width: 240px;
}

main.player-shipstats-page .ship-name-card img {
  width: 118px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 118px;
  filter: drop-shadow(0 8px 10px rgba(20, 45, 65, 0.12));
}

main.player-shipstats-page .ship-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  padding: 6px 10px;
  border: 1px solid #d8e4ee;
  border-radius: 999px;
  background: #f8fbfe;
  color: #415b73;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

main.player-shipstats-page .ship-mini-badge img {
  height: 22px !important;
  max-width: 42px;
  object-fit: contain;
  box-shadow: none;
  margin: 0;
}

main.player-shipstats-page #shipTable td.winrate,
main.player-shipstats-page #shipTable td.wn8 {
  font-weight: 900;
  font-size: 1.05rem;
}

html[data-theme="dark"] main.player-shipstats-page .player-info {
  color: #e5f2ff;
}

html[data-theme="dark"] main.player-shipstats-page .player-back-link {
  background: linear-gradient(180deg, #13314b, #0d2235);
  border-color: rgba(124, 183, 228, 0.22);
  color: #8cc8ff !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] main.player-shipstats-page .player-back-link:hover {
  background: #1d73b2;
  color: #ffffff !important;
}

html[data-theme="dark"] main.player-shipstats-page .stat-card,
html[data-theme="dark"] main.player-shipstats-page #ship-stats-wrapper {
  background: linear-gradient(180deg, #12283c, #0d1f30);
  border-color: rgba(124, 183, 228, 0.16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] main.player-shipstats-page #shipTable thead th {
  background: #0d2235 !important;
  color: #e5f2ff !important;
  border-color: rgba(124, 183, 228, 0.16) !important;
}

html[data-theme="dark"] main.player-shipstats-page #shipTable tbody td {
  background: #112b42;
  color: #dbe8f5;
  border-color: rgba(124, 183, 228, 0.12) !important;
}

html[data-theme="dark"] main.player-shipstats-page #shipTable tbody tr:nth-child(even) td {
  background: #0f263a;
}

html[data-theme="dark"] main.player-shipstats-page .ship-name-card {
  color: #8cc8ff;
}

html[data-theme="dark"] main.player-shipstats-page .ship-mini-badge {
  background: #0d2235;
  color: #dbe8f5;
  border-color: rgba(124, 183, 228, 0.16);
}

@media (max-width: 900px) {
  main.player-shipstats-page {
    width: min(100% - 24px, 1760px) !important;
    margin-top: 24px !important;
  }

  main.player-shipstats-page .ship-name-card img {
    width: 92px;
    flex-basis: 92px;
  }
}

@media (max-width: 560px) {
  main.player-shipstats-page .player-info {
    gap: 12px;
  }

  main.player-shipstats-page .player-back-link {
    width: 40px;
    height: 40px;
  }

  main.player-shipstats-page .player-back-link::before {
    width: 10px;
    height: 10px;
    border-width: 3px;
  }
}
/* Footer and imprint polish */
.site-footer .footer-inner {
  width: min(100% - 64px, 1760px);
  max-width: 1760px;
  margin: 0 auto;
}

.site-footer .footer-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  text-align: left;
}

.site-footer .footer-logo {
  color: #ffffff;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  font-weight: 900;
  letter-spacing: 0;
}

.site-footer .footer-brand p,
.site-footer .footer-panel p {
  margin: 0;
  color: #c8d9e8;
  line-height: 1.55;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.site-footer .footer-panel {
  padding: 18px;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.site-footer .footer-nav,
.site-footer .footer-legal {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer .footer-nav a,
.site-footer .footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(158, 208, 255, 0.18);
  border-radius: 999px;
  background: rgba(13, 34, 53, 0.34);
}

.site-footer .footer-legal {
  justify-content: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(219, 232, 245, 0.16);
}

.imprint-page {
  width: min(100% - 64px, 1760px);
  max-width: 1760px;
  margin: 44px auto 0;
}

.imprint-hero {
  margin-bottom: 22px;
  text-align: center;
}

.imprint-kicker {
  margin: 0 0 8px;
  color: #1d73b2;
  font-weight: 900;
}

.imprint-hero h1 {
  margin: 0;
  color: #102a43;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  letter-spacing: 0;
}

.imprint-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.imprint-card {
  padding: 22px;
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 14px 34px rgba(13, 35, 56, 0.08);
  color: #263f55;
}

.imprint-card h2 {
  margin: 0 0 14px;
  color: #102a43;
  font-size: 1.35rem;
}

.imprint-card h3 {
  margin: 20px 0 8px;
  color: #143b5b;
}

.imprint-card p {
  line-height: 1.65;
}

.imprint-card a {
  color: #0759af;
  font-weight: 800;
  text-decoration: none;
}

.imprint-card img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 14px;
  border-radius: 10px;
  border: 1px solid rgba(52, 91, 125, 0.12);
}

.imprint-disclaimer,
.imprint-odr {
  margin-top: 18px;
}

html[data-theme="dark"] .imprint-kicker {
  color: #8cc8ff;
}

html[data-theme="dark"] .imprint-hero h1,
html[data-theme="dark"] .imprint-card h2,
html[data-theme="dark"] .imprint-card h3 {
  color: #e5f2ff;
}

html[data-theme="dark"] .imprint-card {
  background: linear-gradient(180deg, #12283c, #0d1f30);
  border-color: rgba(124, 183, 228, 0.16);
  color: #dbe8f5;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .imprint-card a {
  color: #8cc8ff;
}

@media (max-width: 980px) {
  .site-footer .footer-inner,
  .imprint-page {
    width: min(100% - 28px, 1760px);
  }

  .site-footer .footer-grid,
  .imprint-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-footer .footer-inner,
  .imprint-page {
    width: min(100% - 18px, 1760px);
  }

  .site-footer .footer-panel,
  .imprint-card {
    padding: 16px;
  }
}
/* Privacy page polish */
.privacy-page {
  width: min(100% - 64px, 1760px);
  max-width: 1760px;
  margin: 44px auto 0;
}

.privacy-hero {
  margin-bottom: 22px;
  text-align: center;
}

.privacy-kicker {
  margin: 0 0 8px;
  color: #1d73b2;
  font-weight: 900;
}

.privacy-hero h1 {
  margin: 0;
  color: #102a43;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  letter-spacing: 0;
}

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

.privacy-card {
  padding: 22px;
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 14px 34px rgba(13, 35, 56, 0.08);
  color: #263f55;
}

.privacy-card-wide {
  grid-column: span 2;
}

.privacy-card h2 {
  margin: 0 0 12px;
  color: #102a43;
  font-size: 1.28rem;
}

.privacy-card p {
  margin: 0;
  line-height: 1.65;
}

.privacy-card p + p {
  margin-top: 10px;
}

.privacy-card a {
  color: #0759af;
  font-weight: 800;
  text-decoration: none;
}

.privacy-card-year {
  border-color: rgba(29, 115, 178, 0.24);
  background: linear-gradient(180deg, #f8fbfe, #eef6fc);
}

html[data-theme="dark"] .privacy-kicker {
  color: #8cc8ff;
}

html[data-theme="dark"] .privacy-hero h1,
html[data-theme="dark"] .privacy-card h2 {
  color: #e5f2ff;
}

html[data-theme="dark"] .privacy-card {
  background: linear-gradient(180deg, #12283c, #0d1f30);
  border-color: rgba(124, 183, 228, 0.16);
  color: #dbe8f5;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .privacy-card a {
  color: #8cc8ff;
}

@media (max-width: 980px) {
  .privacy-page {
    width: min(100% - 28px, 1760px);
  }

  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .privacy-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .privacy-page {
    width: min(100% - 18px, 1760px);
  }

  .privacy-card {
    padding: 16px;
  }
}
/* Contact page polish */
.contact-page {
  width: min(100% - 64px, 1760px);
  max-width: 1760px;
  margin: 44px auto 0;
}

.contact-hero {
  margin-bottom: 22px;
  text-align: center;
}

.contact-kicker {
  margin: 0 0 8px;
  color: #1d73b2;
  font-weight: 900;
}

.contact-hero h1 {
  margin: 0;
  color: #102a43;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  letter-spacing: 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.contact-card {
  padding: 24px;
  border: 1px solid rgba(52, 91, 125, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 14px 34px rgba(13, 35, 56, 0.08);
  color: #263f55;
}

.contact-card h2 {
  margin: 0 0 14px;
  color: #102a43;
  font-size: 1.45rem;
}

.contact-card p {
  margin: 0;
  line-height: 1.65;
}

.contact-mail-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid rgba(29, 115, 178, 0.22);
  border-radius: 999px;
  background: #f0f7fc;
  color: #17496f;
  font-weight: 900;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: #102a43;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c8d8e6;
  border-radius: 10px;
  background: #ffffff;
  color: #102a43;
  padding: 12px 13px;
  font: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 180px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #1d73b2;
  box-shadow: 0 0 0 4px rgba(29, 115, 178, 0.12);
}

.contact-form button {
  justify-self: start;
  border: 1px solid rgba(29, 115, 178, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, #1d73b2, #145d94);
  color: #ffffff;
  padding: 12px 20px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(13, 35, 56, 0.14);
}

.contact-form button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.contact-notice {
  width: min(100%, 940px);
  margin: 0 auto 18px;
  padding: 14px 16px;
  border-radius: 12px;
  text-align: center;
  font-weight: 800;
}

.contact-success {
  border: 1px solid rgba(39, 174, 96, 0.24);
  background: rgba(39, 174, 96, 0.10);
  color: #17683a;
}

.contact-error {
  border: 1px solid rgba(198, 40, 40, 0.24);
  background: rgba(198, 40, 40, 0.10);
  color: #922020;
}

html[data-theme="dark"] .contact-kicker {
  color: #8cc8ff;
}

html[data-theme="dark"] .contact-hero h1,
html[data-theme="dark"] .contact-card h2,
html[data-theme="dark"] .contact-form label {
  color: #e5f2ff;
}

html[data-theme="dark"] .contact-card {
  background: linear-gradient(180deg, #12283c, #0d1f30);
  border-color: rgba(124, 183, 228, 0.16);
  color: #dbe8f5;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .contact-mail-pill {
  background: #0d2235;
  border-color: rgba(124, 183, 228, 0.18);
  color: #dbe8f5;
}

html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea {
  background: #0d2235;
  border-color: rgba(124, 183, 228, 0.18);
  color: #e5f2ff;
}

html[data-theme="dark"] .contact-success {
  color: #9ef2be;
}

html[data-theme="dark"] .contact-error {
  color: #ffb4b4;
}

@media (max-width: 980px) {
  .contact-page {
    width: min(100% - 28px, 1760px);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .contact-page {
    width: min(100% - 18px, 1760px);
  }

  .contact-card {
    padding: 16px;
  }

  .contact-form button {
    width: 100%;
  }
}
/* === Welcome mascot === */
body > main .welcome-with-mascot,
.home-main .welcome-with-mascot {
  display: grid;
  grid-template-columns: minmax(250px, 295px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
}

body > main .welcome-mascot,
.home-main .welcome-mascot {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 270px;
  align-self: end;
}

body > main .welcome-mascot img,
.home-main .welcome-mascot img {
  width: min(100%, 318px);
  height: auto;
  display: block;
  margin: 0 0 -28px -16px;
  filter: drop-shadow(0 18px 30px rgba(13, 35, 56, 0.2));
}

body > main .welcome-copy,
.home-main .welcome-copy {
  min-width: 0;
  align-self: center;
}

body > main .welcome-copy p:last-child,
.home-main .welcome-copy p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  body > main .welcome-with-mascot,
  .home-main .welcome-with-mascot {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 18px;
  }

  body > main .welcome-mascot,
  .home-main .welcome-mascot {
    min-height: 180px;
  }

  body > main .welcome-mascot img,
  .home-main .welcome-mascot img {
    width: min(100%, 190px);
  }
}

@media (max-width: 760px) {
  body > main .welcome-with-mascot,
  .home-main .welcome-with-mascot {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: left;
  }

  body > main .welcome-mascot,
  .home-main .welcome-mascot {
    min-height: 0;
    justify-content: center;
  }

  body > main .welcome-mascot img,
  .home-main .welcome-mascot img {
    width: min(56vw, 170px);
    margin: -4px auto 0;
  }
}
/* === Homepage final compact polish === */
body > main .welcome-with-mascot,
.home-main .welcome-with-mascot {
  padding: 16px 22px 0;
}

body > main .welcome-with-mascot .welcome-mascot,
.home-main .welcome-with-mascot .welcome-mascot {
  min-height: 220px;
}

body > main .welcome-with-mascot .welcome-mascot img,
.home-main .welcome-with-mascot .welcome-mascot img {
  margin: 0 0 -30px -18px;
}

@media (max-width: 640px) {
  body > main .welcome-with-mascot,
  .home-main .welcome-with-mascot {
    padding: 14px 14px 0;
  }

  body > main .color-schema-table.wn8-schema,
  .home-main .color-schema-table.wn8-schema {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
    font-size: 0.74rem;
  }

  body > main .color-schema-table.wn8-schema th,
  body > main .color-schema-table.wn8-schema td,
  .home-main .color-schema-table.wn8-schema th,
  .home-main .color-schema-table.wn8-schema td {
    padding: 6px 4px;
    line-height: 1.12;
    white-space: normal;
    overflow: hidden;
  }

  body > main .color-schema-table.wn8-schema th:first-child,
  body > main .color-schema-table.wn8-schema td:first-child,
  .home-main .color-schema-table.wn8-schema th:first-child,
  .home-main .color-schema-table.wn8-schema td:first-child {
    width: 32%;
    font-size: 0.72rem;
  }

  body > main .wn8-schema td.col-winrate,
  body > main .wn8-schema td.col-wn8,
  .home-main .wn8-schema td.col-winrate,
  .home-main .wn8-schema td.col-wn8 {
    width: 34%;
    font-size: 0.95rem;
    line-height: 1.05;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  body > main .color-schema-table.wn8-schema,
  .home-main .color-schema-table.wn8-schema {
    font-size: 0.68rem;
  }

  body > main .wn8-schema td.col-winrate,
  body > main .wn8-schema td.col-wn8,
  .home-main .wn8-schema td.col-winrate,
  .home-main .wn8-schema td.col-wn8 {
    font-size: 0.84rem;
  }
}
/* === Welcome copy vertical balance === */
body > main .welcome-with-mascot .welcome-copy,
.home-main .welcome-with-mascot .welcome-copy {
  align-self: center;
  padding: 8px 0 18px;
}

body > main .welcome-with-mascot .welcome-title,
.home-main .welcome-with-mascot .welcome-title {
  margin-bottom: 16px;
}

@media (max-width: 760px) {
  body > main .welcome-with-mascot .welcome-copy,
  .home-main .welcome-with-mascot .welcome-copy {
    padding: 0 0 16px;
  }
}

/* === Local partner strips === */
body > main .partner-strip,
.home-main .partner-strip {
  width: 100%;
  min-height: 86px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 22px 0;
  padding: 8px 12px;
  border-top: 1px dotted rgba(90, 49, 117, 0.55);
  border-bottom: 1px dotted rgba(90, 49, 117, 0.55);
  background: #f9f9f9;
  overflow: hidden;
}

body > main .partner-strip-youtube,
.home-main .partner-strip-youtube {
  min-height: 118px;
}

body > main .partner-strip-logo,
.home-main .partner-strip-logo,
body > main .partner-add,
.home-main .partner-add {
  display: flex;
  align-items: center;
  justify-content: center;
}

body > main .partner-strip-logo img,
.home-main .partner-strip-logo img,
body > main .partner-add img,
.home-main .partner-add img {
  display: block;
  height: auto;
}

body > main .partner-strip-items,
.home-main .partner-strip-items {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
}

body > main .partner-stream,
.home-main .partner-stream {
  width: 128px;
  min-width: 96px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: powderblue;
  text-align: center;
  text-decoration: none;
}

body > main .partner-stream span,
.home-main .partner-stream span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body > main .partner-video,
.home-main .partner-video {
  flex: 0 0 auto;
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
}

body > main .partner-video img,
.home-main .partner-video img {
  display: block;
  width: 160px;
  height: 90px;
  object-fit: cover;
}

body > main .partner-stream:hover,
body > main .partner-stream:focus,
.home-main .partner-stream:hover,
.home-main .partner-stream:focus {
  color: hotpink;
}

body > main .partner-video:hover img,
body > main .partner-video:focus img,
body > main .partner-add:hover img,
body > main .partner-add:focus img,
.home-main .partner-video:hover img,
.home-main .partner-video:focus img,
.home-main .partner-add:hover img,
.home-main .partner-add:focus img {
  box-shadow: 0 0 8px 3px rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] body > main .partner-strip,
html[data-theme="dark"] .home-main .partner-strip {
  background: #0e2439;
  color: #e8f0fc;
}

@media (max-width: 760px) {
  body > main .partner-strip,
  .home-main .partner-strip {
    gap: 10px;
    margin: 16px 0;
    padding: 8px;
  }

  body > main .partner-strip-items,
  .home-main .partner-strip-items {
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  body > main .partner-stream,
  .home-main .partner-stream {
    width: 92px;
    font-size: 0.82rem;
  }

  body > main .partner-video img,
  .home-main .partner-video img {
    width: 128px;
    height: 72px;
  }
}

/* Partner iframe rollback fix */
body > main iframe.partner-iframe,
.home-main iframe.partner-iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  margin: 20px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

body > main iframe.twitch-live-iframe,
.home-main iframe.twitch-live-iframe {
  height: 92px;
}

body > main iframe.yt-iframe,
.home-main iframe.yt-iframe {
  height: 132px;
}

@media (max-width: 760px) {
  body > main iframe.twitch-live-iframe,
  .home-main iframe.twitch-live-iframe {
    height: 96px;
  }

  body > main iframe.yt-iframe,
  .home-main iframe.yt-iframe {
    height: 124px;
  }
}
/* Player overview table weight tuning */
main.player-overview-page .stats-table thead th {
  font-weight: 500 !important;
  text-shadow: none !important;
}

main.player-overview-page .stats-table tbody td,
main.player-overview-page .stats-table tbody td:first-child {
  font-weight: 400 !important;
  text-shadow: none !important;
}

main.player-overview-page .stats-table .winrate,
main.player-overview-page .stats-table .wn8 {
  font-weight: 650 !important;
  text-shadow: none !important;
}

main.player-overview-page .player-meta p {
  font-weight: 400 !important;
}
