/* =========================================================
   MiniMania – Erweiterungen (Bestenlisten, Filter, Abzeichen, ...)
   im Stil des Cyborg-Templates
   ========================================================= */

/* ---- Footer-Feinschliff ---- */
#snowToggle {
  background: transparent;
  border: 1px solid #666;
  border-radius: 23px;
  color: #ccc;
  padding: 6px 16px;
  margin-top: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#snowToggle:hover {
  background-color: #444;
  border-color: #999;
  color: #fff;
}

/* Leeren Übersetzer-Rahmen ausblenden, bis Google ihn befüllt */
#google_translate_element:empty {
  display: none;
}

/* ---- Auswahlfelder im dunklen Stil ---- */
.mm-select {
  background: #27292a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 23px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

.mm-select:focus {
  outline: none;
  border-color: #ec6090;
}

/* ---- Startseite: Update-Badge im Banner ---- */
.update-pill {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 14px;
  border-radius: 23px;
  background: rgba(236, 96, 144, 0.2);
  border: 1px solid rgba(236, 96, 144, 0.6);
  color: #fff;
  font-size: 13px;
  transition: all 0.3s;
}

.update-pill:hover {
  background: #ec6090;
  color: #fff;
}

/* ---- Spiel des Tages ---- */
.game-of-day {
  border-radius: 23px;
  background-color: #1f2122;
  padding: 30px;
  height: 100%;
}

.god-thumb {
  position: relative;
  display: block;
  border-radius: 23px;
  overflow: hidden;
  margin-bottom: 15px;
}

.god-thumb img {
  width: 100%;
  aspect-ratio: 195 / 150;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.god-thumb:hover img {
  transform: scale(1.05);
}

.god-play,
.tile-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: #ec6090;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.god-thumb:hover .god-play,
.tile-thumb:hover .tile-play {
  opacity: 1;
  transform: scale(1);
}

.game-of-day h5 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 4px;
}

.god-meta {
  color: #888 !important;
  font-size: 13px;
  line-height: 22px;
}

/* ---- Zuletzt gespielt ---- */
.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
}

.recent-item {
  display: block;
  text-align: center;
}

.recent-item img {
  width: 100%;
  aspect-ratio: 195 / 150;
  object-fit: cover;
  border-radius: 15px;
  transition: transform 0.3s ease;
}

.recent-item:hover img {
  transform: translateY(-4px);
}

.recent-item span {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-empty {
  grid-column: 1 / -1;
  color: #888 !important;
}

.recent-clear {
  font-size: 13px;
  color: #888;
}

/* ---- Spieleliste: Werkzeugleiste & Filter ---- */
.count-pill {
  display: inline-block;
  font-size: 13px;
  color: #ccc;
  background: #27292a;
  border-radius: 12px;
  padding: 2px 10px;
  vertical-align: middle;
  margin-left: 6px;
}

.games-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar-search {
  position: relative;
}

.toolbar-search i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 13px;
}

.toolbar-search input {
  background: #27292a;
  border: 1px solid #444;
  border-radius: 23px;
  padding: 8px 16px 8px 38px;
  color: #fff;
  font-size: 14px;
  width: 220px;
}

.toolbar-search input:focus {
  outline: none;
  border-color: #ec6090;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -10px 0 30px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 23px;
  background: #27292a;
  border: 1px solid #3a3d3f;
  color: #ccc;
  font-size: 13px;
  transition: all 0.2s ease;
}

.chip small {
  color: #777;
  font-size: 11px;
}

.chip:hover {
  border-color: #ec6090;
  color: #fff;
}

.chip.active {
  background: #ec6090;
  border-color: #ec6090;
  color: #fff;
}

.chip.active small {
  color: #ffe0ea;
}

.chip.reset {
  border-style: dashed;
}

.chip-sep {
  width: 1px;
  background: #3a3d3f;
  margin: 0 4px;
}

/* ---- Spielkacheln ---- */
.tile-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 23px;
}

.tile-thumb img {
  transition: transform 0.4s ease;
}

.tile-thumb:hover img {
  transform: scale(1.06);
}

.tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tile-badge.new {
  background: #22c55e;
}

.tile-badge.rec {
  background: #a855f7;
}

.tile-meta i + i {
  margin-left: 4px;
}

.tile-meta .sep {
  color: #555;
  margin: 0 4px;
}

/* ---- Spielseite: Aktionen, Bestenliste, Ähnliche Spiele ---- */
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.game-info .tags a {
  color: inherit;
}

.game-info .tags a:hover {
  color: #ec6090;
}

.leaderboard {
  height: 100%;
}

.leaderboard ul li.me {
  background: rgba(236, 96, 144, 0.08);
  border-radius: 15px;
  padding: 10px;
}

.leaderboard .lb-rank.rank-1 { color: #facc15; }
.leaderboard .lb-rank.rank-2 { color: #cbd5e1; }
.leaderboard .lb-rank.rank-3 { color: #d97706; }

.leaderboard .lb-score {
  float: right;
  color: #fff;
  font-size: 14px;
  padding-top: 10px;
}

.leaderboard .lb-score small {
  color: #888;
  font-weight: 400;
  font-size: 11px;
}

.leaderboard .lb-empty p {
  color: #888 !important;
  font-size: 13px;
  line-height: 22px;
  margin-top: 8px;
}

.related-item {
  display: block;
  margin-bottom: 15px;
}

.related-item img {
  width: 100%;
  aspect-ratio: 195 / 150;
  object-fit: cover;
  border-radius: 15px;
  transition: transform 0.3s ease;
}

.related-item:hover img {
  transform: translateY(-4px);
}

.related-item span {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-item small {
  color: #888;
  font-size: 12px;
}

/* ---- Abzeichen ---- */
.mm-badge-chip {
  --badge-color: #ec6090;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 23px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: color-mix(in srgb, var(--badge-color) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge-color) 70%, transparent);
  white-space: nowrap;
  line-height: 20px;
}

.mm-badge-chip i {
  color: var(--badge-color);
}

.mm-badge-chip.small {
  font-size: 11px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-list,
.badge-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-option {
  cursor: pointer;
  margin: 0;
}

.badge-option input {
  display: none;
}

.badge-option input:checked + .mm-badge-chip {
  box-shadow: 0 0 0 2px #fff;
}

.badge-option.locked {
  cursor: not-allowed;
  opacity: 0.4;
}

/* ---- Profil: Abzeichen & Rekorde ---- */
.profile-extras {
  margin-top: 30px;
}

.extras-box {
  background: #1f2122;
  border-radius: 23px;
  padding: 25px 30px;
  height: 100%;
}

.extras-box h5 {
  color: #fff;
  font-size: 17px;
  margin-bottom: 15px;
}

.extras-box h5 i {
  color: #ec6090;
  margin-right: 6px;
}

.extras-box h5 small {
  color: #888;
  font-size: 13px;
  font-weight: 400;
}

.extras-empty,
.extras-hint {
  color: #888 !important;
  font-size: 13px;
  line-height: 22px;
}

.extras-hint {
  margin-top: 12px;
}

.record-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #353637;
}

.record-list li:last-child {
  border-bottom: none;
}

.record-list a {
  flex: 1;
  color: #ec6090;
}

.record-list b {
  color: #fff;
  font-size: 14px;
}

.record-list small {
  color: #888;
  font-weight: 400;
}

.main-border-button a.following {
  background: #ec6090;
  color: #fff;
}

/* ---- Admin: Statistik ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 23px;
}

.stat-card {
  background: #1f2122;
  border-radius: 23px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-card i {
  color: #ec6090;
  font-size: 20px;
  margin-bottom: 6px;
}

.stat-card b {
  color: #fff;
  font-size: 26px;
  line-height: 1.1;
}

.stat-card span {
  color: #888;
  font-size: 13px;
}

.stat-card em {
  color: #22c55e;
  font-style: normal;
  display: block;
}

.card-title {
  color: #fff;
  font-size: 16px;
  margin-bottom: 12px;
}

.card-title i {
  color: #ec6090;
  margin-right: 6px;
}

.mini-rank {
  counter-reset: rank;
}

.mini-rank li {
  counter-increment: rank;
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #353637;
  font-size: 14px;
}

.mini-rank li:last-child {
  border-bottom: none;
}

.mini-rank li::before {
  content: counter(rank);
  color: #ec6090;
  font-weight: 700;
  width: 16px;
}

.mini-rank li.empty::before {
  content: none;
}

.mini-rank li a {
  flex: 1;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-rank li span {
  color: #888;
}

/* ---- Kurze Einblendungen ---- */
.mm-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: #1f2122;
  color: #fff;
  border: 2px solid #ec6090;
  border-radius: 23px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: opacity 0.4s;
}

.mm-toast.hide {
  opacity: 0;
}

.light-mode .game-of-day,
.light-mode .extras-box,
.light-mode .stat-card {
  background-color: #1f2122d9;
}

@media (max-width: 767px) {
  .toolbar-search input,
  .games-toolbar,
  .toolbar-search {
    width: 100%;
  }
  .game-of-day {
    margin-bottom: 23px;
  }
}

/* Dreh-Hinweis nur auf Handys/Tablets, nicht bei hohen Desktop-Fenstern */
@media (orientation: portrait) and (min-width: 992px) {
  .rotate-screen-overlay {
    display: none !important;
  }
}

.tile-meta .sep {
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 991px) {
  .filter-chips {
    margin-top: 15px;
  }
  .games-toolbar .mm-select {
    width: 100%;
  }
}

/* ===== Live-Aktualisierungen ===== */
.site-announcement[hidden] { display: none !important; }

@keyframes live-bump {
  0% { color: #ec6090; text-shadow: 0 0 10px rgba(236, 96, 144, .8); }
  100% { color: inherit; text-shadow: none; }
}
.live-bump { animation: live-bump 1.2s ease-out; }

.live-online { display: inline-flex; align-items: center; gap: 6px; font-weight: inherit; color: inherit; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6b7280; display: inline-block;
}
.live-online[data-live-state="on"] .live-dot {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .7);
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.live-presence-dot { color: #22c55e; font-size: 9px !important; vertical-align: middle; animation: live-blink 1.6s infinite; }
@keyframes live-blink { 50% { opacity: .35; } }
.live-presence[hidden] { display: none !important; }

.comment-count { color: #888; font-size: 15px; font-weight: 400; }
@keyframes comment-new {
  0% { background: rgba(236, 96, 144, .25); }
  100% { background: transparent; }
}
#commentList li.comment-new { animation: comment-new 3s ease-out; border-radius: 12px; }

.live-toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}
.live-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(31, 33, 34, .96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
  border-left: 4px solid #ec6090;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  backdrop-filter: blur(8px);
  animation: live-toast-in .25s ease-out;
  transition: opacity .4s, transform .4s;
}
.live-toast.hide { opacity: 0; transform: translateX(20px); }
.live-toast i { color: #ec6090; margin-top: 3px; }
.live-toast span { flex: 1; }
.live-toast button { background: none; border: none; color: #888; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.live-toast.success { border-left-color: #22c55e; } .live-toast.success i { color: #22c55e; }
.live-toast.danger { border-left-color: #ef4444; } .live-toast.danger i { color: #ef4444; }
.live-toast.warning { border-left-color: #f59e0b; } .live-toast.warning i { color: #f59e0b; }
.live-toast.info { border-left-color: #38bdf8; } .live-toast.info i { color: #38bdf8; }
@keyframes live-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
  .live-toasts { right: 16px; left: 16px; bottom: 16px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live-bump, .live-online[data-live-state="on"] .live-dot, .live-presence-dot, #commentList li.comment-new, .live-toast { animation: none; }
}

.qa-panel.open ~ .live-toasts { right: 440px; }
@media (max-width: 767px) { .qa-panel.open ~ .live-toasts { right: 16px; } }
