/* ==========================================================================
   DIE BRUDERSCHAFT - DESIGN SYSTEM
   Stil: Düster, edel, ritterlich-ordenhaft, minimalistischer Dark Mode
   Farben: Obsidian, Dunkelrot, Antik-Gold
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-darkest: #07080a;
  --bg-primary: #0d0f14;
  --bg-surface: #141720;
  --bg-surface-elevated: #1b1f2b;
  --bg-surface-glass: rgba(20, 23, 32, 0.75);

  --gold: #d4af37;
  --gold-bright: #ffd700;
  --gold-light: #f7e7af;
  --gold-dim: #8c7322;
  --gold-glow: rgba(212, 175, 55, 0.3);
  --border-gold: rgba(212, 175, 55, 0.3);
  --border-gold-strong: rgba(212, 175, 55, 0.7);

  --red-blood: #800a0a;
  --red-crimson: #a61c1c;
  --red-glow: rgba(166, 28, 28, 0.4);

  --text-main: #f0f2f7;
  --text-muted: #9aa1b5;
  --text-dim: #646b7d;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --font-serif: 'Cinzel', serif;
  --font-ornate: 'Cinzel Decorative', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(128, 10, 10, 0.15), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.05), transparent 40%),
    linear-gradient(180deg, #07080a 0%, #0d0f14 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, .brand-title, .seal-heading {
  font-family: var(--font-serif);
  letter-spacing: 0.05em;
  color: var(--gold-light);
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
}

h2 {
  font-size: 1.8rem;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

p {
  color: var(--text-main);
  margin-bottom: 1rem;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-bright);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 800px;
}

/* Header & Nav */
.site-header {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-gold);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  max-width: 1440px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: relative;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-light);
  flex-shrink: 0;
}

.brand-seal {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.45));
  transition: transform 0.4s ease;
  cursor: pointer;
}

.brand:hover .brand-seal {
  transform: rotate(18deg) scale(1.06);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text .title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  white-space: nowrap;
}

/* ==========================================================================
   AUFGERÄUMTE HORIZONTALE HAUPTNAVIGATION (DESKTOP)
   ========================================================================== */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.main-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  color: #a8b0c2;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(212, 175, 55, 0.16);
  white-space: nowrap;
}

.main-nav .nav-link:hover {
  color: #fff;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.main-nav .nav-link.active {
  color: #ffd700;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(212, 175, 55, 0.08));
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
  font-weight: 600;
}

@media screen and (max-width: 1040px) {
  .main-nav {
    display: none !important;
  }
}

/* ==========================================================================
   RECHTE AKTIONEN & HAMBURGER
   ========================================================================== */
.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
  color: #fca5a5;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.streak-badge:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

.streak-flame {
  animation: flameBurn 1.5s infinite alternate;
}

@keyframes flameBurn {
  0% { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(1.2) rotate(3deg); }
}

/* Neuer Premium Level Badge */
.level-badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(15, 17, 24, 0.85) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 4px 11px;
  border-radius: 20px;
  color: #ffd700;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(212, 175, 55, 0.1);
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

.level-badge-premium:hover {
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.45);
  transform: translateY(-1px);
  color: #fff;
}

.level-badge-icon {
  font-size: 0.85rem;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
}

.level-badge-text {
  font-family: var(--font-serif);
  letter-spacing: 0.05em;
  font-weight: 700;
}

.level-badge-progress {
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #fef08a;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  color: #fff;
  font-size: 0.82rem;
  text-decoration: none;
}

.nav-user-pill:hover {
  border-color: var(--gold);
}

.hamburger-btn {
  width: 42px;
  height: 42px;
  background: rgba(20, 23, 32, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
}

/* ==========================================================================
   FORTSCHRITTSBALKEN (REIN VISUELL, KEINE XP-ZAHLEN)
   ========================================================================== */
.header-progress-wrap {
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.header-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #997512, #d4af37, #ffd700);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.header-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: progressShine 2.5s infinite;
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ==========================================================================
   OFFCANVAS DRAWER (HAMBURGER MENÜ RECHTS)
   ========================================================================== */
.drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1999;
}

.drawer-overlay.active {
  display: block;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  max-width: 85vw;
  height: 100%;
  background: #0f1117;
  border-left: 1px solid var(--border-gold);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  z-index: 2000;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.drawer-panel.active {
  right: 0;
}

.drawer-header {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.drawer-close:hover {
  color: var(--gold);
}

.drawer-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.2rem;
}

.drawer-user-card {
  background: rgba(20, 23, 32, 0.95);
  border: 1px solid var(--border-gold);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.1rem;
}

.drawer-section-title {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin: 1.1rem 0 0.5rem;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
}

.drawer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.drawer-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  color: #e5e7eb;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.18s ease;
}

.drawer-nav li a:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #ffd700;
  transform: translateX(3px);
}

.drawer-nav li a div {
  display: flex;
  flex-direction: column;
}

.drawer-nav li a div strong {
  font-size: 0.88rem;
  color: #f3f4f6;
  line-height: 1.25;
}

.drawer-nav li a:hover div strong {
  color: #ffd700;
}

.drawer-nav li a div small {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.6rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  font-size: 0.82rem;
  color: var(--gold-light);
}

.user-badge .rank-tag {
  background: var(--red-blood);
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Mobile Nav Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-seal {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.8rem;
  filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.45));
  animation: sealPulse 6s ease-in-out infinite alternate;
}

@keyframes sealPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.4)); }
  100% { transform: scale(1.03); filter: drop-shadow(0 0 35px rgba(212, 175, 55, 0.65)); }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 1.2rem auto 2.2rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Cards & Surfaces */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
  border-color: var(--gold);
}

.card-gold {
  border: 1px solid var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-weight: 600;
}

.btn-gold {
  background: linear-gradient(135deg, #d4af37, #997819);
  color: #0c0d11;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #f5e4a8, #d4af37);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
  color: #000;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
  color: #fff;
}

.btn-blood {
  background: linear-gradient(135deg, #a61c1c, #630808);
  color: #fff;
  box-shadow: 0 4px 15px rgba(166, 28, 28, 0.35);
}

.btn-blood:hover {
  background: linear-gradient(135deg, #c72424, #850b0b);
  box-shadow: 0 6px 20px rgba(166, 28, 28, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

/* Spezifische Funktions-Buttons laut Anforderung */
.btn-blue-info {
  background: linear-gradient(135deg, #1e3a8a, #172554);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.4);
}

.btn-blue-info:hover {
  background: #1e40af;
  color: #fff;
}

.btn-green-approve {
  background: linear-gradient(135deg, #15803d, #14532d);
  color: #bbf7d0;
  border: 1px solid rgba(187, 247, 208, 0.4);
}

.btn-green-approve:hover {
  background: #16a34a;
  color: #fff;
}

.btn-purple-adopt {
  background: linear-gradient(135deg, #6b21a8, #4a044e);
  color: #e9d5ff;
  border: 1px solid rgba(233, 213, 255, 0.4);
}

.btn-purple-adopt:hover {
  background: #7e22ce;
  color: #fff;
}

.btn-install-pwa {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}
.btn-install-pwa:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}
.btn-install-pwa.ready-install {
  border-color: var(--gold-bright);
  animation: pulsePwaGlow 2.5s infinite;
}
@keyframes pulsePwaGlow {
  0% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 0 22px rgba(212, 175, 55, 0.65); }
  100% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.3); }
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}

/* ==========================================================================
   DIGITALE MITGLIEDSKARTE (Fälschungssicherer Screen mit Siegel & Hologramm)
   ========================================================================== */
.membership-card-wrap {
  perspective: 1000px;
  max-width: 480px;
  margin: 2rem auto;
}

.member-card {
  position: relative;
  background: linear-gradient(145deg, #141720 0%, #0d0f15 100%);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 2.2rem 2rem;
  overflow: hidden;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(212, 175, 55, 0.25);
}

/* Hologramm-Schimmer-Effekt */
.member-card::before {
  content: '';
  position: absolute;
  top: -150%;
  left: -150%;
  width: 400%;
  height: 400%;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(212, 175, 55, 0.08) 35%,
    rgba(255, 255, 255, 0.18) 45%,
    rgba(166, 28, 28, 0.1) 50%,
    rgba(212, 175, 55, 0.08) 55%,
    transparent 70%
  );
  transform: rotate(25deg);
  animation: hologramSweep 6s infinite linear;
  pointer-events: none;
}

@keyframes hologramSweep {
  0% { transform: translate(-30%, -30%) rotate(25deg); }
  100% { transform: translate(30%, 30%) rotate(25deg); }
}

.card-header-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.card-order-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  font-weight: 700;
}

.card-security-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid var(--success);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--success);
  font-weight: 600;
}

.live-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.card-body-layout {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.card-seal-large {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.4));
}

.card-details {
  flex-grow: 1;
}

.card-member-name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: #fff;
  margin-bottom: 0.2rem;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.card-rank {
  display: inline-block;
  background: var(--red-blood);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card-footer-stamp {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ==========================================================================
   BIBEL & KODEX
   ========================================================================== */
.bibel-parchment {
  background: linear-gradient(180deg, #141720 0%, #10121a 100%);
  border: 1px solid var(--border-gold-strong);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.7);
  position: relative;
}

.bibel-verse {
  border-left: 3px solid var(--gold);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gold-light);
}

.rule-box {
  background: rgba(20, 23, 32, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  transition: border-color var(--transition-fast);
}

.rule-box:hover {
  border-color: var(--gold);
}

.rule-box .rule-num {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold-bright);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

/* ==========================================================================
   BIBEL-KI (KI-Mentor Chat)
   ========================================================================== */
.ki-chat-container {
  display: flex;
  flex-direction: column;
  height: 540px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ki-chat-header {
  background: rgba(20, 23, 32, 0.95);
  border-bottom: 1px solid var(--border-gold);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ki-chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ki-message {
  max-width: 82%;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.5;
}

.ki-message.bot {
  align-self: flex-start;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
}

.ki-message.bot .sender {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.ki-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1e2638, #181d2a);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.ki-chat-input-area {
  padding: 1rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-gold);
  display: flex;
  gap: 0.8rem;
}

.ki-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  background: rgba(10, 11, 14, 0.6);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.chip-btn {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
}

.chip-btn:hover {
  background: var(--gold);
  color: #000;
}

/* ==========================================================================
   GLOBALER CHAT (Echtzeit, Bilder & Systemmeldungen)
   ========================================================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 650px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chat-history {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 80%;
}

.chat-msg.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg.system {
  align-self: center;
  max-width: 90%;
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gold-light);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--gold);
  flex-shrink: 0;
}

.chat-bubble {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
}

.chat-msg.mine .chat-bubble {
  background: linear-gradient(135deg, #1b263b, #121927);
  border-color: rgba(212, 175, 55, 0.4);
}

.chat-sender-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}

.chat-sender-name {
  font-weight: 700;
  color: var(--gold-light);
}

.chat-image-preview {
  max-width: 320px;
  max-height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
  margin-top: 0.5rem;
  cursor: pointer;
}

.chat-input-bar {
  padding: 0.8rem 1.2rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* ==========================================================================
   BRUDERENTSCHEIDE & BRUDERBEGEHREN (24H COUNTDOWN)
   ========================================================================== */
.entscheid-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.countdown-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(166, 28, 28, 0.2);
  border: 1px solid var(--red-crimson);
  color: #ff9b9b;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-in_pruefung { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid #f59e0b; }
.status-aktiv { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid #22c55e; }
.status-angenommen { background: rgba(147, 51, 234, 0.2); color: #c084fc; border: 1px solid #9333ea; }
.status-abgelehnt { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid #ef4444; }

/* ==========================================================================
   MODALS (Erklär-Popups)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  position: relative;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.25);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--gold);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-darkest);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* ==========================================================================
   EXIL-SCREEN (Bann-System)
   ========================================================================== */
.exil-box {
  background: linear-gradient(180deg, #1e0505 0%, #0d0202 100%);
  border: 2px solid var(--red-crimson);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 650px;
  margin: 4rem auto;
  box-shadow: 0 0 50px rgba(166, 28, 28, 0.4);
}

.exil-notice {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #ff9b9b;
  margin: 1.5rem 0;
  letter-spacing: 0.05em;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-darkest);
  border-top: 1px solid var(--border-gold);
  padding: 2.5rem 0 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

/* ==========================================================================
   MOBILE & TOUCH-OPTIMIERUNG (Responsive Design für Smartphones & PWA)
   ========================================================================== */

/* 1. Universelle Bild- & Medien-Sicherung gegen Überlappungen */
img, svg, picture, video, canvas {
  max-width: 100% !important;
  height: auto;
  box-sizing: border-box;
}

/* Verhindert iOS-Safari-Zoom bei Input-Fokus */
@media screen and (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* 2. Header & Navigation auf Mobilgeräten: Keine Überlappungen mehr */
@media screen and (max-width: 768px) {
  .site-header {
    height: auto;
    padding: 0;
  }
  .header-inner {
    height: 60px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
  }

  .brand {
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
  }
  .brand-seal {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .brand-text .title {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-text .subtitle {
    display: none !important; /* Verhindert Text-Kollision */
  }

  /* Zentrale Buch-Nav: Nicht absolut in der Mitte kollidieren, sondern sauber platziert */
  .central-book-nav {
    position: static;
    transform: none;
    margin: 0;
  }
  .central-book-trigger {
    width: 40px;
    height: 40px;
    border-width: 1.5px;
  }
  .central-book-icon {
    width: 26px;
    height: 26px;
  }

  /* Auf Smartphones: Schriftzug 'Die Bruderschaft' ausblenden, nur Siegel-Icon links */
  .brand-text {
    display: none !important;
  }
  .brand-seal {
    width: 40px !important;
    height: 40px !important;
  }

  /* Rechte Aktionen */
  .nav-right-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .nav-user-pill {
    display: none !important; /* Im Hamburger Menü voll sichtbar */
  }
  .streak-badge {
    padding: 3px 7px;
    font-size: 0.75rem;
  }
  .level-badge {
    padding: 3px 7px;
    font-size: 0.75rem;
  }
  .level-badge-premium {
    padding: 3px 8px;
    font-size: 0.75rem;
    gap: 4px;
  }
  .level-badge-premium .level-badge-progress {
    display: none;
  }
  .hamburger-btn {
    width: 38px;
    height: 38px;
  }

  /* Drawer auf Mobilgeräten */
  .drawer-panel {
    width: min(320px, 86vw);
    max-height: 100vh;
  }
}

/* 3. Layouts & Container auf Smartphones */
@media screen and (max-width: 600px) {
  .container {
    padding: 0 1rem;
  }
  .hero {
    padding: 2.5rem 0 2rem;
  }
  .hero-seal {
    width: 75px;
    height: 75px;
  }
  .hero h1 {
    font-size: 1.85rem;
  }
  .hero-subtitle {
    font-size: 0.88rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }

  .card {
    padding: 1.2rem;
  }

  /* Chat & Feed responsive */
  .chat-box, .feed-card {
    padding: 1rem;
  }
  .ki-chat-container {
    height: 480px;
  }
}

/* ==========================================================================
   PWA & MODAL DIALOGE
   ========================================================================== */
.modal-backdrop {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 999999 !important;
}

.modal-backdrop.active {
  display: flex !important;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  background: #0f121a;
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(212, 175, 55, 0.3);
  animation: modalScaleIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-sizing: border-box;
}

@keyframes modalScaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
