/* Gemeinsames Stylesheet fuer Landingpage, Anmeldung, Impressum, Datenschutz und Admin-Dashboard.
   Uebernimmt die Optik der Liga-Seiten (dunkler Header mit Cyan-Akzent, roter Markenakzent #e40613). */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 24px;
  background-color: #1a1a1a;
  border-bottom: 4px solid #e40613;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.site-header .brand img { height: 40px; }

.site-header .header-links,
.site-header .header-rechts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.startseite-knopf {
  background-color: #1a1a1a;
  color: cyan;
  border: 2px solid cyan;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.startseite-knopf:hover {
  background-color: cyan;
  color: #1a1a1a;
  box-shadow: 0 0 10px cyan;
}

select.startseite-knopf {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url('data:image/svg+xml;utf8,<svg fill="cyan" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
}

select.startseite-knopf option {
  background-color: #1a1a1a;
  color: cyan;
}

main.page {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card h1, .card h2 { color: #333; margin-bottom: 1rem; }
.card h1 { border-bottom: 2px solid #e40613; padding-bottom: 0.5rem; }

.hero {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.15rem;
  color: #555;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-has-bg {
  color: #fff;
  padding: 5rem 1.5rem;
}

.hero-has-bg h1,
.hero-has-bg p {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.tile {
  display: block;
  background: white;
  border-radius: 10px;
  padding: 1.6rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-top: 4px solid #e40613;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.tile .tile-title { font-size: 1.2rem; font-weight: bold; margin-bottom: 0.4rem; }
.tile .tile-sub { font-size: 0.9rem; color: #777; }

.btn {
  display: inline-block;
  background-color: #e40613;
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover { background-color: #b90510; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(228, 6, 19, 0.3); }
.btn:active { transform: translateY(0); }
.btn-secondary { background-color: #555; }
.btn-secondary:hover { background-color: #333; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); }
.btn-small { padding: 6px 14px; font-size: 13px; }

form .field {
  margin-bottom: 1rem;
}

form label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="file"],
form select,
form textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="number"]:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: #e40613;
  box-shadow: 0 0 0 3px rgba(228, 6, 19, 0.15);
}

form textarea { min-height: 90px; resize: vertical; }

.field-hint { font-size: 0.8rem; color: #777; margin-top: 3px; }

.honeypot-field { position: absolute; left: -9999px; top: -9999px; }

.flash {
  padding: 12px 16px;
  border-radius: 5px;
  margin-bottom: 1.2rem;
  font-weight: bold;
}

.flash-success { background: #dcf5e0; color: #1e7a34; border: 1px solid #b8e6c1; }
.flash-error { background: #fbdede; color: #a3231f; border: 1px solid #f3b6b6; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.status-pending { background: #fff3cd; color: #8a6d00; }
.status-confirmed { background: #dcf5e0; color: #1e7a34; }
.status-rejected { background: #fbdede; color: #a3231f; }

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.admin-topbar h1 {
  border: none;
  margin: 0;
  font-size: 1.8rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-tile {
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 1.1rem 1rem;
  text-align: center;
  border-top: 4px solid #e40613;
}

.stat-tile .stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #00ffcc;
  line-height: 1.1;
}

.stat-tile .stat-label {
  font-size: 0.78rem;
  color: #ccc;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab-link {
  padding: 10px 18px;
  text-decoration: none;
  font-weight: bold;
  color: #555;
  background: #f2f2f2;
  border-radius: 8px 8px 0 0;
  border-bottom: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab-link:hover {
  background: #e9e9e9;
}

.tab-link.active {
  color: #fff;
  background: #1a1a1a;
  border-bottom-color: #e40613;
}

.tab-badge {
  display: inline-block;
  background: #e40613;
  color: #fff;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.7rem;
  margin-left: 6px;
  vertical-align: middle;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th, .admin-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 0.95rem;
  vertical-align: top;
}

.admin-table th { background: #f2f2f2; }
.admin-table tbody tr:nth-child(even) { background: #fafafa; }
.admin-table tbody tr:hover { background: #fff3f3; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.toggle-row:last-child { border-bottom: none; }

.toggle-row .league-name { font-weight: bold; min-width: 160px; }

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: 0.2s;
}

.switch .slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .slider { background-color: #1e7a34; }
.switch input:checked + .slider::before { transform: translateX(22px); }

.team-row-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 0.6fr 0.7fr 0.7fr 0.8fr 0.8fr 0.6fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.team-row-grid input { width: 100%; padding: 6px 8px; font-size: 13px; }

.site-footer {
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  padding: 15px 0;
  margin-top: 40px;
  font-size: 13px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  color: #333333;
  text-decoration: none;
  font-weight: bold;
}

.footer-links a:hover { color: #e40613; }

.footer-copy { color: #666666; }

.placeholder-text {
  background: #fffbe6;
  border: 1px dashed #e0c46c;
  padding: 1rem;
  border-radius: 6px;
  color: #6b5900;
  font-size: 0.95rem;
}

.theme-button {
  background-color: #1a1a1a;
  color: cyan;
  border: 2px solid cyan;
  padding: 10px 20px;
  border-radius: 5px;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-button:hover {
  background-color: cyan;
  color: #1a1a1a;
  box-shadow: 0 0 10px cyan;
  transform: translateY(-1px);
}

/* ==========================================================
   DARKMODE
   ========================================================== */

body,
.card,
.tile,
.admin-table,
.stat-tile,
.site-footer,
.tab-link,
form input,
form select,
form textarea {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode {
  background-color: #101216;
  color: #f5f5f5;
}

body.dark-mode .card {
  background-color: #181b20;
  color: #f5f5f5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}

body.dark-mode .card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

body.dark-mode form input:focus,
body.dark-mode form select:focus,
body.dark-mode form textarea:focus {
  border-color: cyan;
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.15);
}

body.dark-mode .card h1,
body.dark-mode .card h2 {
  color: #f5f5f5;
}

body.dark-mode .hero p {
  color: #ccc;
}

body.dark-mode .tile {
  background: #181b20;
  color: #f5f5f5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}

body.dark-mode .tile .tile-sub {
  color: #aeb4bd;
}

body.dark-mode form input[type="text"],
body.dark-mode form input[type="email"],
body.dark-mode form input[type="password"],
body.dark-mode form input[type="number"],
body.dark-mode form select,
body.dark-mode form textarea {
  background: #20242a;
  border-color: #3b4048;
  color: #f5f5f5;
}

body.dark-mode .field-hint {
  color: #9aa0a8;
}

body.dark-mode .admin-table th {
  background: #20242a;
  color: #f5f5f5;
}

body.dark-mode .admin-table th,
body.dark-mode .admin-table td {
  border-bottom-color: #30343b;
}

body.dark-mode .admin-table tbody tr:nth-child(even) {
  background: #181b20;
}

body.dark-mode .admin-table tbody tr:hover {
  background: #23272e;
}

body.dark-mode .tab-link {
  background: #20242a;
  color: #ccc;
}

body.dark-mode .tab-link:hover {
  background: #2a2f36;
}

body.dark-mode .tab-link.active {
  background: #000;
  color: #fff;
}

body.dark-mode .toggle-row {
  border-bottom-color: #30343b;
}

body.dark-mode .site-footer {
  background-color: #111318;
  border-top-color: #30343b;
}

body.dark-mode .footer-links a {
  color: #f5f5f5;
}

body.dark-mode .footer-links a:hover {
  color: cyan;
}

body.dark-mode .footer-copy {
  color: #aaaaaa;
}

body.dark-mode .placeholder-text {
  background: #2a2410;
  border-color: #5a4d1f;
  color: #e0cf8a;
}

body.dark-mode .admin-topbar h1 {
  color: #f5f5f5;
}
