/* ============================================================
   VILTRUM V – WEBSITE STYLES  (Purple Edition)
   ============================================================ */

:root {
  --bg:          #09090e;
  --bg2:         #0f0f1b;
  --bg3:         #161625;
  --bg4:         #1d1d32;
  --purple:      #7c3aed;
  --purple-h:    #9f67fa;
  --purple-dim:  rgba(124,58,237,0.15);
  --purple-glow: rgba(124,58,237,0.28);
  --border:      #252540;
  --border2:     #30304a;
  --txt:         #e2e0f0;
  --txt2:        #9990bb;
  --txt3:        #55506a;
  --discord:     #5865F2;
  --r:           4px;
  --r2:          8px;
  --nav-h:       68px;
  --sb-w:        430px;
  --shadow:      0 8px 40px rgba(0,0,0,.65);
  --f-display:   'Orbitron', monospace;
  --f-head:      'Rajdhani', sans-serif;
  --f-body:      'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--f-body);
  line-height: 1.65;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── SCROLL OFFSET ── */
#home, #rules, #factions, #community, #apply, #whitelist {
  scroll-margin-top: var(--nav-h);
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  background: rgba(9,9,14,.96);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 900;
  transition: border-color .3s, box-shadow .3s;
}
.navbar.scrolled {
  border-bottom-color: rgba(124,58,237,.4);
  box-shadow: 0 2px 24px rgba(124,58,237,.1);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
}
.logo-word {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--txt);
}
.logo-num {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--purple);
  text-shadow: 0 0 18px var(--purple-glow);
}
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--txt2);
  padding: 7px 14px;
  border-radius: var(--r);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--txt); background: rgba(255,255,255,.04); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--r);
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn-red  { background: var(--purple); color: #fff; }
.btn-red:hover { background: var(--purple-h); box-shadow: 0 0 18px var(--purple-glow); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--txt); border: 1px solid var(--border2); }
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }

.btn-login {
  background: transparent;
  color: var(--purple);
  border: 1px solid var(--purple);
}
.btn-login:hover { background: var(--purple); color: #fff; box-shadow: 0 0 14px var(--purple-glow); }

.btn-admin { background: var(--purple); color: #fff; }
.btn-admin:hover { background: var(--purple-h); }

.btn-ghost-sm {
  background: transparent;
  color: var(--txt3);
  border: 1px solid var(--border);
  font-size: 12px;
  padding: 7px 14px;
}
.btn-ghost-sm:hover { border-color: var(--purple); color: var(--purple); }

.btn-danger { background: #6b21a8; color: #fff; }
.btn-danger:hover { background: #7c3aed; }

.btn-block { width: 100%; justify-content: center; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 60px) 24px 80px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(124,58,237,.08) 0%, transparent 70%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 10%, transparent 75%);
  pointer-events: none;
}

.hero-glow-orb {
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.14) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: translate(-50%,-55%) scale(1); }
  50%       { opacity: .6; transform: translate(-50%,-55%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  animation: fadeUp .8s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-family: var(--f-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--f-display);
  font-size: clamp(56px, 11vw, 116px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: 10px;
  color: var(--txt);
  margin-bottom: 24px;
}
.hero-title em {
  font-style: normal;
  color: var(--purple);
  text-shadow: 0 0 40px var(--purple), 0 0 80px rgba(124,58,237,.35);
}

.hero-title-logo {
  display: flex;
  justify-content: center;
}
.hero-logo-img {
  width: min(640px, 86vw);
  height: auto;
  filter: drop-shadow(0 0 50px rgba(124,58,237,.45)) drop-shadow(0 0 100px rgba(124,58,237,.25));
}

.hero-lead {
  font-size: 18px;
  color: var(--txt2);
  font-weight: 300;
  letter-spacing: .5px;
  margin-bottom: 40px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-btns .btn { padding: 13px 28px; font-size: 14px; }

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 80px;
  animation: fadeUp .8s .3s ease both;
}
.hstat { text-align: center; }
.hstat strong {
  display: block;
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 4px;
}
.hstat span {
  font-size: 11px;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--f-head);
}
.hstat-sep {
  width: 1px;
  height: 40px;
  background: var(--border2);
}

.scroll-arrow {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--txt3);
  font-size: 18px;
  animation: bounce 2s ease-in-out infinite;
  z-index: 1;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── SECTIONS ── */
.section { padding: 100px 24px; }
.section-alt { background: var(--bg2); }
.container { max-width: 1200px; margin: 0 auto; }

.sec-hd {
  text-align: center;
  margin-bottom: 64px;
}
.sec-eyebrow {
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 12px;
}
.sec-hd h2 {
  font-family: var(--f-display);
  font-size: clamp(28px,5vw,42px);
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--txt);
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}
.sec-hd h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--purple);
  box-shadow: 0 0 12px var(--purple-glow);
  border-radius: 2px;
}
.sec-sub {
  color: var(--txt2);
  font-size: 15px;
  margin-top: 28px;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--txt3);
  border: 1px dashed var(--border2);
  border-radius: var(--r2);
  font-family: var(--f-head);
  letter-spacing: .5px;
}
.empty-state i { font-size: 36px; margin-bottom: 16px; display: block; opacity: .4; }

/* ── RULES ── */
.rule-group { margin-bottom: 40px; }
.rule-cat-label {
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.rule-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 24px;
  margin-bottom: 8px;
  transition: transform .2s, background .2s, border-color .2s;
}
.rule-item:hover {
  background: var(--bg4);
  border-color: rgba(124,58,237,.45);
  transform: translateX(4px);
}
.rule-num {
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--purple);
  margin-bottom: 5px;
}
.rule-title {
  font-family: var(--f-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.rule-content { font-size: 14px; color: var(--txt2); line-height: 1.7; }

/* ── FACTIONS ── */
.factions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.faction-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.faction-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--border2);
}
.faction-stripe { height: 3px; }
.faction-body { padding: 22px 22px 24px; }
.faction-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r);
  object-fit: cover;
  border: 2px solid var(--border);
  margin-bottom: 14px;
}
.faction-icon-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.faction-type {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--txt3);
  margin-bottom: 6px;
}
.faction-name {
  font-family: var(--f-head);
  font-size: 21px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 10px;
  letter-spacing: .3px;
}
.faction-desc { font-size: 13px; color: var(--txt2); line-height: 1.65; }

/* ── DISCORD ── */
.discord-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 700px) {
  .discord-layout { grid-template-columns: 1fr; }
}

.discord-card {
  background: linear-gradient(135deg, #5865F2, #404EED);
  border-radius: var(--r2);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(88,101,242,.3);
}
.discord-dicon { font-size: 48px; margin-bottom: 14px; }
.discord-name {
  font-family: var(--f-head);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.discord-sid {
  font-family: monospace;
  font-size: 11px;
  color: rgba(255,255,255,.65);
  background: rgba(0,0,0,.25);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 22px;
}
.discord-join {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #5865F2;
  padding: 11px 24px;
  border-radius: var(--r);
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  transition: all .2s;
}
.discord-join:hover {
  background: rgba(255,255,255,.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
}

.roles-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
}
.roles-card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--txt3);
}
.role-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.role-row:last-child { border-bottom: none; }
.role-row:hover { background: var(--bg4); }
.role-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.role-name-txt {
  font-family: var(--f-head);
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}
.role-id-txt {
  font-family: monospace;
  font-size: 11px;
  color: var(--txt3);
  background: var(--bg2);
  padding: 3px 8px;
  border-radius: 3px;
}

/* ── FOOTER ── */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-copy { font-size: 13px; color: var(--txt3); }

/* ── MODAL ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal.open { opacity: 1; pointer-events: all; }
.modal-bd {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(6px);
}
.modal-box {
  position: relative;
  z-index: 1;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-top: 3px solid var(--purple);
  border-radius: var(--r2);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,.7);
  animation: modalIn .25s ease both;
}
@keyframes modalIn {
  from { transform: translateY(-16px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-top {
  padding: 24px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.modal-label {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--purple);
  margin-bottom: 4px;
}
.modal-top h3 {
  font-family: var(--f-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.modal-body { padding: 22px 28px 28px; }

/* ── FORMS ── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--txt2);
  margin-bottom: 7px;
}
.field label small { font-size: 10px; color: var(--txt3); text-transform: none; letter-spacing: 0; }
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 10px 13px;
  color: var(--txt);
  font-size: 14px;
  font-family: var(--f-body);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input[type="color"] {
  padding: 3px;
  height: 40px;
  cursor: pointer;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239990bb' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  appearance: none;
}

.form-error {
  font-size: 13px;
  color: var(--purple-h);
  min-height: 18px;
  margin-bottom: 10px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--txt3);
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--txt); background: var(--bg4); }

/* ── ADMIN SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0;
  right: calc(-1 * var(--sb-w));
  width: var(--sb-w);
  height: 100vh;
  background: #0a0a14;
  border-left: 1px solid var(--border);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: right .35s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sidebar.open { right: 0; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1090;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.sidebar-overlay.show { opacity: 1; pointer-events: all; }

.sb-head {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-title {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sb-tabs {
  display: flex;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.stab {
  flex: 1;
  padding: 11px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--txt3);
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
}
.stab.active { color: var(--purple); border-bottom-color: var(--purple); }
.stab:hover:not(.active) { color: var(--txt2); }

.sb-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.sp { display: none; padding: 20px; }
.sp.active { display: block; }

.sp h4 {
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--txt2);
  margin-bottom: 14px;
}

.sep { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-dim);
  color: var(--purple);
  font-size: 11px;
  font-family: var(--f-body);
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── ADMIN ITEM LIST ── */
.item-list { display: flex; flex-direction: column; gap: 7px; }
.admin-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.ai-left { flex: 1; min-width: 0; }
.ai-title {
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-meta { font-size: 11px; color: var(--txt3); }
.ai-del {
  width: 28px;
  height: 28px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: none;
  color: var(--txt3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: all .2s;
}
.ai-del:hover { border-color: var(--purple-h); color: var(--purple-h); background: var(--purple-dim); }

.ai-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.muted { font-size: 13px; color: var(--txt3); margin-bottom: 12px; line-height: 1.5; }

/* ── TOASTS ── */
.toast-wrap {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--purple);
  border-radius: var(--r);
  padding: 12px 18px;
  font-size: 14px;
  color: var(--txt);
  box-shadow: var(--shadow);
  min-width: 240px;
  animation: toastIn .3s ease, toastOut .3s 2.8s ease forwards;
}
.toast.ok  { border-left-color: #27ae60; }
.toast.err { border-left-color: #9f67fa; }
@keyframes toastIn  { from { transform: translateX(110%); opacity:0; } to { transform:none; opacity:1; } }
@keyframes toastOut { to   { transform: translateX(110%); opacity:0; } }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .sidebar { width: 100%; }
  :root { --sb-w: 100%; }
}
@media (max-width: 500px) {
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-stats { gap: 20px; }
}

/* ── DISCORD MEMBERS ── */
.members-section { margin-top: 32px; }

.members-section-title {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--txt2);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.member-group { margin-bottom: 28px; }

.member-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.member-group-count {
  margin-left: auto;
  background: var(--bg4);
  color: var(--txt3);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--f-body);
}

.member-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 14px 8px 10px;
  transition: background .15s, border-color .15s;
}
.member-card:hover { background: var(--bg4); border-color: var(--border2); }

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.member-avatar-ph {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.member-name { font-size: 14px; color: var(--txt); white-space: nowrap; }

.members-info {
  text-align: center;
  padding: 40px 20px;
  color: var(--txt3);
  border: 1px dashed var(--border2);
  border-radius: var(--r2);
  font-size: 14px;
  line-height: 1.7;
}
.members-info i { display: block; font-size: 28px; margin-bottom: 12px; opacity: .4; }
.members-info a { color: var(--purple); text-decoration: none; }
.members-info a:hover { text-decoration: underline; }

.members-error {
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: var(--r);
  padding: 16px 20px;
  color: var(--purple-h);
  font-size: 13px;
  font-family: monospace;
  word-break: break-all;
}

.members-loading {
  text-align: center;
  padding: 32px;
  color: var(--txt3);
  font-size: 14px;
}

/* ── TOKEN FIELD ── */
.token-wrap {
  display: flex;
  gap: 0;
}
.token-wrap input {
  border-radius: var(--r) 0 0 var(--r);
  flex: 1;
}
.token-eye {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-left: none;
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--txt3);
  padding: 0 12px;
  cursor: pointer;
  transition: color .2s, background .2s;
  font-size: 13px;
}
.token-eye:hover { color: var(--txt); background: var(--bg4); }

.field-hint {
  font-size: 11px;
  color: var(--txt3);
  margin-top: 6px;
  line-height: 1.5;
}
.field-hint a { color: var(--txt2); }
.field-hint strong { color: var(--txt2); }

/* ── BEWERBEN SECTION ── */
.apply-layout {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 920px) { .apply-layout { grid-template-columns: 1fr; } }

.apply-info { display: flex; flex-direction: column; gap: 16px; }

.apply-info-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--r2) var(--r2) 0;
  padding: 20px 22px;
  transition: border-color .2s, background .2s;
}
.apply-info-card:hover { background: var(--bg4); border-color: rgba(124,58,237,.45); }
.aic-icon { font-size: 24px; color: var(--purple); margin-bottom: 10px; opacity: .85; }
.apply-info-card h4 {
  font-family: var(--f-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.apply-info-card p { font-size: 13px; color: var(--txt2); line-height: 1.65; }

.apply-form-wrap {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-top: 3px solid var(--purple);
  border-radius: 0 0 var(--r2) var(--r2);
  padding: 28px 32px;
}
.apply-form-title {
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.apply-section-label {
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple);
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.apply-section-label:first-of-type { margin-top: 0; }

.apply-radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.apply-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 9px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--txt2);
  transition: border-color .2s, background .2s, color .2s;
  user-select: none;
}
.apply-radio:hover { border-color: var(--purple); color: var(--txt); }
.apply-radio input[type="radio"] { accent-color: var(--purple); cursor: pointer; }
.apply-radio:has(input:checked) {
  border-color: var(--purple);
  background: var(--purple-dim);
  color: var(--purple-h);
}

.apply-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .apply-row { grid-template-columns: 1fr; } }

.apply-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
}
.apply-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
  flex-shrink: 0;
  margin-top: 3px;
  cursor: pointer;
}
.apply-check label {
  font-size: 13px;
  color: var(--txt2);
  cursor: pointer;
  line-height: 1.55;
}
.apply-check label a { color: var(--purple); }
.apply-check label a:hover { text-decoration: underline; }

.req { color: var(--purple); font-weight: 700; }

.apply-success {
  text-align: center;
  padding: 52px 24px;
}
.apply-success-icon {
  font-size: 60px;
  color: #27ae60;
  margin-bottom: 20px;
  opacity: .9;
  animation: fadeUp .5s ease both;
}
.apply-success h3 {
  font-family: var(--f-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 12px;
  letter-spacing: .5px;
}
.apply-success p { font-size: 14px; color: var(--txt2); line-height: 1.7; }

/* ── APPLICATION STATUS BADGES ── */
.app-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.app-s-new { background: var(--purple-dim); color: var(--purple-h); border: 1px solid rgba(124,58,237,.3); }
.app-s-ok  { background: rgba(39,174,96,.12); color: #2ecc71; border: 1px solid rgba(39,174,96,.3); }
.app-s-err { background: rgba(231,76,60,.12); color: #e74c3c; border: 1px solid rgba(231,76,60,.3); }

/* ── ADMIN APPLICATIONS LIST ── */
.app-admin-item {
  cursor: pointer;
  transition: background .15s, border-color .15s !important;
}
.app-admin-item:hover {
  background: var(--bg3) !important;
  border-color: var(--purple) !important;
}

/* ── APPLICATION DETAIL OVERLAY (Vollbild) ── */
.app-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
}
.app-overlay.open { opacity: 1; pointer-events: all; }

.app-overlay-inner {
  background: var(--bg2);
  border-left: 1px solid var(--border);
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  animation: slideInRight .28s ease both;
  overflow: hidden;
}
@media (max-width: 940px) { .app-overlay-inner { max-width: 100%; border-left: none; } }

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.app-overlay-head {
  padding: 24px 32px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.app-overlay-eyebrow {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--purple);
  margin-bottom: 6px;
}
.app-overlay-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.app-overlay-name-row h2 {
  font-family: var(--f-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: .5px;
}

.app-overlay-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.btn-accept {
  background: rgba(39,174,96,.15);
  color: #2ecc71;
  border: 1px solid rgba(39,174,96,.35);
}
.btn-accept:hover { background: rgba(39,174,96,.28); transform: translateY(-1px); }
.btn-reject {
  background: rgba(231,76,60,.12);
  color: #e74c3c;
  border: 1px solid rgba(231,76,60,.3);
}
.btn-reject:hover { background: rgba(231,76,60,.25); transform: translateY(-1px); }
.app-overlay-del:hover { color: #e74c3c !important; background: rgba(231,76,60,.12) !important; }

.app-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.app-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 600px) { .app-detail-grid { grid-template-columns: 1fr; } }

.app-detail-field--full { grid-column: 1 / -1; }

.app-detail-label {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
}
.app-detail-value {
  font-size: 15px;
  color: var(--txt);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  line-height: 1.5;
}
.app-detail-text {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 100px;
  line-height: 1.75;
  font-size: 14px;
  color: var(--txt2);
}
.app-detail-date {
  font-family: monospace;
  font-size: 13px;
  color: var(--txt3);
}
.app-detail-section-head {
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.app-detail-section-head:first-child { margin-top: 0; }

/* ============================================================
   PAGE-HERO  (bewerbung.html / whitelist.html – eigene Seiten)
   ============================================================ */
.page-hero {
  padding: calc(var(--nav-h) + 64px) 24px 56px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,.10) 0%, transparent 70%),
              linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero .sec-eyebrow { justify-content: center; }
.page-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 10px 0 12px;
  background: linear-gradient(135deg, var(--txt) 30%, var(--purple-h) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero .sec-sub { max-width: 560px; margin: 0 auto; }

/* ============================================================
   BEWERBEN-TEASER  (Startseite → verlinkt auf eigene Seiten)
   ============================================================ */
.apply-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}
.apply-teaser-card {
  display: block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 28px 26px;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.apply-teaser-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,.10), transparent 60%);
  opacity: 0;
  transition: opacity .25s;
}
.apply-teaser-card:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.apply-teaser-card:hover::before { opacity: 1; }
.apply-teaser-card .aic-icon { position: relative; z-index: 1; }
.apply-teaser-card h3 {
  position: relative; z-index: 1;
  font-family: var(--f-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
  margin: 14px 0 8px;
  color: var(--txt);
}
.apply-teaser-card p {
  position: relative; z-index: 1;
  font-size: 13px;
  color: var(--txt2);
  line-height: 1.65;
  margin-bottom: 16px;
}
.apply-teaser-link {
  position: relative; z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--purple-h);
}
.apply-teaser-card:hover .apply-teaser-link { gap: 12px; }
.apply-teaser-link i { transition: transform .2s; }
.apply-teaser-card:hover .apply-teaser-link i { transform: translateX(3px); }

/* ── MITGLIEDER: Rolle (öffentliche Anzeige) ── */
.member-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member-info .member-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-role {
  font-family: var(--f-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   ADMIN-SEITE  (admin.html) – Login-Karte & großes Dashboard
   ============================================================ */

.admin-page-body { background: var(--bg); min-height: 100vh; }

/* ── LOGIN-ANSICHT ── */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) 24px 60px;
  background: radial-gradient(ellipse 70% 60% at 50% 35%, rgba(124,58,237,.12) 0%, transparent 70%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
.admin-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-top: 3px solid var(--purple);
  border-radius: var(--r2);
  padding: 40px 36px 36px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: modalIn .3s ease both;
}
.alc-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-dim);
  color: var(--purple-h);
  font-size: 26px;
  border: 1px solid rgba(124,58,237,.35);
}
.alc-eyebrow {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--purple-h);
  margin-bottom: 6px;
}
.admin-login-card h2 {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.alc-sub {
  font-size: 13px;
  color: var(--txt2);
  line-height: 1.6;
  margin-bottom: 26px;
}
.admin-login-card .field { text-align: left; }

/* ── DASHBOARD-ANSICHT ── */
.admin-dash {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.admin-side {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
}
.admin-side-head {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.ash-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r2);
  background: var(--purple-dim);
  color: var(--purple-h);
  border: 1px solid rgba(124,58,237,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 14px;
}
.ash-title {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ash-user {
  font-size: 12px;
  color: var(--txt3);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ash-user i { color: var(--purple-h); font-size: 14px; }

.admin-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 14px;
  overflow-y: auto;
}
.anav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--r);
  padding: 12px 14px;
  color: var(--txt2);
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .15s;
}
.anav i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.anav span { flex: 1; }
.anav:hover { background: var(--bg3); color: var(--txt); }
.anav.active {
  background: var(--purple-dim);
  color: var(--purple-h);
  box-shadow: inset 3px 0 0 var(--purple);
}
.anav .badge { margin-left: auto; }

.admin-logout-btn {
  margin: 14px;
  justify-content: center;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px;
}

.ap { display: none; animation: fadeUp .3s ease both; }
.ap.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.ap-eyebrow {
  font-family: var(--f-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--purple-h);
  margin-bottom: 6px;
}
.ap-head h2 {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 14px;
}
.ap-head h2 i { color: var(--purple-h); font-size: 22px; }

.badge-lg {
  min-width: 36px;
  height: 36px;
  border-radius: var(--r2);
  font-size: 15px;
  font-weight: 700;
  padding: 0 12px;
  margin-left: 0;
}

.ap-hint {
  background: var(--purple-dim);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: var(--r2);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--txt2);
  line-height: 1.6;
  margin-bottom: 24px;
}
.ap-hint i { color: var(--purple-h); margin-right: 6px; }

.ap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: start;
}
.ap-grid-1 { grid-template-columns: minmax(0, 640px); }

.ap-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 26px;
}
.ap-card h3 {
  font-family: var(--f-head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ap-card h3 .badge { margin-left: auto; }
.ap-card h4 {
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--txt2);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-card-full { grid-column: 1 / -1; }
.ap-card-danger {
  border-color: rgba(231,76,60,.3);
  background: rgba(231,76,60,.05);
}
.ap-card-danger h3 { color: #e74c3c; }
.ap-card-danger h3 i { color: #e74c3c; }

.ap-btn-row { display: flex; gap: 10px; align-items: center; }
.ap-btn-row .btn-block { flex: 1; }

.item-list-lg { max-height: 620px; overflow-y: auto; padding-right: 4px; }

.ai-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ai-avatar-ph {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-head);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.ai-edit {
  width: 28px;
  height: 28px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: none;
  color: var(--txt3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: all .2s;
}
.ai-edit:hover { border-color: var(--purple-h); color: var(--purple-h); background: var(--purple-dim); }

/* ── RESPONSIVE: Dashboard auf schmalen Bildschirmen ── */
@media (max-width: 1080px) {
  .ap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-dash { flex-direction: column; }
  .admin-side {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .admin-side-head { border-bottom: none; border-right: 1px solid var(--border); flex: 1; min-width: 220px; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; overflow: visible; }
  .anav { width: auto; }
  .anav span { flex: none; }
  .admin-logout-btn { margin: 14px; }
  .admin-main { padding: 28px 20px 60px; }
}
@media (max-width: 560px) {
  .admin-login-card { padding: 32px 24px 28px; }
}
