/* ============================================================
   tfdtool.banrado.de – Stylesheet
   Design-System: Dark SaaS, Banrado-Farben
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

/* ===== TOKENS ===== */
:root {
  --bg0: #080a0f;
  --bg1: #0d1117;
  --bg2: #111820;
  --bg3: #162030;
  --border: #1e2d3d;
  --border-hi: #2a4060;
  --red: #c0392b;
  --red-glow: rgba(192,57,43,0.3);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.12);
  --purple: #a78bfa;
  --purple-dim: rgba(167,139,250,0.12);
  --cyan: #22d3ee;
  --cyan-dim: rgba(34,211,238,0.1);
  --gold: #f59e0b;
  --text: #c8d8e8;
  --text-dim: #5a7a99;
  --text-bright: #e8f4ff;
  --radius: 10px;
  --max-w: 1200px;
  --font-head: 'Orbitron', monospace;
  --font-body: 'Rajdhani', sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grid BG */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(34,211,238,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg0); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,10,15,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 62px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.logo:hover { text-decoration: none; }

.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--red), #7a0000);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  box-shadow: 0 0 14px var(--red-glow);
}

.logo-text {
  font-family: var(--font-head);
  font-size: 13px; font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.logo-text span { display: block; font-size: 9px; color: var(--text-dim); font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; }

.main-nav { display: flex; gap: 4px; margin-left: 12px; }

.nav-link {
  color: var(--text-dim);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 6px;
  transition: color .2s, background .2s;
  text-decoration: none;
}
.nav-link:hover { color: var(--text-bright); background: rgba(255,255,255,0.05); text-decoration: none; }
.nav-link.active { color: var(--cyan); background: var(--cyan-dim); }

.header-auth { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.user-chip {
  font-size: 12px; font-weight: 600;
  color: var(--text-dim);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
}

.burger { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; margin-left: 8px; }

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute; top: 62px; left: 0; right: 0;
    background: var(--bg1);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    flex-direction: column;
    z-index: 200;
  }
  .main-nav.open { display: flex; }
  .burger { display: block; }
  .header-auth { gap: 6px; }
  .user-chip { display: none; }
}

/* ===== MAIN ===== */
.main-content { position: relative; z-index: 1; }

/* ===== CONTAINER ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO ===== */
.hero { padding: 48px 24px 36px; max-width: var(--max-w); margin: 0 auto; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cyan-dim);
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 11px; font-weight: 600;
  color: var(--cyan); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 14px;
}
.badge::before {
  content: ''; width: 6px; height: 6px;
  background: var(--cyan); border-radius: 50%;
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.4; } }

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 900; color: var(--text-bright);
  letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 10px;
}
.hero h1 em { font-style: normal; color: var(--red); text-shadow: 0 0 28px var(--red-glow); }
.hero p { color: var(--text-dim); font-size: 15px; max-width: 540px; line-height: 1.6; }

/* ===== CARDS ===== */
.card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-title {
  font-family: var(--font-head);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before { content: ''; width: 3px; height: 13px; background: var(--red); border-radius: 2px; }

/* ===== GRID ===== */
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

@media (max-width: 960px) {
  .col-3, .col-4, .col-8, .col-9 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .col-3, .col-4, .col-6, .col-8, .col-9, .col-12 { grid-column: span 12; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 8px;
  border: none; cursor: pointer;
  font-family: var(--font-head);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: all .2s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .4; cursor: not-allowed !important; transform: none !important; }

.btn-primary { background: linear-gradient(135deg, var(--red), #7a0000); color: #fff; box-shadow: 0 4px 14px rgba(192,57,43,.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(192,57,43,.55); }

.btn-cyan { background: linear-gradient(135deg, #0e7490, #0891b2); color: #fff; box-shadow: 0 4px 14px rgba(34,211,238,.2); }
.btn-cyan:hover { transform: translateY(-1px); }

.btn-ghost { background: var(--bg2); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-hi); color: var(--text-bright); }

.btn-danger { background: rgba(220,38,38,0.15); border: 1px solid rgba(220,38,38,0.3); color: #f87171; }
.btn-danger:hover { background: rgba(220,38,38,0.25); }

.btn-sm { padding: 6px 14px; font-size: 10px; }
.btn-lg { padding: 14px 28px; font-size: 13px; }

/* ===== FORM ELEMENTS ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.05em; }
.form-hint { font-size: 11px; color: var(--text-dim); }

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-bright);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,.08);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); font-weight: 400; }
select { cursor: pointer; }
select option { background: var(--bg2); }
textarea { resize: vertical; min-height: 80px; }

.input-row { display: flex; gap: 10px; }
.input-row input { flex: 1; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== STAT GRID ===== */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.stat-label { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
.stat-value { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--text-bright); line-height: 1; }
.stat-value.green { color: var(--green); }
.stat-value.purple { color: var(--purple); }
.stat-value.gold { color: var(--gold); }
.stat-value.cyan { color: var(--cyan); }

/* ===== PROFILE ===== */
.profile-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.profile-avatar {
  width: 68px; height: 68px; border-radius: 12px;
  background: var(--bg3); border: 2px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; flex-shrink: 0; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text-bright); }
.profile-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ===== DESCENDANTS ===== */
.descendant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.descendant-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; text-align: center;
  transition: border-color .2s, background .2s, transform .15s;
  position: relative; cursor: default; overflow: hidden;
}
.descendant-item:hover { border-color: var(--purple); background: var(--purple-dim); transform: translateY(-2px); }
.descendant-item.mastered::after { content: '★'; position: absolute; top: 5px; right: 7px; font-size: 11px; color: var(--gold); }
.descendant-icon { width: 48px; height: 48px; border-radius: 8px; background: var(--bg3); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 22px; overflow: hidden; }
.descendant-icon img { width: 100%; height: 100%; object-fit: cover; }
.descendant-name { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.3; }
.descendant-level { font-family: var(--font-head); font-size: 10px; color: var(--purple); margin-top: 3px; }

/* ===== WEAPONS ===== */
.weapon-list { display: flex; flex-direction: column; gap: 6px; }
.weapon-row {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 14px;
  display: flex; align-items: center; gap: 12px;
  transition: border-color .2s;
}
.weapon-row:hover { border-color: var(--border-hi); }
.weapon-icon { width: 38px; height: 38px; border-radius: 6px; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; overflow: hidden; }
.weapon-icon img { width: 100%; height: 100%; object-fit: cover; }
.weapon-info { flex: 1; min-width: 0; }
.weapon-name { font-size: 13px; font-weight: 600; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weapon-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.weapon-level { font-family: var(--font-head); font-size: 12px; color: var(--gold); flex-shrink: 0; }

/* ===== RARITY ===== */
.rarity {
  display: inline-block; padding: 2px 7px;
  border-radius: 4px; font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
}
.rarity-ultimate { background: rgba(245,158,11,.12); color: var(--gold);   border: 1px solid rgba(245,158,11,.3); }
.rarity-rare      { background: rgba(167,139,250,.12); color: var(--purple); border: 1px solid rgba(167,139,250,.3); }
.rarity-standard  { background: rgba(34,197,94,.1);    color: var(--green);  border: 1px solid rgba(34,197,94,.25); }

/* ===== MODULES ===== */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; }
.module-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; transition: border-color .2s; }
.module-item:hover { border-color: var(--border-hi); }
.module-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 4px; }
.module-type { font-size: 10px; color: var(--text-dim); }
.module-cap { font-family: var(--font-head); font-size: 11px; color: var(--cyan); margin-top: 5px; }

/* ===== BUILD CARDS ===== */
.build-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.build-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s, transform .15s;
}
.build-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.build-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.build-title { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--text-bright); line-height: 1.3; }
.build-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; flex: 1; }
.build-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-dim); }
.build-author { color: var(--cyan); }
.build-likes { display: flex; align-items: center; gap: 4px; }
.build-likes button {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 16px;
  transition: transform .15s, color .15s;
  padding: 0;
}
.build-likes button:hover { transform: scale(1.2); color: var(--red); }
.build-likes button.liked { color: var(--red); }
.build-likes span { font-size: 12px; color: var(--text-dim); }

/* ===== EMPTY / LOADING / ERROR ===== */
.state-box {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center; gap: 12px;
  color: var(--text-dim);
}
.state-box .icon { font-size: 40px; opacity: .4; }
.state-box p { font-size: 14px; max-width: 280px; line-height: 1.6; }
.state-box.error .icon { opacity: 1; }
.state-box.error p { color: #f87171; }

.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ALERT ===== */
.alert {
  padding: 12px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-error   { background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.3); color: #f87171; }
.alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.25); color: var(--green); }
.alert-info    { background: var(--cyan-dim);      border: 1px solid rgba(34,211,238,.2); color: var(--cyan); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg2); border: 1px solid var(--border-hi);
  border-radius: 10px; padding: 12px 18px;
  font-size: 13px; font-weight: 600; color: var(--text-bright);
  z-index: 999;
  transform: translateY(80px); opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  max-width: 320px; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(34,197,94,.4); }
.toast.error   { border-color: rgba(248,113,113,.4); }

/* ===== LOGIN / REGISTER ===== */
.auth-wrap { max-width: 440px; margin: 60px auto; padding: 0 24px; }
.auth-card { background: var(--bg1); border: 1px solid var(--border); border-radius: 14px; padding: 36px; }
.auth-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--text-bright); margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-dim); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination a, .pagination span {
  padding: 7px 13px; border-radius: 7px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text-dim);
  text-decoration: none;
  transition: all .15s;
}
.pagination a:hover { border-color: var(--border-hi); color: var(--text); text-decoration: none; }
.pagination .current { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }

/* ===== FOOTER ===== */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 24px; margin-top: 60px;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 13px; font-weight: 600; color: var(--text-dim); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-meta { font-size: 11px; color: var(--text-dim); }
.footer-meta a { color: var(--text-dim); }
.footer-meta a:hover { color: var(--text); }

/* ===== MISC ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.text-dim { color: var(--text-dim); }
.text-cyan { color: var(--cyan); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.section { padding: 32px 0; }
.page-title { font-family: var(--font-head); font-size: clamp(18px,3vw,28px); font-weight: 900; color: var(--text-bright); margin-bottom: 6px; }
.page-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 28px; }

/* Filter Bar */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-chip {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 100px; padding: 5px 14px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; transition: all .15s; text-decoration: none;
}
.filter-chip:hover { border-color: var(--border-hi); color: var(--text); text-decoration: none; }
.filter-chip.active { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }

/* Cache-Badge */
.cache-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-dim);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 7px;
}
