/* EM 2028 Enhancements – Dark/Light, Touch, Cookie, Animations */
body.em-light-theme {
  --em-glass-bg: rgba(255, 255, 255, 0.85);
  --em-text: #1a2a3a;
  --em-card-bg: rgba(255, 255, 255, 0.92);
}
body.em-light-theme .em-topbar,
body.em-light-theme .em-nav-rail,
body.em-light-theme .ui.segment.em-card {
  color: #1a2a3a;
}
.em-cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(20, 24, 40, 0.95); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid rgba(255, 215, 0, 0.3);
}
.em-cookie-banner a { color: #f58220; }
.em-tip-bulk { margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.em-touch-tips .em-tip-input { min-width: 52px; min-height: 44px; font-size: 1.1em; }
.em-touch-tips .ui.primary.button { min-height: 44px; }
.em-countdown { margin-left: 8px; }
.em-inline-flag { width: 22px; height: 16px; object-fit: cover; vertical-align: middle; margin: 0 4px; border-radius: 2px; }
.em-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.em-badge { background: rgba(245, 130, 32, 0.15); border: 1px solid rgba(245, 130, 32, 0.4); padding: 4px 10px; border-radius: 20px; font-size: 0.9em; }
.em-rank-animate tbody tr { animation: emRankIn 0.4s ease both; }
@keyframes emRankIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.em-user-badges { margin-left: 6px; font-size: 0.85em; }
.em-landing-stats { display: flex; gap: 24px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.em-group-tip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.em-group-tip-card { margin-bottom: 16px; }
.em-stage-title { margin-top: 1.5rem !important; color: #f58220; }
.em-podium-field { max-width: 420px; margin-bottom: 12px; }
.em-required { color: #f58220; }
.em-podium-badge.hidden { display: none !important; }
.em-special-badge.hidden { display: none !important; }

/* Sidebar: scroll bei vielen Menüpunkten */
.em-nav-rail__track {
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* Grid auf Startseite stabilisieren */
.em-page-content .ui.grid > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.em-page-content .ui.grid > .row > .column {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}
@media (min-width: 768px) {
  .em-page-content .ui.stackable.grid > .row > .column {
    margin-bottom: 1rem !important;
  }
}
.em-nav-rail--compact .em-nav-hint { display: none; }
.em-nav-rail--compact .em-nav-link { padding: 8px 10px; }
.em-nav-rail--compact .em-nav-icon { width: 36px; height: 36px; }

/* Header über Sidebar wenn Mobile-Menü offen */
body.em-nav-open #header {
  z-index: 10002;
}

/* Spielplan: klappbare Sektionen */
.em-schedule-sections { display: flex; flex-direction: column; gap: 10px; }
.em-schedule-section {
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: 12px;
  background: rgba(8, 8, 28, 0.55);
  overflow: hidden;
}
.em-schedule-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.em-schedule-summary::-webkit-details-marker { display: none; }
.em-schedule-summary .em-group-title { margin: 0 !important; }
.em-schedule-count {
  font-size: 0.78em;
  color: var(--em-text-muted, #9aa3b5);
  white-space: nowrap;
}
.em-schedule-section[open] .em-schedule-summary {
  border-bottom: 1px solid rgba(76, 175, 80, 0.15);
  background: rgba(255, 215, 0, 0.06);
}
.em-schedule-section .em-table-scroll { padding: 0 8px 12px; }

/* Sonder-Tipps Tabs */
.em-special-tabs.ui.menu {
  background: rgba(8, 8, 28, 0.6) !important;
  border-color: rgba(76, 175, 80, 0.25) !important;
  margin-bottom: 0 !important;
}
.em-special-tabs .item { color: #c8d0e0 !important; }
.em-special-tabs .item.active {
  background: rgba(245, 130, 32, 0.15) !important;
  color: #fff !important;
}
.em-special-tab-panel {
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 1.25rem !important;
}
.em-special-tips-form select { width: 100%; min-height: 42px; background: rgba(0,0,0,0.25); color: #fff; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 8px; }
.em-landing-stat { text-align: center; padding: 16px 24px; background: rgba(255,255,255,0.08); border-radius: 12px; }
.em-landing-stat b { display: block; font-size: 1.8em; color: #f58220; }
