/* index.php — seitenspezifisches CSS, baut auf assets/css/base.css auf */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg); color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
  padding-inline: var(--side);
}
button { font-family: inherit; }
[role="button"]:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: .018; pointer-events: none; z-index: 0;
}

/* ── Hero ── */
.hero {
  position: relative; text-align: center;
  padding: 44px 0 36px;
  margin-inline: calc(-1 * var(--side));
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(239,68,68,.10) 0%, transparent 70%);
  pointer-events: none;
}
.hero-logo {
  width: 64px; height: 64px; border-radius: 16px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 32px rgba(0,0,0,.5);
  margin-bottom: 14px; position: relative;
  animation: fadeUp .5s ease both;
}
/* Nur auf der Emmerich-SMP-Detailseite gezeigt, nicht mehr im allgemeinen Hero der Startseite */
.emmerich-logo { display: block; margin: 0 auto 16px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 20px; padding: 6px 14px;
  font-size: .78rem; font-weight: 600; color: var(--online);
  margin-bottom: 18px; position: relative;
  animation: fadeUp .5s .04s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 6vw, 2.6rem);
  font-weight: 700; letter-spacing: -.02em;
  color: #fff;
  animation: fadeUp .5s .08s ease both; position: relative;
}
.hero p {
  font-size: .8rem; color: var(--muted);
  margin-top: 6px; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 500;
  animation: fadeUp .5s .14s ease both; position: relative;
}
.hero-actions {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 20px; flex-wrap: wrap; position: relative;
  animation: fadeUp .5s .18s ease both;
}
.hero-cta {
  background: var(--accent); color: var(--bg);
  padding: 12px 22px; border-radius: 9px;
  font-size: .88rem; font-weight: 700; border: none; cursor: pointer;
}
.hero-ip-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 9px; padding: 11px 15px;
  font-family: monospace; font-size: .82rem; color: var(--text);
  cursor: pointer;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(6px) } to { opacity:1; transform:none } }
@keyframes fadeUp { from { opacity:0; transform:translateY(12px) } to { opacity:1; transform:none } }

/* ── Layout ── */
.breadcrumb {
  max-width: 980px; margin: 0 auto;
  padding-block: 0 14px;
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--muted); min-height: 30px;
}
.breadcrumb span { cursor: pointer; transition: color .15s; }
.breadcrumb span:hover { color: var(--text); }
.breadcrumb .crumb-active { color: #888; }
.breadcrumb .sep { color: #2a2a3a; }

.view { display: none; max-width: 980px; margin: 0 auto; padding-bottom: 90px; }
.view.active { display: block; animation: fadeIn .2s ease; }

.section-label {
  font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Game Cards ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.game-card {
  position: relative;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 20px 20px;
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
@media (hover: hover) {
  .game-card:hover { transform: translateY(-2px); border-color: var(--border2); box-shadow: 0 12px 32px rgba(0,0,0,.35); }
}
.game-card:active { opacity: .85; }
.game-icon { font-size: 2.6em; margin-bottom: 12px; line-height: 1; display: block; }
.game-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
.game-sub   { font-size: .78rem; color: var(--muted); }
.game-badge {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 12px; padding: 4px 11px;
  border-radius: 99px; font-size: .7rem; font-weight: 600;
}
.badge-green { background: rgba(95,217,138,.1);  color: var(--online); border: 1px solid rgba(95,217,138,.25); }
.badge-red   { background: rgba(248,113,113,.1); color: #f87171; border: 1px solid rgba(248,113,113,.25); }
.badge-gray  { background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid var(--border); }

/* Mobile: game cards als horizontale Reihen */
@media (max-width: 500px) {
  .games-grid { grid-template-columns: 1fr; gap: 10px; }
  .game-card { flex-direction: row; text-align: left; padding: 16px; gap: 14px; align-items: center; }
  .game-icon { font-size: 2em; margin-bottom: 0; flex-shrink: 0; }
  .game-badge { margin-top: 4px; }
}

/* ── Server Cards ── */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.server-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 18px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex; flex-direction: column; gap: 12px;
}
@media (hover: hover) {
  .server-card:hover { border-color: var(--border2); background: #1e1e28; }
}
.server-card:active { opacity: .85; }
.server-header { display: flex; align-items: center; gap: 12px; }
.server-icon { font-size: 1.5em; }
.server-name { font-family: var(--font-display); font-weight: 600; font-size: .93rem; color: #fff; }
.server-type { font-size: .73rem; color: var(--muted); margin-top: 2px; }
.server-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 10px;
}
.server-ip { font-family: monospace; font-size: .76rem; color: var(--muted); }
.server-status-wrap { display: flex; align-items: center; gap: 5px; font-size: .76rem; }

/* ── Status Dot ── */
.sdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.sdot-g { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.6); animation: pulse-g 2s infinite; }
.sdot-r { background: #f87171; }
.sdot-x { background: #3a3a4a; }
@keyframes pulse-g { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── Back button ── */
.back-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 500; color: var(--muted);
  cursor: pointer; margin-bottom: 18px;
  padding: 9px 14px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg3); transition: all .2s;
  min-height: 40px;
}
@media (hover: hover) { .back-btn:hover { border-color: var(--border2); color: var(--text); } }

/* ── IP Box ── */
.ip-box {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 18px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.ip-label { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 3px; }
.ip-value { font-size: 1rem; font-weight: 600; font-family: monospace; color: #fff; word-break: break-all; }
.ip-spacer { flex: 1; min-width: 8px; }
.copy-btn {
  background: rgba(239,68,68,.12); color: var(--accent);
  border: 1px solid rgba(239,68,68,.25);
  padding: 10px 18px; border-radius: 8px;
  cursor: pointer; font-size: .82rem; font-weight: 600;
  transition: all .15s; white-space: nowrap; min-height: 42px;
}
@media (hover: hover) { .copy-btn:hover { background: rgba(239,68,68,.22); } }
.copy-btn:active { transform: scale(.97); }
.copy-toast { font-size: .78rem; color: var(--online); opacity: 0; transition: opacity .3s; margin-top: 4px; display: block; }
.copy-toast.show { opacity: 1; }

/* ── Cards ── */
.card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
}
.card-title {
  font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.card-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Player chips ── */
.player-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.player-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 99px; padding: 5px 11px 5px 5px;
  cursor: pointer; font-size: .82rem;
  transition: border-color .15s, background .15s;
  min-height: 36px;
}
@media (hover: hover) { .player-chip:hover { border-color: var(--border2); background: rgba(255,255,255,.07); } }
.player-chip img { width: 22px; height: 22px; border-radius: 50%; image-rendering: pixelated; }
.player-empty { color: var(--muted); font-size: .82rem; font-style: italic; }

/* ── Leaderboard ── */
.leaderboard { width: 100%; border-collapse: collapse; font-size: .82rem; }
.leaderboard td { padding: 7px 4px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.leaderboard tr:last-child td { border-bottom: none; }
.lb-rank { color: var(--muted); font-size: .76rem; width: 22px; font-weight: 700; }
.lb-rank.gold   { color: #fbbf24; }
.lb-rank.silver { color: #94a3b8; }
.lb-rank.bronze { color: #b87333; }
.lb-avatar { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; vertical-align: middle; }
.lb-name { font-weight: 600; color: var(--text); font-size: .85rem; display: block; }
.lb-bar-wrap { background: var(--border); border-radius: 3px; height: 2px; margin-top: 4px; overflow: hidden; }
.lb-bar { height: 2px; border-radius: 3px; }
.lb-val { text-align: right; color: var(--muted); white-space: nowrap; font-size: .76rem; }

/* ── Rules ── */
.rules-list { display: flex; flex-direction: column; gap: 6px; }
.rule-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.02); border: 1px solid var(--border);
  border-radius: 9px; font-size: .82rem; line-height: 1.5; color: #b0b0c8;
}
.rule-icon { font-size: 1em; flex-shrink: 0; margin-top: 2px; }
.rule-row strong { color: var(--text); display: block; margin-bottom: 1px; font-size: .84rem; }

/* ── Simple server detail ── */
.hero-server {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 18px; padding: 30px 20px 24px;
  text-align: center; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.hero-server::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,.5), transparent);
}
.hero-server-icon { font-size: 2.8em; margin-bottom: 12px; display: block; }
.hero-server h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.hero-server-status { font-size: .85rem; color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; justify-content: center; gap: 7px; }

/* ── Footer / Admin ── */
footer { text-align: center; padding: 24px 0; font-size: .72rem; color: var(--muted); border-top: 1px solid var(--border); margin-top: 20px; }
.admin-btn {
  position: fixed; bottom: 16px; right: 16px;
  background: rgba(11,13,18,.92); backdrop-filter: blur(12px);
  color: var(--muted); border: 1px solid var(--border2);
  padding: 10px 14px; border-radius: 10px;
  font-size: .76rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
  transition: all .2s; z-index: 99;
  display: flex; align-items: center; gap: 6px;
}
@media (hover: hover) { .admin-btn:hover { background: var(--bg3); color: var(--text); border-color: var(--accent); } }
