/**
 * ============================================================
 *  esports.css — E-Sports Page Styles
 * ============================================================
 *
 *  Scope:
 *    Used exclusively by pages inside /esport/:
 *      teams.html, roadmap.html, hof.html,
 *      kalender-esports.html
 *
 *  Sections:
 *    1. CSS Variables (esport colour tokens)
 *    2. Light theme overrides
 *    3. Background helper classes
 *    4. General esports layout (container, header, title)
 *    5. Team cards grid + player list
 *    6. Roadmap timeline
 *    7. Hall of Fame grid
 *    8. Calendar placeholder
 *    9. Stat cards & info boxes
 *   10. Responsive breakpoints
 *   11. Animation classes
 *   12. Team Historie (detailed history section)
 * ============================================================
 */

/* ==========================================================
   1. CSS VARIABLES — Esport colour tokens (dark default)
   ========================================================== */
:root {
  /* E-Sports Farben basierend auf dem Website-Schema */
  --esports-primary: #34c759;      /* Apple Green - wie Website */
  --esports-secondary: var(--muted);    /* Muted - wie Website */
  --esports-accent: #28b24d;       /* Primary-600 - wie Website */
  --esports-bg: var(--bg);         /* Website Background */
  --esports-card: var(--card);     /* Website Card Background */
  --esports-text: var(--text);     /* Website Text */
  --esports-muted: var(--muted);   /* Website Muted */
  --esports-border: var(--border); /* Website Border */
  --esports-danger: var(--danger); /* Website Danger */
  --esports-highlight: #3fa36c;    /* Leichtes Grün für Highlights */
}

/* ==========================================================
   2. LIGHT THEME OVERRIDES
   ========================================================== */
/* Light theme optimizations für E-Sports */
[data-theme="light"] {
  --esports-highlight: #2a7c4f;    /* Dunkleres Grün für besseren Kontrast im Light Mode */
}

/* Light Mode spezifische Anpassungen */
[data-theme="light"] .team-game {
  background: rgba(52, 199, 89, 0.15);
  color: var(--esports-accent);
}

[data-theme="light"] .player-role {
  background: rgba(42, 124, 79, 0.15);
  color: var(--esports-highlight);
}

[data-theme="light"] .info-box {
  background: rgba(52, 199, 89, 0.15);
  border-left-color: #1f8f44;
  border: 1px solid #b9cfc3;
}

[data-theme="light"] .roadmap-content:hover {
  box-shadow: 0 8px 25px rgba(52, 199, 89, 0.1);
}

[data-theme="light"] .team-card:hover {
  box-shadow: 0 8px 25px rgba(52, 199, 89, 0.15);
}

[data-theme="light"] .hof-card:hover {
  box-shadow: 0 8px 25px rgba(52, 199, 89, 0.15);
}

[data-theme="light"] .stat-card:hover {
  box-shadow: 0 4px 16px rgba(52, 199, 89, 0.1);
}

[data-theme="light"] .team-tag-small {
  color: #ffffff;
  opacity: 1;
  font-weight: 800;
  background: #0d6e3a;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.95rem;
}

/* ==========================================================
   3. BACKGROUND HELPER CLASSES (light mode compat)
   ========================================================== */
/* Spezielle Hintergrund-Klassen für bessere Light Mode Kompatibilität */
.event-preview-primary {
  background: rgba(52, 199, 89, 0.1);
}

.event-preview-secondary {
  background: rgba(182, 208, 195, 0.1);
}

.event-preview-accent {
  background: rgba(40, 178, 77, 0.1);
}

.event-preview-highlight {
  background: rgba(63, 163, 108, 0.1);
}

[data-theme="light"] .event-preview-primary {
  background: rgba(52, 199, 89, 0.08);
}

[data-theme="light"] .event-preview-secondary {
  background: rgba(58, 90, 75, 0.08);
}

[data-theme="light"] .event-preview-accent {
  background: rgba(40, 178, 77, 0.08);
}

[data-theme="light"] .event-preview-highlight {
  background: rgba(42, 124, 79, 0.08);
}

.event-preview-date {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.event-preview-date.primary { color: var(--esports-primary); }
.event-preview-date.secondary { color: var(--esports-secondary); }
.event-preview-date.accent { color: var(--esports-accent); }
.event-preview-date.highlight { color: var(--esports-highlight); }

.event-preview-title {
  color: var(--esports-text);
  font-weight: 600;
}

.esports-cta-button {
  background: var(--esports-primary);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.esports-cta-button:hover {
  background: var(--esports-accent);
}

/* ==========================================================
   4. GENERAL ESPORTS LAYOUT — Container, header, titles
   ========================================================== */
/* General E-Sports Layout */
.esports-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 20px;
}

.esports-header {
  width: 100%;
  text-align: center;
  margin: 0 auto 3rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.esports-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--esports-primary);
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(52, 199, 89, 0.3);
  width: 100%;
}

.esports-subtitle {
  font-size: 1.2rem;
  color: var(--esports-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

/* ==========================================================
   5. TEAM CARDS — Grid, card hover, player list
   ========================================================== */
/* Team Cards - angepasst an Website-Stil */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.team-card {
  background: var(--esports-card);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--esports-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--esports-primary) 0%, var(--esports-accent) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(52, 199, 89, 0.25);
  border-color: var(--esports-primary);
}

.team-card:hover::before {
  opacity: 1;
}

.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--esports-border);
}

.team-info {
  flex: 1;
  min-width: 0;
}

.team-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--esports-primary) 0%, var(--esports-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.team-logo::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--esports-primary) 0%, var(--esports-accent) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-card:hover .team-logo {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 6px 20px rgba(52, 199, 89, 0.5);
}

.team-card:hover .team-logo::after {
  opacity: 0.3;
}

.team-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--esports-text);
  margin-bottom: 0.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.team-tag {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--esports-primary);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.team-game {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  background: rgba(52, 199, 89, 0.15);
  color: var(--esports-primary);
  border: 1px solid rgba(52, 199, 89, 0.3);
  transition: all 0.3s ease;
}

.team-card:hover .team-game {
  background: rgba(52, 199, 89, 0.25);
  border-color: var(--esports-primary);
  transform: translateX(2px);
}

.leagues {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  background: rgba(182, 208, 195, 0.2);
  color: var(--esports-muted);
  border: 1px solid var(--esports-border);
  margin-left: 0.5rem;
  transition: all 0.3s ease;
}

.team-card:hover .leagues {
  background: rgba(182, 208, 195, 0.3);
  transform: translateX(2px);
}

.team-players {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 1.25rem;
}

.team-players li {
  color: var(--esports-text);
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(52, 199, 89, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  border-radius: 8px;
  margin-bottom: 0.25rem;
}

.team-players li:hover {
  background: rgba(52, 199, 89, 0.05);
  padding-left: 0.75rem;
  border-bottom-color: rgba(52, 199, 89, 0.2);
}

.team-players li:last-child {
  border-bottom: 1px solid rgba(52, 199, 89, 0.1);
}

.player-role {
  color: var(--esports-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  background: rgba(182, 208, 195, 0.25);
  border-radius: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.team-players li:hover .player-role {
  background: rgba(52, 199, 89, 0.2);
  color: var(--esports-primary);
}

/* ==========================================================
   6. ROADMAP TIMELINE — Vertical timeline with alternating items
   ========================================================== */
/* Roadmap Timeline - angepasst an Website-Stil */
.roadmap-timeline {
  position: relative;
  padding: 2rem 0;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--esports-primary), var(--esports-accent));
  transform: translateX(-50%);
}

.roadmap-item {
  position: relative;
  margin: 2rem 0;
  display: flex;
  align-items: center;
}

.roadmap-item:nth-child(odd) .roadmap-content {
  margin-right: auto;
  margin-left: 0;
  text-align: right;
  padding-right: 3rem;
}

.roadmap-item:nth-child(even) .roadmap-content {
  margin-left: auto;
  margin-right: 0;
  text-align: left;
  padding-left: 3rem;
}

.roadmap-content {
  background: var(--esports-card);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 45%;
  position: relative;
  border: 1px solid var(--esports-border);
  transition: all 0.3s ease;
}

.roadmap-content:hover {
  border-color: var(--esports-primary);
  box-shadow: 0 8px 25px rgba(52, 199, 89, 0.15);
}

.roadmap-date {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--esports-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 2;
  border: 2px solid var(--esports-bg);
}

.roadmap-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--esports-text);
  margin-bottom: 0.5rem;
}

.roadmap-description {
  color: var(--esports-muted);
  line-height: 1.6;
}

/* ==========================================================
   7. HALL OF FAME — Achievement cards grid
   ========================================================== */
/* Hall of Fame - angepasst an Website-Stil */
.hof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.hof-card {
  background: var(--esports-card);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--esports-border);
  transition: all 0.3s ease;
}

.hof-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(52, 199, 89, 0.2);
  border-color: var(--esports-primary);
}

.hof-card::before {
  content: '🏆';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 3rem;
  opacity: 0.1;
}

.hof-rank {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--esports-primary);
}

.hof-achievement {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--esports-text);
}

.hof-player {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--esports-text);
}

.hof-date {
  font-size: 0.9rem;
  color: var(--esports-muted);
}

/* ==========================================================
   8. CALENDAR PLACEHOLDER
   ========================================================== */
/* Calendar Placeholder - angepasst an Website-Stil */
.calendar-placeholder {
  background: var(--esports-card);
  border-radius: 15px;
  padding: 4rem 2rem;
  text-align: center;
  border: 2px dashed var(--esports-primary);
  color: var(--esports-text);
}

.calendar-placeholder h3 {
  color: var(--esports-primary);
  margin-bottom: 1rem;
}

/* ==========================================================
   9. STAT CARDS & INFO BOXES
   ========================================================== */
/* Sections wie auf der Website */
.esports-section {
  margin-bottom: 3rem;
}

.esports-section h2 {
  color: var(--esports-secondary);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--esports-secondary);
  text-align: center;
}

/* Statistik-Karten */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--esports-card);
  color: var(--esports-text);
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  border: 1px solid var(--esports-border);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--esports-primary);
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--esports-primary);
}

.stat-label {
  color: var(--esports-muted);
}

/* Info Box wie auf der Website */
.info-box {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
  background: rgba(52, 199, 89, 0.1);
  padding: 2rem;
  border-radius: 15px;
  border-left: 4px solid var(--esports-primary);
}

.info-box h3 {
  color: var(--esports-primary);
  margin-bottom: 1rem;
}

.info-box ul {
  color: var(--esports-muted);
  line-height: 1.8;
}

/* ==========================================================
   10. RESPONSIVE BREAKPOINTS
   ========================================================== */
/* Responsive Design */
@media (max-width: 768px) {
  .esports-title {
    font-size: 2rem;
  }
  
  .teams-grid {
    grid-template-columns: 1fr;
  }
  
  .roadmap-timeline::before {
    left: 2rem;
  }
  
  .roadmap-item:nth-child(odd) .roadmap-content,
  .roadmap-item:nth-child(even) .roadmap-content {
    margin: 0;
    margin-left: 4rem;
    text-align: left;
    padding: 1.5rem;
    padding-left: 1.5rem;
    max-width: none;
  }
  
  .roadmap-date {
    left: 2rem;
    transform: none;
  }
  
  .hof-grid {
    grid-template-columns: 1fr;
  }

  .esports-section h2 {
    font-size: 1.5rem;
  }
}

/* ==========================================================
   11. ANIMATION CLASSES — Fade-in & slide-up keyframes
   ========================================================== */
/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glow {
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px rgba(52, 199, 89, 0.3);
  }
  to {
    text-shadow: 0 0 30px rgba(52, 199, 89, 0.6);
  }
}

/* ==========================================================
   12. TEAM HISTORIE — Detailed team history page
   ========================================================== */
/* Team Historie Section */
.team-historie-section {
  margin-top: 4rem;
}

.team-historie-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .team-historie-grid {
    grid-template-columns: 1fr;
  }
}

.team-historie-card {
  background: var(--esports-card);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--esports-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.team-historie-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--esports-primary) 0%, var(--esports-accent) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.team-historie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(52, 199, 89, 0.25);
  border-color: var(--esports-primary);
}

.team-historie-card:hover::before {
  opacity: 1;
}

.team-historie-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--esports-border);
}

.team-badges-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  overflow-x: auto;
  align-items: center;
}

.team-historie-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--esports-text);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.team-tag-small {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--esports-primary);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-left: 0.5rem;
}

.team-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(52, 199, 89, 0.15);
  color: var(--esports-primary);
  border: 1px solid rgba(52, 199, 89, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.team-badge.first-team {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.3);
}

.team-badge.highest {
  background: rgba(52, 199, 89, 0.2);
  color: var(--esports-primary);
  border-color: var(--esports-primary);
  font-weight: 700;
}

.team-game-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(182, 208, 195, 0.2);
  color: var(--esports-muted);
  border: 1px solid var(--esports-border);
  white-space: nowrap;
  flex-shrink: 0;
}

.team-status-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.team-status-badge.active {
  background: rgba(52, 199, 89, 0.2);
  color: var(--esports-primary);
  border: 1px solid var(--esports-primary);
}

.team-status-badge.training {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.5);
}

.team-status-badge.inactive {
  background: rgba(158, 158, 158, 0.2);
  color: #9e9e9e;
  border: 1px solid rgba(158, 158, 158, 0.4);
}

.team-historie-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.team-historie-stats .stat-item {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 1rem 0.5rem;
  background: rgba(52, 199, 89, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(52, 199, 89, 0.15);
  transition: all 0.3s ease;
}

.team-historie-card:hover .stat-item {
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.25);
  transform: translateY(-2px);
}

.team-historie-stats .stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--esports-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.team-historie-stats .stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--esports-muted);
  font-weight: 500;
}

/* ── Light theme adjustments for Team Historie ── */
[data-theme="light"] .team-historie-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .team-historie-card:hover {
  box-shadow: 0 12px 35px rgba(52, 199, 89, 0.18);
}

[data-theme="light"] .team-historie-stats .stat-item {
  background: rgba(52, 199, 89, 0.1);
  border-color: rgba(52, 199, 89, 0.2);
}

[data-theme="light"] .team-historie-card:hover .stat-item {
  background: rgba(52, 199, 89, 0.15);
  border-color: rgba(52, 199, 89, 0.3);
}