/* =========================================
   INDEX PAGE STYLES
   ========================================= */

.ally-pally-bg {
  background:
    radial-gradient(circle at 50% 0%, rgba(48,159,106,0.1) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(227,41,46,0.1) 0%, transparent 50%),
    #0a0a0f;
  padding: 60px 20px;
  text-align: center;
  border-bottom: 1px solid #1a1a24;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 4px 15px rgba(0,0,0,0.8);
  margin: 0 0 5px 0;
  letter-spacing: 2px;
}

.hero-sub {
  color: var(--dart-green);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: bold;
  margin: 0;
}

.sub-hello {
  margin-top: 10px;
  color: #ccc;
  font-weight: 800;
  letter-spacing: 1px;
}
.sub-hello strong { color: #fff; }

.live-banner-wrapper {
  padding: 0 20px;
  max-width: 1200px;
  margin: 30px auto -10px auto;
}
.live-banner {
  background: linear-gradient(135deg, #1a0505, #330a0c);
  border: 1px solid var(--dart-red);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 0 20px rgba(227, 41, 46, 0.2);
  animation: pulseLive 2.5s infinite alternate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
@keyframes pulseLive {
  0%   { box-shadow: 0 0 10px rgba(227,41,46,0.1); }
  100% { box-shadow: 0 0 25px rgba(227,41,46,0.4); }
}
.live-title {
  color: #fff;
  margin: 0;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 900;
}
.live-dot {
  width: 14px;
  height: 14px;
  background-color: #ff3b41;
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 0 10px #ff3b41;
  animation: blink 1s infinite alternate;
}
@keyframes blink { from { opacity: 1; } to { opacity: 0.4; } }

.live-btn {
  display: inline-block;
  padding: 10px 30px;
  background: var(--dart-red);
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.2s, background .2s ease;
}
.live-btn:hover { transform: scale(1.05); background: #ff3b41; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px 60px 20px;
}

.feature-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 30px;
  transition: transform 0.3s ease, border-color .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  text-align: center;
}
.feature-card:hover { transform: translateY(-5px); border-color: #444; }

.card-title {
  margin: 0 0 15px 0;
  font-size: 1.5rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-card { border-top: 3px solid var(--dart-red); }

.gallery-card-home {
  border-top: 3px solid var(--dart-green);
  padding: 0;
  overflow: hidden;
}
.gallery-preview {
  height: 160px;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.gallery-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.5s, opacity .25s ease;
}
.gallery-card-home:hover .gallery-preview img { opacity: 1; transform: scale(1.05); }

.gallery-content {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ig-card {
  border-top: 3px solid #bc1888;
  background: linear-gradient(45deg, rgba(240, 148, 51, 0.1), rgba(188, 24, 136, 0.1), #111);
}
.ig-icon {
  font-size: 3.5rem;
  margin-bottom: 10px;
  background: -webkit-linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ig-btn {
  display: inline-block;
  margin-top: 20px;
  background: #fff;
  color: #dc2743;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s, box-shadow .2s ease;
}
.ig-btn:hover { transform: scale(1.05); }

/* Spieler-Quicklinks */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 10px;
}
.quick-card {
  background: linear-gradient(135deg, #0f0f14, #111);
  border: 1px solid #222;
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: #fff;
  text-align: left;
  transition: transform .15s ease, border-color .15s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 105px;
}
.quick-card:hover { transform: translateY(-3px); border-color: var(--dart-green); }

.quick-top { display: flex; justify-content: space-between; align-items: center; }
.quick-ico { font-size: 1.6rem; }
.quick-title {
  font-weight: 1000;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.quick-sub { color: #888; font-size: 0.9rem; line-height: 1.3; }

/* Spieler-Stats Panel */
.mini-stats {
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid #222;
  border-radius: 12px;
  padding: 18px;
  margin-top: 14px;
  text-align: left;
}
.mini-stats h3 {
  margin: 0 0 12px 0;
  color: var(--dart-green);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1rem;
}
.mini-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #222;
  color: #ccc;
}
.mini-row:last-child { border-bottom: none; }
.mini-row strong { color: #fff; }

/* Admin Status */
.admin-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.admin-stat {
  background: #0b0b0f;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.admin-stat .lbl {
  color: #777;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.7rem;
}
.admin-stat .val {
  font-size: 2rem;
  font-weight: 1000;
  color: #fff;
  margin-top: 6px;
}
.admin-stat .sub {
  color: #666;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Player Playcard */
.playcard {
  width: 100%;
  background: linear-gradient(145deg, rgba(48,159,106,0.12), rgba(17,17,17,1));
  border: 1px solid rgba(48,159,106,0.30);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 6px 0 12px 0;
  box-shadow: 0 12px 34px rgba(0,0,0,0.35);
  text-align: left;
}
.playcard .av {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--dart-green);
  background: #000;
  flex-shrink: 0;
}
.playcard .meta { flex: 1; min-width: 0; }
.playcard .k {
  color: #777;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
  font-size: 0.72rem;
}
.playcard .name {
  color: #fff;
  font-weight: 1000;
  font-size: 1.25rem;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playcard .motto {
  color: #aaa;
  margin-top: 4px;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playcard .right { text-align: right; }
.playcard .eloK {
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
  font-size: 0.72rem;
}
.playcard .eloV {
  color: var(--dart-green);
  font-weight: 1000;
  font-size: 1.7rem;
  line-height: 1;
}
.playcard .pc-btn {
  margin-top: 10px;
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  background: rgba(48,159,106,0.18);
  border: 1px solid rgba(48,159,106,0.35);
  color: #fff;
  font-weight: 1000;
}
.playcard .pc-btn:hover { border-color: var(--dart-green); transform: translateY(-1px); }

/* POTM Side Badge */
.potm-side {
  position: fixed;
  right: 14px;
  top: 140px;
  z-index: 50;
  width: 240px;
  text-decoration: none;
  color: #fff;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  overflow: hidden;
  opacity: 0.78;
  transition: .15s ease;
}
.potm-side:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(212,175,55,0.6);
}
.potm-side .top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px 12px;
}
.potm-side img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212,175,55,0.7);
}
.potm-side .t1 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.7);
  font-weight: 900;
}
.potm-side .t2 {
  font-size: 1.05rem;
  font-weight: 1000;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.potm-side .gain {
  margin-left: auto;
  font-weight: 1000;
  color: #D4AF37;
}
.potm-side .hint {
  padding: 0 12px 12px 12px;
  color: #aaa;
  font-size: 0.86rem;
}

/* Generic helper buttons used in index.php */
.btn.btn-ghost{
  background: transparent;
  border: 1px solid #444;
  color: #ccc;
}
.btn.btn-green{
  background: var(--dart-green);
  color: #000;
  border: none;
}
.btn.btn-ghost:hover{ border-color:#666; }
.btn.btn-green:hover{ filter: brightness(1.04); }

/* Responsive */
@media (max-width: 980px) {
  .potm-side {
    position: static;
    width: auto;
    margin: 12px 20px 0 20px;
  }
}
@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
}

/* =========================================
   LIGHT MODE OVERRIDES (Index)
   ========================================= */
html[data-theme="light"] .ally-pally-bg{
  background:
    radial-gradient(circle at 50% 0%, rgba(48,159,106,0.10) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(227,41,46,0.08) 0%, transparent 50%),
    #f6f9ff;
  border-bottom: 1px solid #d8e3f2;
}
html[data-theme="light"] .hero-title{
  color:#0f172a;
  text-shadow:none;
}
html[data-theme="light"] .hero-sub{ color:#15803d; }
html[data-theme="light"] .sub-hello{ color:#475569; }
html[data-theme="light"] .sub-hello strong{ color:#0f172a; }

/* Live banner */
html[data-theme="light"] .live-banner{
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border-color:#ef4444;
  box-shadow: 0 8px 24px rgba(239,68,68,.18);
}
html[data-theme="light"] .live-title{ color:#7f1d1d; }
html[data-theme="light"] .live-btn{
  background:#dc2626;
  color:#fff;
  border:1px solid #b91c1c;
}
html[data-theme="light"] .live-btn:hover{ background:#ef4444; color:#fff; }

/* Cards */
html[data-theme="light"] .feature-card{
  background:#ffffff;
  border:1px solid #d6e1ef;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}
html[data-theme="light"] .feature-card:hover{ border-color:#b8cbe3; }
html[data-theme="light"] .card-title{ color:#0f172a; }

html[data-theme="light"] .ig-card{
  background: linear-gradient(45deg, rgba(240,148,51,.12), rgba(188,24,136,.08), #fff);
}

/* text fixes inside cards with inline dark text */
html[data-theme="light"] .feature-card h4{ color:#0f172a !important; }
html[data-theme="light"] .feature-card p[style*="color:#aaa"]{ color:#64748b !important; }
html[data-theme="light"] .feature-card div[style*="color:#aaa"]{ color:#64748b !important; }
html[data-theme="light"] .feature-card strong[style*="color:#fff"]{ color:#0f172a !important; }

/* Quick links */
html[data-theme="light"] .quick-card{
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border:1px solid #d6e1ef;
  color:#0f172a;
}
html[data-theme="light"] .quick-card:hover{ border-color:#8ac6a6; }
html[data-theme="light"] .quick-sub{ color:#64748b; }

/* Mini stats */
html[data-theme="light"] .mini-stats{
  background:#f8fbff;
  border:1px solid #d6e1ef;
}
html[data-theme="light"] .mini-stats h3{ color:#15803d; }
html[data-theme="light"] .mini-row{
  border-bottom:1px dashed #d6e1ef;
  color:#475569;
}
html[data-theme="light"] .mini-row strong{ color:#0f172a; }

/* Admin stats */
html[data-theme="light"] .admin-stat{
  background:#ffffff;
  border:1px solid #d6e1ef;
}
html[data-theme="light"] .admin-stat .lbl{ color:#64748b; }
html[data-theme="light"] .admin-stat .val{ color:#0f172a; }
html[data-theme="light"] .admin-stat .sub{ color:#64748b; }

/* Playcard */
html[data-theme="light"] .playcard{
  background: linear-gradient(145deg, rgba(48,159,106,0.10), #ffffff);
  border:1px solid rgba(48,159,106,0.35);
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}
html[data-theme="light"] .playcard .av{
  background:#fff;
  border-color:#22c55e;
}
html[data-theme="light"] .playcard .k,
html[data-theme="light"] .playcard .eloK{ color:#64748b; }
html[data-theme="light"] .playcard .name{ color:#0f172a; }
html[data-theme="light"] .playcard .motto{ color:#475569; }
html[data-theme="light"] .playcard .eloV{ color:#15803d; }
html[data-theme="light"] .playcard .pc-btn{
  background:#e8f7ef;
  border:1px solid #8ac6a6;
  color:#14532d;
}

/* POTM badge */
html[data-theme="light"] .potm-side{
  color:#0f172a;
  background: rgba(255,255,255,0.92);
  border:1px solid #d6e1ef;
  box-shadow: 0 10px 30px rgba(15,23,42,.12);
}
html[data-theme="light"] .potm-side:hover{ border-color: rgba(212,175,55,.65); }
html[data-theme="light"] .potm-side .t1{ color:#64748b; }
html[data-theme="light"] .potm-side .hint{ color:#64748b; }

/* "Nächster Termin" / "Zum Spielplan" fix */
html[data-theme="light"] .event-card .btn.btn-ghost,
html[data-theme="light"] .event-card a.btn{
  background:#eef3fb !important;
  border:1px solid #bfd0e6 !important;
  color:#0f172a !important;
}
html[data-theme="light"] .event-card .btn.btn-ghost:hover,
html[data-theme="light"] .event-card a.btn:hover{
  background:#e3ecf9 !important;
  border-color:#a9c0dc !important;
  color:#0b1220 !important;
}

/* gallery cta fix */
html[data-theme="light"] .gallery-card-home .btn.btn-green,
html[data-theme="light"] .gallery-card-home a.btn{
  background:#16a34a !important;
  color:#fff !important;
  border:1px solid #15803d !important;
}
html[data-theme="light"] .gallery-card-home .btn.btn-green:hover,
html[data-theme="light"] .gallery-card-home a.btn:hover{
  background:#22c55e !important;
  border-color:#16a34a !important;
  color:#fff !important;
}
/* =========================================
   HOMEPAGE POLISH (append at end of index.css)
   ========================================= */

/* Gesamt-Layout ruhiger */
.dashboard-grid{
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  align-items: stretch;
  max-width: 1240px;
}

/* Karten konsistent */
.feature-card{
  border-radius: 16px;
  min-height: 420px;
  padding: 24px;
  align-items: stretch;
  text-align: left;
}

.feature-card .card-title{
  text-align: left;
  margin-bottom: 14px;
}

/* Event/Gastkarte */
.event-card{
  justify-content: space-between;
}

/* Galerie-Karte: nicht mehr langgezogen */
.gallery-card-home{
  max-width: 460px;
  width: 100%;
  justify-self: center;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
}

.gallery-preview{
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 220px;
  max-height: 260px;
  overflow: hidden;
}

.gallery-preview img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .86;
}

.gallery-content{
  flex: 1;
  align-items: flex-start;
  text-align: left;
  justify-content: space-between;
  padding: 20px;
}

.gallery-content .btn{
  margin-top: 8px;
}

/* Social Card ausbalancieren */
.ig-card{
  min-height: 420px;
  justify-content: center;
  text-align: center;
}
.ig-card .card-title{ text-align: center; }

/* Quicklinks schöner */
.quick-grid{
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.quick-card{
  min-height: 100px;
  border-radius: 12px;
  padding: 14px;
}

.quick-title{
  font-size: .9rem;
  letter-spacing: .7px;
}

.quick-sub{
  font-size: .86rem;
}

/* Player Playcard etwas cleaner */
.playcard{
  border-radius: 14px;
  padding: 14px;
}
.playcard .av{
  width: 68px;
  height: 68px;
}
.playcard .name{
  font-size: 1.15rem;
}
.playcard .eloV{
  font-size: 1.55rem;
}

/* Admin status kompakter */
.admin-stats{
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.admin-stat{
  padding: 12px;
  border-radius: 10px;
}
.admin-stat .val{
  font-size: 1.6rem;
}

/* POTM Badge weniger aufdringlich */
.potm-side{
  width: 220px;
  top: 120px;
  right: 12px;
  opacity: .9;
  border-radius: 14px;
}
.potm-side .t2{
  max-width: 100px;
}

/* Hero etwas cleaner */
.ally-pally-bg{
  padding: 54px 20px 50px;
}
.hero-title{
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: 1.5px;
}
.hero-sub{
  letter-spacing: 3px;
  font-size: 1.05rem;
}

/* Buttons konsistent */
.btn, .ig-btn, .live-btn{
  border-radius: 10px;
}

/* Live-Banner moderner */
.live-banner{
  border-radius: 14px;
  padding: 18px;
}
.live-title{
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
}

/* Responsive */
@media (max-width: 1200px){
  .feature-card{ min-height: 390px; }
  .gallery-card-home{ min-height: 390px; max-width: 100%; }
  .gallery-preview{ min-height: 200px; max-height: 240px; }
}

@media (max-width: 980px){
  .dashboard-grid{
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .feature-card,
  .gallery-card-home,
  .ig-card,
  .event-card{
    min-height: auto;
  }

  .gallery-card-home{
    max-width: 100%;
  }

  .gallery-preview{
    aspect-ratio: 16 / 9;
    min-height: 190px;
  }

  .potm-side{
    position: static;
    width: auto;
    margin: 12px 20px 0;
  }

  .gallery-content,
  .feature-card .card-title{
    text-align: left;
  }
}

@media (max-width: 640px){
  .dashboard-grid{
    padding: 0 14px 40px;
    gap: 14px;
  }

  .feature-card{
    padding: 16px;
    border-radius: 12px;
  }

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

  .quick-card{
    min-height: 88px;
  }

  .gallery-preview{
    min-height: 170px;
  }

  .live-banner-wrapper{
    padding: 0 14px;
  }

  .live-banner{
    padding: 14px;
  }
}
/* Galerie auf Home NICHT über komplette Reihenhöhe strecken */
.dashboard-grid {
  align-items: start; /* statt stretch */
}

.gallery-card-home {
  align-self: start;
  height: auto;
  min-height: unset;
}

/* Bildbereich definiert, Content direkt darunter */
.gallery-preview {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  max-height: none;
}

.gallery-content {
  flex: initial;
}