/* ==============================================================
   TENNO ROSTER — Design-System
   Eigenständige, spielinspirierte HUD-Ästhetik (keine Originalgrafiken)
   ============================================================== */

:root {
  /* Farben */
  --void-950: #050810;
  --void-900: #0a0f18;
  --panel-900: #0d1622;
  --panel-800: #121c2a;
  --panel-750: #172436;
  --line-soft: rgba(125, 168, 182, 0.14);
  --line-cyan: rgba(45, 227, 214, 0.35);
  --cyan: #2de3d6;
  --cyan-soft: #8ff5ec;
  --amber: #ff8a3d;
  --amber-soft: #ffb27a;
  --violet: #8b6bff;
  --text-hi: #eaf3f4;
  --text-mid: #9fb4bf;
  --text-low: #5c7280;
  --success: #38e29b;
  --warning: #ffcc4d;
  --danger: #ff5c6c;

  /* Typografie */
  --font-display: "Orbitron", "Segoe UI", sans-serif;
  --font-body: "Rajdhani", "Segoe UI", sans-serif;

  /* Sonstiges */
  --clip-lg: polygon(0 14px, 14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  --clip-sm: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(45, 227, 214, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 35% at 100% 10%, rgba(139, 107, 255, 0.06), transparent 55%),
    var(--void-950);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 1.06rem;
  font-weight: 500;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
  color: var(--text-hi);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

h1 { font-weight: 900; }

p { max-width: 62ch; }
p.wide { max-width: none; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-soft); }

::selection { background: var(--cyan); color: var(--void-950); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------
   Dropdowns (Nutzermenü in der Navbar)
--------------------------------------------------------- */
.dropdown-menu {
  background: var(--panel-900);
  border: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 0.4rem 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.dropdown-item {
  color: var(--text-mid);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 1.1rem;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(45, 227, 214, 0.1);
  color: var(--text-hi);
}
.dropdown-item:active {
  background: rgba(45, 227, 214, 0.16);
  color: var(--text-hi);
}
.dropdown-divider {
  border-top: 1px solid var(--line-soft);
  opacity: 1;
}

/* ---------------------------------------------------------
   Glow-Divider (ersetzt <hr>)
--------------------------------------------------------- */
.glow-line {
  height: 1px;
  border: 0;
  margin: 2.5rem 0;
  background: linear-gradient(90deg, transparent, var(--line-cyan) 20%, var(--line-cyan) 80%, transparent);
  box-shadow: 0 0 8px rgba(45, 227, 214, 0.25);
}

/* ---------------------------------------------------------
   Navbar
--------------------------------------------------------- */
.tr-navbar {
  background: rgba(5, 8, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding: 0.85rem 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.tr-navbar.is-scrolled {
  border-bottom-color: var(--line-cyan);
  box-shadow: 0 1px 24px rgba(45, 227, 214, 0.12);
}
.tr-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-hi);
  letter-spacing: 0.03em;
}
.tr-brand:hover { color: var(--text-hi); }
.tr-brand .mark { width: 30px; height: 30px; flex-shrink: 0; }
.tr-nav .nav-link {
  color: var(--text-mid);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.5rem 0.9rem !important;
  border-bottom: 2px solid transparent;
}
.tr-nav .nav-link:hover,
.tr-nav .nav-link.active {
  color: var(--text-hi);
  border-bottom-color: var(--cyan);
}
.tr-navbar .navbar-toggler { border-color: var(--line-soft); }

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: 0;
  clip-path: var(--clip-sm);
  padding: 0.55rem 1.4rem;
  border-width: 1px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-cyan {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--void-950);
}
.btn-cyan:hover {
  background: var(--cyan-soft);
  border-color: var(--cyan-soft);
  color: var(--void-950);
  box-shadow: 0 0 18px rgba(45, 227, 214, 0.45);
}

.btn-outline-cyan {
  background: transparent;
  border-color: var(--line-cyan);
  color: var(--cyan-soft);
}
.btn-outline-cyan:hover {
  background: rgba(45, 227, 214, 0.1);
  border-color: var(--cyan);
  color: var(--cyan-soft);
}

.btn-amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--void-950);
}
.btn-amber:hover {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
  color: var(--void-950);
  box-shadow: 0 0 18px rgba(255, 138, 61, 0.4);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--text-mid);
}
.btn-ghost:hover { color: var(--text-hi); border-color: var(--text-mid); }

.btn-danger-line {
  background: transparent;
  border-color: rgba(255, 92, 108, 0.5);
  color: var(--danger);
}
.btn-danger-line:hover { background: rgba(255, 92, 108, 0.12); color: #ff8b96; }

.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.88rem; }

/* ---------------------------------------------------------
   Panels / Cards (geclippte HUD-Panels, keine Bootstrap-Rundungen)
--------------------------------------------------------- */
.panel {
  position: relative;
  background: linear-gradient(160deg, var(--panel-900), var(--panel-800));
  border: 1px solid var(--line-soft);
  clip-path: var(--clip-lg);
  padding: 1.75rem;
}
.panel::before, .panel::after,
.corner-frame::before, .corner-frame::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-cyan);
  opacity: 0.9;
}
.panel::before { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.panel::after { bottom: -1px; left: -1px; border-right: none; border-top: none; }

.panel-tight { padding: 1.1rem 1.25rem; }

.panel-glow {
  border-color: var(--line-cyan);
  box-shadow: 0 0 0 1px rgba(45, 227, 214, 0.08) inset, 0 12px 40px rgba(0, 0, 0, 0.35);
}

.panel-interactive {
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.panel-interactive:hover {
  border-color: var(--line-cyan);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(45, 227, 214, 0.08);
}

/* ---------------------------------------------------------
   Badges / Status-Chips (HUD-Readout-Stil)
--------------------------------------------------------- */
.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  clip-path: var(--clip-sm);
  border: 1px solid;
}
.hud-badge::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.hud-badge-success { color: var(--success); border-color: rgba(56, 226, 155, 0.4); background: rgba(56, 226, 155, 0.08); }
.hud-badge-warning { color: var(--warning); border-color: rgba(255, 204, 77, 0.4); background: rgba(255, 204, 77, 0.08); }
.hud-badge-danger { color: var(--danger); border-color: rgba(255, 92, 108, 0.4); background: rgba(255, 92, 108, 0.08); }
.hud-badge-secondary { color: var(--text-mid); border-color: var(--line-soft); background: rgba(159, 180, 191, 0.06); }

.tag-chip {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan-soft);
  border: 1px solid var(--line-cyan);
  background: rgba(45, 227, 214, 0.06);
  padding: 0.2rem 0.6rem;
  margin: 0.15rem 0.3rem 0.15rem 0;
  clip-path: var(--clip-sm);
}

/* ---------------------------------------------------------
   Formulare
--------------------------------------------------------- */
label, .form-label {
  font-weight: 700;
  color: var(--text-hi);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
.form-control, .form-select {
  background: var(--void-900);
  border: 1px solid var(--line-soft);
  border-bottom: 2px solid var(--line-soft);
  border-radius: 0;
  color: var(--text-hi);
  font-family: var(--font-body);
  font-weight: 500;
  padding: 0.6rem 0.85rem;
}
.form-control:focus, .form-select:focus {
  background: var(--void-900);
  color: var(--text-hi);
  border-color: var(--line-soft);
  border-bottom-color: var(--cyan);
  box-shadow: 0 4px 12px -6px rgba(45, 227, 214, 0.5);
}
.form-control::placeholder { color: var(--text-low); }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232de3d6' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
}
.form-text { color: var(--text-low); }
.form-check-input {
  background-color: var(--void-900);
  border: 1px solid var(--line-soft);
  border-radius: 0;
}
.form-check-input:checked { background-color: var(--cyan); border-color: var(--cyan); }
.form-check-label { font-weight: 500; color: var(--text-mid); }

.form-switch .form-check-input {
  width: 2.6em;
  height: 1.4em;
  border-radius: 999px;
  background-color: var(--void-900);
  border: 1px solid var(--line-soft);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 1.1em 1.1em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5' fill='%235c7280'/%3E%3C/svg%3E");
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background-position 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.form-switch .form-check-input:checked {
  background-color: rgba(45, 227, 214, 0.15);
  border-color: var(--cyan);
  background-position: right center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5' fill='%232de3d6'/%3E%3C/svg%3E");
}

.chip-select input { display: none; }
.chip-select label {
  display: inline-block;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-mid);
  border: 1px solid var(--line-soft);
  padding: 0.35rem 0.75rem;
  margin: 0.2rem 0.35rem 0.2rem 0;
  clip-path: var(--clip-sm);
  transition: all 0.15s ease;
}
.chip-select input:checked + label {
  color: var(--void-950);
  background: var(--cyan);
  border-color: var(--cyan);
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--line-soft);
  background-image:
    linear-gradient(rgba(45, 227, 214, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 227, 214, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: center -1px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 40%, transparent 95%);
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--cyan);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 15ch;
}
.hero .lead {
  color: var(--text-mid);
  font-size: 1.2rem;
  font-weight: 500;
  max-width: 46ch;
}
.hero-stats {
  display: flex;
  gap: 2.2rem;
  margin-top: 2.5rem;
}
.hero-stats .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--text-hi);
  display: block;
}
.hero-stats .label {
  font-size: 0.82rem;
  color: var(--text-low);
}

.hero-graphic { animation: hero-reveal 0.9s ease-out both; }
@keyframes hero-reveal {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------------------------------------------------
   Split-Path Sektion (Clan bewerben vs. Clan suchen)
--------------------------------------------------------- */
.path-card {
  height: 100%;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
}
.path-card .icon-frame {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-cyan);
  clip-path: var(--clip-sm);
  margin-bottom: 1.25rem;
  color: var(--cyan);
}
.path-card h3 { font-size: 1.4rem; }
.path-card .mt-auto-actions { margin-top: auto; padding-top: 1.5rem; }

/* ---------------------------------------------------------
   Clan- / Suchauftrags-Karten
--------------------------------------------------------- */
.clan-card { display: flex; flex-direction: column; height: 100%; }
.clan-card .clan-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.clan-card .clan-tag {
  font-family: var(--font-display);
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 700;
}
.clan-card h3 { font-size: 1.3rem; margin-bottom: 0.15rem; }
.clan-card .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--text-low);
  margin-bottom: 0.9rem;
}
.clan-card .meta-row span { display: inline-flex; align-items: center; gap: 0.35rem; }
.clan-card p.desc {
  color: var(--text-mid);
  font-size: 0.95rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.clan-card .card-footer-row {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---------------------------------------------------------
   Filter-Leiste
--------------------------------------------------------- */
.filter-bar { padding: 1.5rem; margin-bottom: 2rem; }

/* ---------------------------------------------------------
   Steps ("So funktioniert's" — echte Abfolge, daher nummeriert)
--------------------------------------------------------- */
.step-item { display: flex; gap: 1.1rem; align-items: flex-start; }
.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--void-950);
  background: var(--cyan);
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: var(--clip-sm);
}
.step-item h4 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.step-item p { font-size: 0.92rem; }

/* ---------------------------------------------------------
   Tabellen (Bewerbungsübersicht, Admin)
--------------------------------------------------------- */
.table-hud {
  --bs-table-bg: transparent;
  color: var(--text-mid);
  border-color: var(--line-soft);
}
.table-hud thead th {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-low);
  border-bottom: 1px solid var(--line-cyan);
  font-weight: 700;
}
.table-hud td, .table-hud th { border-color: var(--line-soft); vertical-align: middle; padding: 0.85rem 0.75rem; color: var(--text-mid); }
.table-hud td a { color: var(--cyan-soft); }
.table-hud tbody tr:hover { background: rgba(45, 227, 214, 0.04); }

/* ---------------------------------------------------------
   Nachrichten / Konversationen
--------------------------------------------------------- */
.conv-list-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s ease;
}
.conv-list-item:hover { background: rgba(45, 227, 214, 0.04); }
.conv-list-item.unread { border-left: 2px solid var(--cyan); }
.conv-list-item .name { color: var(--text-hi); font-weight: 700; }
.conv-list-item .preview { font-size: 0.88rem; color: var(--text-low); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bubble {
  max-width: 68%;
  padding: 0.7rem 1rem;
  margin-bottom: 0.75rem;
  clip-path: var(--clip-sm);
  font-size: 0.95rem;
}
.bubble-in { background: var(--panel-800); border: 1px solid var(--line-soft); color: var(--text-mid); }
.bubble-out { background: rgba(45, 227, 214, 0.12); border: 1px solid var(--line-cyan); color: var(--text-hi); margin-left: auto; }
.bubble .time { display: block; font-size: 0.7rem; color: var(--text-low); margin-top: 0.3rem; }

/* ---------------------------------------------------------
   Empty States
--------------------------------------------------------- */
.empty-state { text-align: center; padding: 3.5rem 1.5rem; color: var(--text-low); }
.empty-state .glyph { font-size: 2.2rem; color: var(--text-low); margin-bottom: 1rem; }

/* ---------------------------------------------------------
   Alerts / Flash-Meldungen
--------------------------------------------------------- */
.alert {
  border-radius: 0;
  clip-path: var(--clip-sm);
  border: 1px solid;
  font-weight: 600;
}
.alert-success { background: rgba(56, 226, 155, 0.08); border-color: rgba(56, 226, 155, 0.35); color: var(--success); }
.alert-danger { background: rgba(255, 92, 108, 0.08); border-color: rgba(255, 92, 108, 0.35); color: var(--danger); }
.alert-warning { background: rgba(255, 204, 77, 0.08); border-color: rgba(255, 204, 77, 0.35); color: var(--warning); }
.alert-info { background: rgba(45, 227, 214, 0.08); border-color: var(--line-cyan); color: var(--cyan-soft); }

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.tr-footer {
  border-top: 1px solid var(--line-soft);
  padding: 2.5rem 0;
  font-size: 0.88rem;
  color: var(--text-low);
}
.tr-footer a { color: var(--text-mid); }
.tr-footer a:hover { color: var(--cyan); }

/* ---------------------------------------------------------
   Dashboard
--------------------------------------------------------- */
.stat-tile {
  padding: 1.35rem;
  text-align: left;
}
.stat-tile .num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--text-hi); }
.stat-tile .label { font-size: 0.85rem; color: var(--text-low); }

/* ---------------------------------------------------------
   Avatar
--------------------------------------------------------- */
.avatar-img, .avatar-placeholder {
  width: 44px;
  height: 44px;
  object-fit: cover;
  clip-path: var(--clip-sm);
  border: 1px solid var(--line-cyan);
}
.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-800);
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 700;
}
.avatar-lg { width: 88px; height: 88px; }

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 767.98px) {
  .hero { padding: 4rem 0 3rem; text-align: left; }
  .hero-stats { flex-wrap: wrap; gap: 1.4rem; }
  .panel { padding: 1.35rem; }
}
