:root {
  --bg:        #0a0b14;
  --bg-2:      #11131f;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border:    rgba(255, 255, 255, 0.09);
  --text:      #e8eaf2;
  --text-dim:  #9aa0b5;
  --text-mute: #626880;
  --accent:    #6c5ce7;
  --accent-2:  #00d2ff;
  --online:    #22d37e;
  --offline:   #ff5470;
  --checking:  #f5b342;
  --radius:    16px;
  --shadow:    0 10px 40px rgba(0, 0, 0, 0.45);
  --grad:      linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 12% -10%, rgba(108, 92, 231, 0.18), transparent 60%),
    radial-gradient(50rem 40rem at 100% 0%, rgba(0, 210, 255, 0.12), transparent 55%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------------- Header ---------------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo .mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.45);
}
.logo span.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.search {
  flex: 1;
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}
.search input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color .2s, background .2s;
}
.search input:focus { border-color: var(--accent); background: var(--surface-2); }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-mute); }
.admin-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-weight: 600; font-size: 0.9rem;
  transition: all .2s;
  white-space: nowrap;
}
.admin-btn:hover { color: var(--text); border-color: var(--accent); background: var(--surface-2); }

/* ---------------- Layout ---------------- */
main { max-width: 1200px; margin: 0 auto; padding: 32px 20px 80px; }

.hero { text-align: center; padding: 24px 0 18px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; }
.hero p { color: var(--text-dim); margin-top: 8px; font-size: 1.05rem; }

.stats {
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin: 26px 0 10px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 22px;
  min-width: 130px;
  text-align: center;
}
.stat .num { font-size: 1.6rem; font-weight: 800; }
.stat .num.on { color: var(--online); }
.stat .label { color: var(--text-mute); font-size: 0.82rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }

/* ---------------- Category chips ---------------- */
.chips {
  display: flex; gap: 9px; flex-wrap: wrap;
  margin: 28px 0 8px;
  justify-content: center;
}
.chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.88rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .18s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(108,92,231,.35); }
.chip .cnt { opacity: .7; font-size: .8rem; }

/* ---------------- Category section ---------------- */
.cat-section { margin-top: 44px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cat-head .ic {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--accent-2);
}
.cat-head h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
.cat-head .desc { color: var(--text-mute); font-size: .9rem; }

/* ---------------- Link grid & cards ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .18s, border-color .18s, background .18s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0;
  background: var(--grad); opacity: 0; transition: opacity .25s;
  mix-blend-mode: overlay; pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: rgba(108,92,231,.5); background: var(--surface-2); }
.card:hover::after { opacity: .06; }

.card-top { display: flex; align-items: center; gap: 12px; }
.favicon {
  width: 42px; height: 42px; border-radius: 11px;
  background: #fff; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--border);
}
.favicon img { width: 26px; height: 26px; }
.favicon .fallback { font-weight: 800; color: var(--accent); font-size: 1.1rem; }
.card-title { flex: 1; min-width: 0; }
.card-title .name { font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title .domain { color: var(--text-mute); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card .desc { color: var(--text-dim); font-size: .9rem; margin: 12px 0 14px; flex: 1; }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--border);
}
.status .dot { width: 9px; height: 9px; border-radius: 50%; position: relative; }
.status.online  { color: var(--online); }
.status.online .dot  { background: var(--online); box-shadow: 0 0 0 0 rgba(34,211,126,.7); animation: pulse 2s infinite; }
.status.offline { color: var(--offline); }
.status.offline .dot { background: var(--offline); }
.status.checking { color: var(--checking); }
.status.checking .dot { background: var(--checking); animation: blink 1s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,211,126,.6)} 70%{box-shadow:0 0 0 8px rgba(34,211,126,0)} 100%{box-shadow:0 0 0 0 rgba(34,211,126,0)} }
@keyframes blink { 50% { opacity: .35; } }

.visit {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 600; color: var(--accent-2);
}
.card:hover .visit { color: var(--text); }

.foot-right { display: flex; align-items: center; gap: 12px; }
.clicks {
  color: var(--text-mute); font-size: .78rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.clicks i { width: 13px; height: 13px; }

/* Badge-Leiste oben rechts auf der Karte (Premium, NEU – koexistieren nebeneinander) */
.card-badges {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
}
.badge-new {
  background: var(--grad); color: #fff;
  font-size: .62rem; font-weight: 800; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(108,92,231,.45);
}
.badge-premium {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #ffe08a 0%, #f5b342 45%, #e0951b 100%);
  color: #3a2a05;
  font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px 3px 7px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(224,149,27,.5);
}
.badge-premium i { width: 12px; height: 12px; }

/* Premium-Karten: dezenter goldener Rahmen + Schimmer */
.card.premium {
  border-color: rgba(245,179,66,.55);
  background: linear-gradient(180deg, rgba(245,179,66,.08), rgba(245,179,66,.02)), var(--surface);
}
.card.premium::after { background: linear-gradient(135deg, #f5b342, #ffe08a); }
.card.premium:hover { border-color: rgba(245,179,66,.85); }
.card.premium:hover::after { opacity: .08; }

/* Sortierleiste */
.sortbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 14px; color: var(--text-dim); font-size: .9rem;
}
.sortbar label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sortbar label i { width: 15px; height: 15px; }
.sortbar select {
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  font-family: inherit; font-size: .9rem; outline: none; cursor: pointer;
}
.sortbar select:focus { border-color: var(--accent); }
/* Aufgeklappte Optionsliste braucht eine SOLIDE Farbe (sonst helle Schrift auf hellem Grund) */
.sortbar select option {
  background-color: #11131f;
  color: #e8eaf2;
}

/* ---------------- Empty / loading ---------------- */
.empty { text-align: center; color: var(--text-mute); padding: 70px 20px; }
.skeleton { animation: sk 1.4s ease-in-out infinite; }
@keyframes sk { 50% { opacity: .4; } }

footer {
  text-align: center; color: var(--text-mute); font-size: .85rem;
  padding: 36px 20px; border-top: 1px solid var(--border); margin-top: 40px;
}
footer a { color: var(--text-dim); }
.add-banner { display: inline-block; line-height: 0; transition: transform .18s, filter .18s; }
.add-banner:hover { transform: translateY(-2px); filter: drop-shadow(0 8px 22px rgba(108,92,231,.35)); }
.add-banner img { display: block; width: 100%; max-width: 600px; height: auto; margin: 12px auto 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 680px) {
  .header-inner { flex-wrap: wrap; }
  .search { order: 3; max-width: none; width: 100%; }
  .grid { grid-template-columns: 1fr; }
}

/* ---------------- Link-Checker ---------------- */
.checker-box {
  max-width: 640px; margin: 8px auto 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
#checkForm { display: flex; gap: 10px; }
#checkUrl {
  flex: 1; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  font-size: 1rem; outline: none; transition: border-color .2s;
}
#checkUrl:focus { border-color: var(--accent); }
#checkBtn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border: none; border-radius: 12px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: .95rem;
  cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .2s;
}
#checkBtn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(108,92,231,.4); }
#checkBtn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.check-result { margin-top: 20px; text-align: center; color: var(--text-dim); min-height: 1em; }
.check-result.loading,
.check-result.err { display: flex; align-items: center; justify-content: center; gap: 8px; }
.check-result.err { color: var(--offline); }
.check-result.loading svg { animation: lvspin .8s linear infinite; }
@keyframes lvspin { to { transform: rotate(360deg); } }
.cr-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; letter-spacing: .06em; font-size: 1.1rem;
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border);
}
.cr-badge .dot { width: 11px; height: 11px; border-radius: 50%; }
.cr-badge.online { color: var(--online); }
.cr-badge.online .dot { background: var(--online); box-shadow: 0 0 0 0 rgba(34,211,126,.7); animation: pulse 2s infinite; }
.cr-badge.offline { color: var(--offline); }
.cr-badge.offline .dot { background: var(--offline); }
.cr-url { margin-top: 14px; color: var(--text); font-weight: 600; word-break: break-all; }
.cr-meta { margin-top: 10px; display: flex; gap: 18px; justify-content: center; color: var(--text-mute); font-size: .9rem; }
.cr-meta i { width: 15px; height: 15px; vertical-align: -2px; }
@media (max-width: 560px) { #checkForm { flex-direction: column; } }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Eckiges Design (rechteckige Buttons/Kaesten) ---------------- */
.card, .stat, .chip, .badge, .badge-new, .badge-premium, .status, .cr-badge,
.btn, .admin-btn, .icon-btn, .tab, .visit, .drag-handle,
.mark, .favicon, .favicon img, .fav, .fav img,
.checker-box, .login-card, .modal, .card-box, .toast,
input, select, textarea, button,
input[type=file]::file-selector-button {
  border-radius: 0 !important;
}
/* runde Status-/Online-Punkte bleiben rund */
.status .dot, .cr-badge .dot, .badge .dot { border-radius: 50% !important; }

/* ---------------- Hero-Aktion: Website eintragen ---------------- */
.hero-actions { margin-top: 20px; display: flex; justify-content: center; }
.submit-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px;
  font-weight: 700; font-size: .95rem;
  color: #fff; border: none;
  background: var(--grad);
  box-shadow: 0 8px 22px rgba(108,92,231,.35);
  transition: transform .15s, box-shadow .2s;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(108,92,231,.5); }
.submit-btn i { width: 18px; height: 18px; }

/* ---------------- Schwebende Social-Buttons ---------------- */
.floats {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
}
.float-btn {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 9px;
  padding: 12px 16px;
  color: #fff; font-weight: 700; font-size: .92rem;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.float-btn:hover { transform: translateY(-3px); filter: brightness(1.06); }
.float-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.float-label { white-space: nowrap; }

.float-btn.instagram {
  background: linear-gradient(45deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
  box-shadow: 0 10px 30px rgba(220,39,67,.45);
}
.float-btn.instagram:hover { box-shadow: 0 16px 36px rgba(220,39,67,.6); }
.float-btn.discord {
  background: #5865f2;
  box-shadow: 0 10px 30px rgba(88,101,242,.45);
}
.float-btn.discord:hover { box-shadow: 0 16px 36px rgba(88,101,242,.6); }

@media (max-width: 680px) {
  .floats { right: 14px; bottom: 14px; }
  .float-btn { padding: 12px; }
  .float-label { display: none; }   /* nur die Icons auf kleinen Screens */
}

/* ---------------- Einreich-Modal ---------------- */
.submit-modal-bg {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  display: none; place-items: center; padding: 20px;
}
.submit-modal-bg.show { display: grid; }
.submit-modal {
  position: relative;
  width: 100%; max-width: 460px;
  background: var(--bg-2); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px;
  max-height: 90vh; overflow-y: auto;
}
.submit-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; line-height: 1;
  font-size: 1.5rem; color: var(--text-mute);
  background: transparent; border: none;
}
.submit-close:hover { color: var(--text); }
.submit-modal h3 { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.submit-modal h3 i { width: 20px; height: 20px; color: var(--accent-2); }
.submit-hint { color: var(--text-dim); font-size: .9rem; margin: 8px 0 20px; }
.sfield { margin-bottom: 14px; }
.sfield label { display: block; font-size: .82rem; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.sfield input, .sfield select, .sfield textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: .95rem; font-family: inherit; outline: none; transition: border-color .2s;
}
.sfield input:focus, .sfield select:focus, .sfield textarea:focus { border-color: var(--accent); }
.sfield textarea { resize: vertical; min-height: 70px; }
.sfield select option { background-color: #11131f; color: #e8eaf2; }
.submit-send {
  width: 100%; padding: 13px; margin-top: 4px;
  color: #fff; border: none; font-weight: 700; font-size: .95rem;
  background: var(--grad);
  transition: transform .15s, box-shadow .2s;
}
.submit-send:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(108,92,231,.4); }
.submit-send:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.submit-msg { margin-top: 12px; font-size: .88rem; min-height: 1.1em; text-align: center; }
.submit-msg.ok  { color: var(--online); }
.submit-msg.err { color: var(--offline); }
