/* ==========================================================================
   WoW Alliance Theme Stylesheet
   Gildenportal: Quisque Pro Se - Die WoW: Forever Gilde
   
   INHALTSVERZEICHNIS / TABLE OF CONTENTS:
   --------------------------------------------------------------------------
   1. CSS VARIABLES (:root)
   2. BASE & RESET STYLES
   3. UTILITIES & HELPER CLASSES
   4. NAVIGATION & HEADER (INCL. HAMBURGER MENU)
   5. HERO BANNER
   6. LAYOUT CONTAINERS & GRIDS (2-COL & 3-COL)
   7. PANELS & CARDS
   8. TEAMSPEAK 3 INTEGRATION
   9. AUTHENTICATION & LOGIN/REGISTER (AUTH-PAGE)
   10. FORMS, INPUTS & TOUCH TARGETS
   11. BUTTONS
   12. ALERTS & NOTIFICATIONS
   13. TABLES & RESPONSIVE CONTAINERS
   14. BADGES (USER ROLES & WOW CLASSES)
   15. NEWS, FEED & RAID WIDGETS
   16. PROFIL, AVATAR & NACHRICHTENSYSTEM
   17. RAID PLANER SPECIFIC STYLES & MOBILE CARDS
   18. FOOTER
   19. RESPONSIVE BREAKPOINTS (MEDIA QUERIES)
   20. ROSTER AVATARE & BATTLE.NET STYLES
   21. ITEM LEVEL COLOR BADGES
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES (:root)
   ========================================================================== */
:root {
  /* Allianz & Dithmarschen Farbpalette */
  --bg-dark: #02060d;
  --alliance-blue-dark: #071326;
  --alliance-blue-royal: #003366;
  --alliance-blue-glow: #0066cc;

  --border-gold: #c89b3c;
  --border-gold-bright: #f5d77f;
  --border-gold-dark: #8a6100;
  --text-gold: #f5d77f;

  --text-main: #f0f4f8; /* Hoher Kontrast für optimale Lesbarkeit */
  --text-muted: #9bb0c9;

  /* --panel-bg: rgba(6, 14, 28, 0.94); */
  --panel-bg: backdrop-filter: blur(4px);
  --card-bg: rgba(3, 8, 16, 0.88);

  --gold-gradient: linear-gradient(
    135deg,
    #f5d77f 0%,
    #c89b3c 50%,
    #8a6100 100%
  );
  --blue-gradient: linear-gradient(180deg, #003366 0%, #001122 100%);

  --danger-red: #c0392b;
  --success-green: #27ae60;

  /* Ergonomie & Touch */
  --touch-min-size: 44px;
}

/* ==========================================================================
   2. BASE & RESET STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  touch-action: manipulation; /* Verhindert 300ms Klick-Verzögerung auf Touchscreen */
}

html,
body {
  width: 100%;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(
      circle at 50% 15%,
      rgba(0, 85, 165, 0.25) 0%,
      transparent 60%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(184, 29, 29, 0.15) 0%,
      transparent 50%
    ),
    var(--bg-dark)
      url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><rect width="120" height="120" fill="%2302060d"/><circle cx="60" cy="60" r="1" fill="%23c89b3c" opacity="0.15"/><path d="M0 0h120v120H0z" fill="none" stroke="%230b1c36" stroke-width="0.5"/></svg>')
      repeat fixed;
  color: var(--text-main);
  font-family: "Metamorphous", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

/* Spezial-Hintergrund für die Raid-Seite */
body.page-raid {
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(2, 6, 13, 0.55) 0%,
      rgba(2, 6, 13, 0.85) 100%
    ),
    url("raid_bg.jpg") no-repeat center center fixed !important;
  background-size: cover !important;
}

/* ==========================================================================
   3. UTILITIES & HELPER CLASSES
   ========================================================================== */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-align {
  display: flex;
  align-items: center;
}

.text-center {
  text-align: center;
}
.text-muted {
  color: var(--text-muted);
}
.text-danger {
  color: #ff8888;
}
.text-gold {
  color: var(--text-gold);
}

.mt-2 {
  margin-top: 10px;
}
.mt-3 {
  margin-top: 15px;
}
.mt-4 {
  margin-top: 20px;
}
.mb-2 {
  margin-bottom: 10px;
}
.mb-3 {
  margin-bottom: 25px;
}
.mb-4 {
  margin-bottom: 30px;
}

.inline-form {
  display: inline-block;
  margin: 0;
}

.select-inline {
  padding: 4px 8px;
  font-size: 0.85rem;
  background: #050b14;
  color: #ffffff;
  border: 1px solid #1a3258;
  border-radius: 4px;
}

.select-fullwidth {
  width: 100%;
}

.select-flex {
  flex: 1;
}

/* ==========================================================================
   4. NAVIGATION & HEADER (INCL. HAMBURGER MENU)
   ========================================================================== */
.navbar {
  background: rgba(2, 6, 13, 0.96);
  border-bottom: 2px solid var(--border-gold);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.9),
    0 0 15px rgba(0, 85, 165, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
    width: auto;
    height: 44px;
    object-fit: contain;
    margin-right: 12px;
    filter: drop-shadow(0 0 6px rgba(245, 215, 127, 0.5));
}

.brand {
  color: var(--text-gold);
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 16px;
  min-height: var(--touch-min-size);
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: var(--alliance-blue-royal);
  border-bottom: 2px solid var(--border-gold);
}

.admin-link {
  color: var(--text-gold) !important;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.username {
  font-weight: bold;
  color: #ffffff;
}

.mobile-user-actions {
  display: none;
}

.mobile-user-section {
  display: none;
}

/* HAMBURGER BUTTON */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  width: var(--touch-min-size);
  height: var(--touch-min-size);
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.hamburger-bar {
  width: 22px;
  height: 2px;
  background-color: var(--text-gold);
  transition: all 0.3s ease;
}

.menu-toggle.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   AVATAR DROPDOWN NAVBAR STYLES
   ========================================================================== */
.user-dropdown-container {
  position: relative;
  display: flex;
  align-items: center;
}

.user-avatar-btn {
  background: transparent;
  border: 2px solid var(--border-gold);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 0 8px rgba(245, 215, 127, 0.3);
}

.user-avatar-btn:hover,
.user-avatar-btn:focus {
  border-color: var(--border-gold-bright);
  box-shadow: 0 0 12px rgba(245, 215, 127, 0.6);
  outline: none;
}

.nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: var(--alliance-blue-royal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* DROP-DOWN UNTERMENÜ */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  background: var(--panel-bg);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.9);
  padding: 8px 0;
  display: none;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.user-dropdown-menu.show {
  display: block;
  animation: dropdownSlideDown 0.2s ease-out;
}

@keyframes dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-header {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.dropdown-header strong {
  color: var(--text-gold);
  font-size: 0.95rem;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid rgba(200, 155, 60, 0.3);
  margin: 6px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    background 0.2s,
    color 0.2s;
}

.dropdown-item:hover {
  background: var(--alliance-blue-royal);
  color: var(--text-gold);
}

.dropdown-item.text-danger {
  color: #ff8888;
}

.dropdown-item.text-danger:hover {
  background: rgba(192, 57, 43, 0.3);
  color: #ffffff;
}
/* ==========================================================================
   5. HERO BANNER
   ========================================================================== */
.hero-banner {
  background:
    linear-gradient(180deg, rgba(0, 51, 102, 0.4) 0%, var(--bg-dark) 100%),
    url("logo.svg") center/contain no-repeat;
  border-bottom: 2px solid var(--border-gold);
  text-align: center;
  padding: clamp(30px, 8vw, 50px) 20px;
}

.hero-overlay h1 {
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  color: var(--text-gold);
  text-shadow:
    0 0 12px rgba(245, 215, 127, 0.6),
    2px 2px 4px #000;
  margin-bottom: 10px;
}

.hero-overlay p {
  color: #c4d7ed;
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 1px 1px 3px #000;
}

/* ==========================================================================
   6. LAYOUT CONTAINERS & GRIDS (2-COL & 3-COL)
   ========================================================================== */
.main-container {
  max-width: 1400px;
  width: 100%;
  margin: 30px auto;
  padding: 0 20px;
  flex: 1;
}

/* Standard 2-Spalten Layout */
.grid-layout {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 25px;
}

/* 3-Spalten Layout (TS3 Links, News Mitte, Sidebar Rechts) */
.grid-layout-3col {
  display: grid;
  grid-template-columns: 340px 1fr 280px;
  gap: 25px;
  align-items: start;
}

/* Dual Grid Fallback */
.info-ts3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

/* ==========================================================================
   7. PANELS & CARDS
   ========================================================================== */
.content-panel {
  /* background: var(--panel-bg); */
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: clamp(16px, 4vw, 24px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85);
}

.content-panel h2 {
  color: var(--text-gold);
  font-size: clamp(1.2rem, 4vw, 1.4rem);
  border-bottom: 1px solid rgba(200, 155, 60, 0.3);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.box-card {
  background: var(--card-bg);
  border: 1px solid #142a4a;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

/* ==========================================================================
   8. TEAMSPEAK 3 INTEGRATION
   ========================================================================== */
.ts3-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: auto;
}

.guild-info-panel {
  display: block;
  height: auto;
}

.ts3-panel h2 {
  white-space: nowrap;
  border-bottom: none;
  margin-bottom: 0;
}

.ts3-panel .flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(200, 155, 60, 0.3);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.ts3-status-online,
.ts3-status-offline {
  white-space: nowrap;
  flex-shrink: 0;
}

.ts3-status-online {
  background: rgba(39, 174, 96, 0.2);
  border: 1px solid var(--success-green);
  color: #72f29b;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ts3-status-offline {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid var(--danger-red);
  color: #ff8b8b;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #27ae60;
  border-radius: 50%;
  box-shadow: 0 0 8px #27ae60;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.ts3-info-box {
  background: var(--card-bg);
  border: 1px solid #162d50;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  margin-bottom: 15px;
}

.ts3-address {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--text-gold);
  letter-spacing: 0.5px;
}

.ts3-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ts3-viewer-box {
  background: rgba(1, 4, 10, 0.9);
  border: 1px solid #10233e;
  border-radius: 6px;
  padding: 12px;
  font-size: 0.82rem;
  color: #c4d7ed;
  min-height: 180px;
  max-height: 380px;
  overflow-y: auto;
}

.ts3-channel {
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.ts3-channel.sub {
  padding-left: 14px;
  color: #8aa3c7;
  font-weight: normal;
}

.ts3-user {
  font-size: 0.8rem;
  color: var(--text-gold);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.ts3-user.main-user {
  padding-left: 14px;
}

.ts3-user.sub-user {
  padding-left: 28px;
}

.ts3-user-icon,
.ts3-icon {
  font-size: 0.8rem;
}

.guild-stats-list {
  list-style: none;
  padding: 0;
}

.guild-stats-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.guild-stats-list li:last-child {
  border-bottom: none;
}

/* ==========================================================================
   9. AUTHENTICATION & LOGIN/REGISTER (AUTH-PAGE)
   ========================================================================== */
.auth-body {
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-card {
  background: var(--panel-bg);
  border: 2px solid var(--border-gold);
  box-shadow: 0 0 35px rgba(0, 85, 165, 0.4);
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  padding: 30px;
  margin: auto;
  text-align: center;
}

/* ==========================================================================
   LOGIN-LOGO (SEITENVERHÄLTNIS FÜR HOCHFORMAT-WAPPEN)
   ========================================================================== */
.auth-logo {
    width: auto;
    height: 420px;                    /* Doppelte Größe für maximale Präsenz */
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto 16px auto;    /* Lässt das Wappen imposant über den Rahmen hinausragen */
    filter: drop-shadow(0 0 22px rgba(245, 215, 127, 0.75));
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.02);
}

.alliance-header h1 {
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  color: var(--text-gold);
}

.alliance-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  min-height: var(--touch-min-size);
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #1c3d6e;
  color: var(--text-muted);
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-btn:hover {
    background: rgba(0, 70, 140, 0.8);
    color: #ffffff;
}

/* 
.tab-btn.active {
  background: var(--alliance-blue-royal);
  color: #ffffff;
  border-color: var(--border-gold);
}
*/

.tab-btn.active {
    background: var(--btn-alliance-bg, #0055a5);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(248, 183, 0, 0.5);
    border-bottom: 1px solid transparent;
}

.auth-form {
  display: none;
  text-align: left;
}

.auth-form.active {
  display: block;
}

/* ==========================================================================
   10. FORMS, INPUTS & TOUCH TARGETS
   ========================================================================== */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #c0d4f0;
  font-size: 0.9rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--touch-min-size);
  padding: 10px 12px;
  background: #040a14 !important;
  border: 1px solid #1c3d6e !important;
  border-radius: 6px;
  color: #ffffff !important;
  font-size: 1rem; /* Verhindert automatisches Zoomen auf iOS Safari */
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-gold-bright) !important;
  outline: none;
  box-shadow: 0 0 8px rgba(245, 215, 127, 0.4);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .col {
  flex: 1;
}

/* ==========================================================================
   11. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min-size);
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-alliance {
  background: var(--gold-gradient);
  color: #000000;
  border: 1px solid var(--border-gold-bright);
  box-shadow: 0 3px 10px rgba(200, 155, 60, 0.3);
}

.btn-alliance:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 15px rgba(245, 215, 127, 0.6);
}

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

.btn-outline:hover {
  background: var(--border-gold);
  color: #000000;
}

.btn-danger {
  background: var(--danger-red);
  color: #ffffff;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   12. ALERTS & NOTIFICATIONS
   ========================================================================== */
.alert {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.alert-danger {
  background: rgba(192, 57, 43, 0.25);
  border: 1px solid var(--danger-red);
  color: #ff8888;
}

.alert-success {
  background: rgba(39, 174, 96, 0.25);
  border: 1px solid var(--success-green);
  color: #72f29b;
}

/* ==========================================================================
   13. TABLES & RESPONSIVE CONTAINERS
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
  border-radius: 6px;
}

.alliance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.alliance-table th,
.alliance-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #162d50;
}

.alliance-table th {
  background: rgba(0, 85, 165, 0.4);
  color: var(--text-gold);
  font-weight: bold;
  border-bottom: 2px solid var(--border-gold);
}

.alliance-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   14. BADGES (USER ROLES & WOW CLASSES)
   ========================================================================== */
.user-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-admin {
  background: #8e44ad;
  color: #fff;
}
.role-redakteur {
  background: #2980b9;
  color: #fff;
}
.role-mitglied {
  background: #27ae60;
  color: #fff;
}

.class-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
}

.class-paladin {
  background: #f48cba;
  color: #000;
}
.class-krieger {
  background: #c69e6d;
  color: #000;
}
.class-magier {
  background: #3fc7eb;
  color: #000;
}
.class-priester {
  background: #ffffff;
  color: #000;
}
.class-schamane {
  background: #0070dd;
  color: #fff;
}
.class-jaeger {
  background: #aad372;
  color: #000;
}
.class-schurke {
  background: #fff468;
  color: #000;
}
.class-hexenmeister {
  background: #8788ee;
  color: #fff;
}
.class-druide {
  background: #ff7c0a;
  color: #000;
}
.class-todesritter {
  background: #c41e3a;
  color: #fff;
}
.class-moench {
  background: #00ff98;
  color: #000;
}
.class-daemonenjaeger {
  background: #a330c9;
  color: #fff;
}
.class-rufender {
  background: #33937f;
  color: #fff;
}

/* ==========================================================================
   15. NEWS, FEED & RAID WIDGETS
   ========================================================================== */
.news-card {
  background: var(--card-bg);
  border: 1px solid #1d3866;
  border-left: 4px solid var(--border-gold);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 18px;
}

.news-meta {
  font-size: 0.85rem;
  color: #7b93b5;
  margin: 5px 0 10px 0;
}

.news-body {
  line-height: 1.5;
}

.raid-widget-list .box-card {
  margin-bottom: 12px;
}

/* ==========================================================================
   NEWS POPUP MODAL (FIXED OVERLAY)
   ========================================================================== */

.news-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 13, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.news-modal-overlay.active {
    display: flex !important;
    opacity: 1;
}

.news-modal-content {
    background: var(--panel-bg);
    border: 2px solid var(--border-gold);
    border-radius: 10px;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 15px rgba(200, 155, 60, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.news-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-gold);
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s, color 0.2s;
    z-index: 10001;
}

.news-modal-close:hover {
    transform: scale(1.2);
    color: #ffffff;
}

.news-modal-header {
    padding: 22px 24px 14px 24px;
    border-bottom: 1px solid rgba(200, 155, 60, 0.3);
}

.news-modal-header h2 {
    color: var(--text-gold);
    font-size: 1.4rem;
    margin-top: 8px;
}

.news-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    color: var(--text-main);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* ==========================================================================
   16. PROFIL, AVATAR & NACHRICHTENSYSTEM
   ========================================================================== */
.avatar-container {
  margin-bottom: 15px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-gold);
  box-shadow: 0 0 15px rgba(245, 215, 127, 0.4);
}

.profile-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(0, 85, 165, 0.4);
  border: 3px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto;
}

.profile-meta-list p {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #c0d4f0;
}

.unread-row {
  background: rgba(245, 215, 127, 0.12) !important;
}

/* ==========================================================================
   17. RAID PLANER SPECIFIC STYLES & MOBILE CARDS
   ========================================================================== */
.raid-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

/* Link- & Block-Formatierung für Raid-Termine in der Sidebar */
.style-block,
.raid-list a {
  display: block;
  text-decoration: none;
  color: var(--text-main);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.raid-list a:hover {
  background: rgba(6, 20, 40, 0.95);
  color: var(--text-main);
}

.active-raid-card {
  background: rgba(10, 30, 55, 0.95);
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.counter-card {
  background: rgba(10, 20, 35, 0.85);
  border: 1px solid rgba(200, 155, 60, 0.3);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.counter-card.tank {
  border-left: 4px solid #5dade2;
}
.counter-card.healer {
  border-left: 4px solid #58d68d;
}
.counter-card.dps {
  border-left: 4px solid #ec7063;
}
.counter-card.bench {
  border-left: 4px solid #f5b041;
}

.counter-val {
  font-size: 1.6rem;
  font-weight: bold;
  color: #f3c65e;
  margin-top: 4px;
}

.export-box {
  background: #08121e;
  border: 1px solid #c89b3c;
  color: #d1d5db;
  font-family: monospace;
  padding: 12px;
  border-radius: 6px;
  width: 100%;
  height: 140px;
  resize: vertical;
  white-space: pre-wrap;
}

/* Status Badges */
.status-badge-zugesagt,
.status-badge-angemeldet,
.status-badge-bestätigt,
.status-badge-bestaetigt {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid #2ecc71;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.status-badge-ersatz {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
  border: 1px solid #f1c40f;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.status-badge-abgemeldet {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid #e74c3c;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.modal-bg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: #0a192f;
  border: 2px solid #c89b3c;
  padding: 20px;
  border-radius: 8px;
  max-width: 550px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
}

.raid-form-hidden {
  display: none;
}

.raid-description-box {
  background: rgba(10, 20, 35, 0.6);
}

.raid-signup-box {
  border-top: 3px solid var(--border-gold, #c89b3c);
}

.ilvl-badge-sm {
  font-size: 0.75rem;
}

.member-status-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.member-status-select {
  font-size: 0.75rem;
  padding: 2px 4px;
}

/* Mobile Roster Cards View */
.mobile-roster-cards {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.roster-card {
  background: rgba(3, 8, 16, 0.85);
  border: 1px solid #142a4a;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roster-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.roster-card-username {
  font-size: 0.8rem;
}

.roster-card-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.roster-card-note {
  font-size: 0.8rem;
  font-style: italic;
  color: #c0d4f0;
}

.roster-card-admin {
  border-top: 1px solid rgba(200, 155, 60, 0.2);
  padding-top: 6px;
  margin-top: 4px;
}

.roster-card-admin-form {
  display: flex;
  gap: 6px;
}

.export-tab-hidden {
  display: none;
}

.raid-header-btns {
  gap: 10px;
}

/* ==========================================================================
   18. FOOTER TYPOGRAPHIE & ALLIANZ-STYLING
   ========================================================================== */
.footer {
    background: #010308;
    border-top: 1px solid var(--border-gold);
    text-align: center;
    padding: 18px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    font-family: 'Metamorphous', serif;
}

.footer p {
    font-family: 'Metamorphous', serif;
    line-height: 1.5;
}

/* Allianz-Motto im Footer */
.footer-subtext {
    font-family: 'Cinzel', serif !important;
    font-weight: 700;
    color: var(--text-gold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: 6px;
    text-shadow: 0 0 8px rgba(245, 215, 127, 0.4);
}

/* ==========================================================================
   19. RESPONSIVE BREAKPOINTS (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1280px) {
  .grid-layout-3col {
    grid-template-columns: 320px 1fr;
  }
  .sidebar-right {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
}

@media (max-width: 900px) {
  .raid-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 850px) {
  .grid-layout,
  .grid-layout-3col {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .sidebar-right {
    grid-column: span 1;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .info-ts3-grid {
    grid-template-columns: 1fr;
  }

  .desktop-only {
    display: none !important;
  }

  .menu-toggle {
    display: flex;
  }

  /* MOBILES DROP-DOWN MENÜ */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(2, 6, 13, 0.98);
    border-bottom: 2px solid var(--border-gold);
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(200, 155, 60, 0.3);
  }

  .mobile-user-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(200, 155, 60, 0.3);
  }
}

@media (max-width: 768px) {
  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .counter-card-bench {
    grid-column: span 2;
  }
  .desktop-roster-table {
    display: none;
  }
  .mobile-roster-cards {
    display: flex;
  }
  .raid-header-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {

  .auth-logo {
        height: 280px;
    }
    
  .main-container {
    padding: 0 10px;
    margin: 15px auto;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .tab-buttons {
    flex-direction: column;
  }

  .flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ==========================================================================
   20. ROSTER AVATARE & BATTLE.NET STYLES
   ========================================================================== */
.roster-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-gold);
  box-shadow: 0 0 8px rgba(245, 215, 127, 0.4);
}

.roster-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 85, 165, 0.4);
  border: 2px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.user-link {
  color: var(--text-gold);
  text-decoration: none;
}

.user-link:hover {
  text-decoration: underline;
}

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

.level-badge {
  background: rgba(0, 51, 102, 0.8);
  border: 1px solid #1c3d6e;
  color: #ffffff;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.85rem;
}

/* ==========================================================================
   21. ITEM LEVEL COLOR BADGES
   ========================================================================== */
.ilvl-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.85rem;
  display: inline-block;
}

.ilvl-epic {
  background: rgba(163, 53, 238, 0.25);
  border: 1px solid #a335ee;
  color: #d382ff;
  box-shadow: 0 0 8px rgba(163, 53, 238, 0.4);
}

.ilvl-rare {
  background: rgba(0, 112, 221, 0.25);
  border: 1px solid #0070dd;
  color: #69b4ff;
}

.ilvl-uncommon {
  background: rgba(30, 255, 0, 0.2);
  border: 1px solid #1eff00;
  color: #8eff7b;
}

.ilvl-common {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #cccccc;
  color: #ffffff;
}

.sync-time {
  font-size: 0.78rem;
  color: var(--success-green);
  font-weight: 600;
}

/* ==========================================================================
   REALM STATS GRID & STATUS FARBEN
   ========================================================================== */
.realm-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.stat-box {
    background: var(--card-bg);
    border: 1px solid #142a4a;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 64px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

.stat-val {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

/* Farbstufen basierend auf Realm-Status */
.status-green {
    color: #72f29b !important;
}

.status-yellow {
    color: #f5d77f !important;
}

.status-red {
    color: #ff8888 !important;
}

/* Blizzard Server-Typ Icon */
.realm-type-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
}

/* ==========================================================================
   Trennlinien (Markdown hr parser fix)
   ========================================================================== */
.news-hr {
  border: none;
  height: 2px;
  background: var(--border-gold);
  margin: 20px 0;
  box-shadow: 0 0 8px rgba(200, 155, 60, 0.4);
}

/* ==========================================================================
   EINICKUNG FÜR ALLE AUFZÄHLUNGEN (LISTEN)
   ========================================================================== */
ul, ol {
    margin-left: 24px; /* Bestimmt den Abstand nach rechts / den Einzug */
    padding-left: 10px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ==========================================================================
   ROSTER-SEITE HINTERGRUND (ROSTER.PHP)
   ========================================================================== */
body.page-roster {
    background: 
        radial-gradient(circle at 50% 25%, rgba(2, 6, 13, 0.65) 0%, rgba(2, 6, 13, 0.92) 100%),
        url('roster_bg.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    min-height: 100vh;
}

/* ==========================================================================
   KRIEGSKABINETT / INDEX-SEITE HINTERGRUND (INDEX.PHP)
   ========================================================================== */
body.page-index {
    background: 
        radial-gradient(circle at 50% 30%, rgba(2, 6, 13, 0.55) 0%, rgba(2, 6, 13, 0.88) 100%),
        url('index_bg.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    min-height: 100vh;
}

/* ==========================================================================
   GILDEN-POSTFACH / FELDPOST HINTERGRUND (MESSAGES.PHP)
   ========================================================================== */
body.page-messages {
    background: 
        radial-gradient(circle at 50% 30%, rgba(2, 6, 13, 0.55) 0%, rgba(2, 6, 13, 0.9) 100%),
        url('messages_bg.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    min-height: 100vh;
}
/* ==========================================================================
   KONTOEINSTELLUNGEN & RÜSTKAMMER HINTERGRUND (ACCOUNTSETTINGS.PHP)
   ========================================================================== */
body.page-accountsettings {
    background: 
        radial-gradient(circle at 50% 30%, rgba(2, 6, 13, 0.6) 0%, rgba(2, 6, 13, 0.92) 100%),
        url('accountsettings_bg.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    min-height: 100vh;
}

/* ==========================================================================
   ZENTRIERUNG DER ROSTER-TABELLE (ROSTER.PHP)
   ========================================================================== */
.alliance-table th,
.alliance-table td {
    text-align: center;
    vertical-align: middle;
}

/* Zentrierung für Flexbox-Elemente wie den Avatar-Platzhalter */
.roster-avatar-placeholder {
    margin: 0 auto;
}