:root{
  --bg:#0b1020;
  --card:#121933;
  --line:#263152;
  --text:#e8ecff;
  --muted:#9fb0ff;
  --accent:#3a63ff;
  --radius:16px;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  min-height:100vh; /* Viewport height statt 100% */
  background:var(--bg);
  color:var(--text);
  font:16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%; /* Verhindert Text-Vergrößerung auf iOS */
  -webkit-tap-highlight-color: transparent; /* Entfernt Tap-Highlight auf iOS */
  overflow-x: hidden; /* Kein horizontales Scrollen */
}

/* Sticky Footer Layout */
body {
  display: flex;
  flex-direction: column;
}

.wrap{
  max-width:1320px;              /* contentMaxWidth */
  margin-inline:auto;
  padding:12px 16px;             /* schmaler Gutter */
  flex: 1;
}

/* Hero-Bereich nur für Logo */
.hero-section {
  background: linear-gradient(135deg, var(--card) 0%, #1a2342 100%);
  border-bottom: 1px solid var(--line);
  padding: 40px 20px;
  margin-bottom: 0;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Arial', sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.logo-text {
  font-size: 2.5rem;
  color: #ffd54d; /* Gleiche Farbe wie aktive Favoriten-Sterne */
  text-transform: uppercase;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255,213,77,.5), 0 2px 4px rgba(0,0,0,0.3); /* Gleicher Glow-Effekt */
}

/* Breite im eingeklappten Zustand NICHT verändern */
.acc-section,
.acc-table,
.acc-table-header,
.table-scroll{
  width:100%;
}


/* Mobile-first responsive padding */
@media (min-width: 480px) {
  .wrap { padding: 20px; }
}
@media (min-width: 768px) {
  .wrap { padding: 24px; }
}

.topbar{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px;
  flex-wrap: wrap; /* Erlaubt Umbruch auf kleinen Bildschirmen */
  padding: 8px 0; /* Etwas mehr Platz oben und unten */
}

/* Titelbereich links ausrichten */
.top-title{
  display:flex;
  align-items:center;
  gap:15px;
  margin: 0; /* links ausgerichtet */
}

/* Mobile Topbar Anpassungen */
@media (max-width: 767px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .topbar > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
  }
  .topbar .actions {
    display: flex;
    justify-content: center;
  }
}

h1{
  font-size:2rem; 
  margin:0; 
  letter-spacing:.3px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Mobile H1 Anpassungen */
@media (max-width: 767px) {
  h1 {
    font-size: 1.6rem;
    letter-spacing: .2px;
  }
}


/* Größere Desktops: Titel noch prominenter */
@media (min-width: 1200px) {
  h1 { font-size: 2.3rem; }
}

.btn{
  background:var(--accent);
  color:white;
  border:none;
  padding:12px 16px; /* Größere Touch-Targets */
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
  box-shadow:0 6px 16px rgba(58,99,255,.35);
  font-size: 16px; /* Verhindert Zoom auf iOS */
  min-height: 44px; /* Mindestgröße für Touch-Targets */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
}
.btn:active{transform:translateY(1px)}
.btn:focus{outline: 2px solid rgba(58,99,255,0.5); outline-offset: 2px;}

/* Mobile Button Anpassungen */
@media (max-width: 767px) {
  .btn {
    padding: 14px 18px;
    font-size: 16px;
    min-height: 48px;
    width: 100%;
    max-width: 300px;
  }
}

/* Acc x8 */
.acc-section{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:16px;
}
.acc-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.acc-header h2{
  font-size:1.05rem;
  margin:0;
}
.acc-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.acc-hint{color:var(--muted); font-size:.9rem}
.acc-counter{
  color:var(--accent);
  font-size:.9rem;
  font-weight:600;
  margin-left:8px;
}

.accounts{
  display:grid;
  grid-template-columns:1fr; /* Karten nutzen volle Breite */
  gap:12px;
}

.account-card{
  background:#0f1630;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.account-header{
  display:flex;
  gap:8px;
  align-items:center;
}
.account-name{
  flex:1;
  background:#0c1328;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
}
.btn-danger{
  background:#d53b3b;
  box-shadow:0 6px 16px rgba(213,59,59,.25);
}
.btn-secondary{
  background:#2b3f92;
  box-shadow:0 6px 16px rgba(43,63,146,.25);
}

.char-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.char-row{
  display:grid;
  /* Flexiblere Spalten: Name bekommt viel Platz, die Dropdowns bleiben kompakt */
  grid-template-columns:minmax(200px,1fr) minmax(120px,160px) minmax(140px,180px) minmax(140px,180px) 36px; /* Name | Gilde | Klasse | Spezialisierung | X */
  gap:8px;
  align-items:center;
}

/* Mobile Char-Row Layout */
@media (max-width: 767px) {
  .char-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 22, 48, 0.5);
    border-radius: 8px;
    margin-bottom: 8px;
  }
  
  .char-row > * {
    width: 100%;
    min-width: unset;
  }
  
  .char-row .icon-btn {
    width: 44px;
    height: 44px;
    margin: 0 auto;
  }
}
.char-name,
.char-type,
.char-subtype,
.char-guild{
  background:#0c1328;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:10px;
  padding:12px; /* Größere Touch-Targets */
  font-size: 16px; /* Verhindert Zoom auf iOS */
  min-height: 44px; /* Mindestgröße für Touch-Targets */
  /* Wichtig für CSS Grid: Elemente dürfen schrumpfen, ohne zu überlaufen */
  min-width:0;
}

.char-name{
  width:100%;
}
.char-type{
  min-width:120px;
  width:100%;
}
.char-subtype{
  min-width:140px;
  width:100%;
}
.char-guild{
  min-width:120px;
  width:100%;
}

/* Mobile Input Anpassungen */
@media (max-width: 767px) {
  .char-name,
  .char-type,
  .char-subtype,
  .char-guild {
    padding: 14px;
    font-size: 16px;
    min-height: 48px;
    width: 100%;
    min-width: unset;
  }
}
.icon-btn{
  background:#23315e;
  color:#fff;
  border:none;
  width:44px; /* Größere Touch-Targets */
  height:44px;
  border-radius:10px;
  cursor:pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}
.icon-btn:hover {
  background: #2a3a6e;
}
.icon-btn:active {
  background: #1e2a4a;
}
.account-footer{display:flex; justify-content:flex-end}

/* Einklappbare Account-Karte */
.account-card.collapsed .char-list,
.account-card.collapsed .account-footer{ display:none }

.table-scroll{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow-x:auto; /* Horizontales Scrollen für mobile Geräte */
  overflow-y:auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling auf iOS */
}

/* Mobile Table Anpassungen */
@media (max-width: 767px) {
  .table-scroll {
    border-radius: 12px;
    margin: 0 -4px; /* Nutzt mehr Bildschirmbreite */
    max-height: none; /* Keine Höhenbegrenzung mehr nötig */
    overflow-y: auto;
    margin-bottom: 20px; /* Extra Abstand zum Footer */
  }
  
  .grid {
    min-width: 600px; /* Größere Mindestbreite für bessere Lesbarkeit */
    table-layout: fixed; /* Feste Spaltenbreite für bessere Kontrolle */
  }
  
  .grid th,
  .grid td {
    padding: 10px 8px;
    font-size: 14px;
  }
  
  .grid .col-name {
    min-width: 140px;
    max-width: 140px;
    font-weight: 600;
    font-size: 15px;
  }
  
  /* Mobile: Bessere Header-Darstellung */
  .grid thead th {
    height: 60px; /* Angepasst für senkrechte Labels */
    font-size: 13px;
    padding: 8px 6px;
  }
  
  .grid tbody tr td {
    padding: 8px 6px;
    font-size: 14px;
  }
  
  /* Checkboxen größer für Touch */
  .grid tbody tr td input[type="checkbox"] {
    width: 22px;
    height: 22px;
    transform: scale(1.2);
  }
  
  /* Mini-Header auf mobilen Geräten ausblenden */
  .mini-header-row {
    display: none;
  }
  
  /* Mobile senkrechte Labels */
  .rot {
    transform: rotate(-90deg); /* Nur auf Mobile: senkrecht */
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    width: 18px;
    height: 50px;
    line-height: 18px;
    margin: 0 auto;
  }
  
  /* Char-Namen besser lesbar */
  .char-name-inline {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
  }
  
  /* Char-Badges besser sichtbar */
  .char-badge {
    font-size: 0.9rem;
    padding: 3px 8px;
    margin-right: 8px;
  }
}

/* Abstand und einklappbare Account-Tabellen */
.acc-table{margin-top:16px}
.acc-table + .acc-table{margin-top:20px}
.acc-table-header{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 0 8px;
  color:var(--muted);
}
.acc-collapse-btn{
  width:28px; height:28px;
  border-radius:6px; border:1px solid var(--line);
  background:#172045; color:#fff; cursor:pointer;
}
.acc-table.collapsed .table-scroll{display:none}
.acc-table-title{font-weight:700}

.grid{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:0; /* keine Mindestbreite, damit nichts herausragt */
  table-layout:fixed; /* Spalten teilen sich den Platz */
}

.grid th,
.grid td{
  border-bottom:1px solid var(--line);
  padding:10px 12px;
  text-align:center;
}

.grid thead th{
  position:sticky;
  top:0;
  background:linear-gradient(#18224a,#151d3f);
  z-index:1;
  font-weight:700;
  height:56px; /* Normale Höhe für Desktop */
  overflow:hidden;
  width:auto; /* Breite automatisch */
  word-break:break-word;
}
/* Cor und Bio schmaler halten */
.grid thead th:nth-child(2),
.grid thead th:nth-child(3){
  width:56px;
}
/* Spende ebenfalls schmaler */
.grid thead th:nth-child(4){
  width:64px;
}

.grid .col-name{
  text-align:left;
  min-width:320px;               /* Name + Nummer passt */
}


/* Diagonale Spaltenüberschriften */
.rot{
  transform:none; /* Desktop: normal horizontal */
  display:block;
  white-space:nowrap;
  font-size:0.9rem;
  position:static;
  color:var(--text);
  overflow:visible;
  text-overflow:unset;
  text-align:center;
  font-weight:600;
}
.rot.mini{ font-size:0.85rem }
.mini-header-row td{ border-bottom:none; padding:6px 12px 6px }

.grid tbody tr:last-child td{
  border-bottom:none;
}

/* Vertikale Trennlinien zwischen Checkbox-Spalten (alles außer Namensspalte) */
.grid thead th + th{ border-left:1px solid var(--line); }
.grid tbody td + td{ border-left:1px solid var(--line); }

input[type="checkbox"]{
  width:24px; /* Größere Checkboxen für Touch */
  height:24px;
  cursor:pointer;
  accent-color: var(--accent); /* Moderne Browser */
}

/* Mobile Checkbox Anpassungen */
@media (max-width: 767px) {
  input[type="checkbox"] {
    width: 28px;
    height: 28px;
    transform: scale(1.2); /* Größere Checkboxen auf mobilen Geräten */
  }
}

td[contenteditable="true"]{
  outline:none;
}
td[contenteditable="true"]:empty:before{
  content:attr(data-placeholder);
  color:var(--muted);
}

/* Inline editierbarer Name in der Tabelle */
.char-name-inline[contenteditable="true"]{
  outline:none;
}

.hint{
  color:var(--muted);
  font-size:.9rem;
  margin:.8rem 0 0;
}

/* Tabelle: optische Unterscheidung Account/Char */
.is-account{font-weight:700}
.is-char{padding-left:24px; color:#cdd6ff}

/* Badge vor Char-Namen in Tabelle */
.char-badge{
  display:inline-block;
  background:#2b3f92;
  color:#fff;
  border-radius:6px;
  padding:2px 6px;
  font-size:.8rem;
  margin-right:6px;
}
.char-badge.sub{
  background:#5a2b92; /* andere Farbe für Spezialisierung */
}

/* Kopf: "Account" über dem Namen */
.col-name::before{
  content:"Account";
  display:block;
  color:var(--muted);
  font-size:.85rem;
  margin-bottom:6px;
}

/* Responsive Hero-Bereich */
@media (max-width: 767px) {
  .hero-section {
    padding: 30px 16px;
  }
  
  .logo-text {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .logo-text {
    font-size: 2.2rem;
  }
}

@media (min-width: 1024px) {
  .logo-text {
    font-size: 3rem;
  }
}

/* Mobile-spezifische Verbesserungen */
@media (max-width: 767px) {
  /* Größere Touch-Targets für alle interaktiven Elemente */
  .acc-collapse-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  /* Logo Banner mobile Anpassung */
  .logo-banner-img {
    max-width: 90%; /* Banner-Breite auf mobilen Geräten */
    max-height: 60px; /* Größere Höhe für bessere Sichtbarkeit */
  }
  
  /* Account-Header mobile Anpassung */
  .account-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .account-name {
    order: 2;
    flex: 1 1 100%;
  }
  
  /* Account-Actions mobile Anpassung */
  .acc-actions {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .acc-hint {
    text-align: center;
    font-size: 0.85rem;
  }
  
  .acc-counter {
    text-align: center;
    margin-left: 0;
    margin-top: 4px;
  }
  
  /* Account-Footer mobile Anpassung */
  .account-footer {
    justify-content: center;
  }
  
  /* Hint-Text mobile Anpassung */
  .hint {
    text-align: center;
    padding: 0 16px;
  }
}

/* Sehr kleine Bildschirme (unter 360px) */
@media (max-width: 359px) {
  .wrap {
    padding: 12px;
  }
  
  .logo-banner-img {
    max-width: 85%; /* Banner-Breite für sehr kleine Bildschirme */
    max-height: 30px; /* Sehr kleine Höhe für sehr kleine Bildschirme */
  }
  
  h1 {
    font-size: 1.2rem;
  }
  
  .btn {
    padding: 12px 14px;
    font-size: 15px;
  }
}

/* Footer Styles */
#footer-container {
  margin-top: auto; /* Drückt Footer an den Boden */
}

footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-radius: var(--radius) var(--radius) 0 0; /* Abgerundete obere Ecken */
  margin-top: 20px; /* Abstand zum Hauptinhalt */
}

/* --- Neues wiederverwendbares ChecklistLayout --- */
.checklist-layout{
  display:grid;
  grid-template-columns: minmax(var(--left-min,460px), var(--left-max,540px)) 1fr;
  gap: var(--gutter,16px);
  align-items:start;
}
.checklist-layout{ --left-min:460px; --left-max:540px; --gutter:16px; }
@media (max-width: 1439px){ .checklist-layout{ --left-min:480px; --left-max:520px; } }
@media (max-width: 1279px){ .checklist-layout{ --left-min:420px; --left-max:460px; } }
@media (max-width: 1023px){ .checklist-layout{ grid-template-columns: 1fr; } }

/* Sidebar: Char-Liste */
.side-panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px;
  /* Sidebar wächst mit Inhalt; kein eigenes Scrollen */
  position:static;
  top:auto;
  align-self:start;
  max-height:none;
  overflow:visible;
}
.side-panel-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.side-panel h3{
  margin:0;
  font-size:1rem;
  color:var(--text);
}
.hover-tip{
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  white-space: nowrap;
  opacity: 0.8;
}
#charList{
  margin:0; padding:0;
  color:var(--muted);
}

/* Tabelle in der Sidebar für Char-Liste */
.char-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout: auto; /* Inhalte dürfen umbrechen */
}
.char-table thead th{
  position:sticky;
  top:0;
  background:#151d3f;
  z-index:1;
  text-align:left;
  color:var(--text);
  font-weight:700;
  font-size:.8rem;
  padding:2px 4px; /* sehr kompakt */
}
.char-table thead th:first-child{ padding-left:0; }
.char-table thead th:nth-child(2){ padding-left:0; padding-right:2px; text-align:left; }
.char-table thead th:nth-child(3){ padding-left:0; }
.char-table tbody td{
  padding:4px 6px; /* kompakt aber lesbar */
  border-bottom:1px solid var(--line);
  color:var(--text);
  white-space: normal; /* kein ellipsis in linker Liste */
  overflow: visible;
}
.char-table thead th:nth-child(3),
.char-table tbody td:nth-child(3){
  /* Trennlinie zwischen Nummer und Name */
  border-left:1px solid var(--line);
}
.char-table td:nth-child(1){
  width:24px; /* etwas schmaler */
  padding-left:0;
  padding-right:8px; /* mehr Abstand zur Nummer */
}
.char-table td:nth-child(2){
  width:20px; /* sehr kompakt */
  color:var(--muted);
  text-align:left; /* bündig direkt nach dem Stern */
  padding-left:0;  /* kein Abstand zum Stern */
  padding-right:2px; /* minimaler Abstand zum Namen */
}
.char-table td:nth-child(3){
  font-weight:600;
  padding-left:8px; /* leicht eingerückt für bessere Lesbarkeit */
}
.char-table .v-sep{
  width:12px;
  border-left:1px solid var(--line);
  padding:0;
}
.td-guild{
  color:var(--muted);
  white-space:normal;
  word-break:break-word;
  overflow:visible;
}
.char-table thead th:nth-child(6),
.char-table tbody td:nth-child(6){
  /* Trennlinie zwischen Gilde und Level */
  border-left:1px solid var(--line);
}
.td-name{ 
  max-width: 220px; 
  position: relative;
  cursor: help;
}
.td-name[data-account-name]:hover::after {
  content: attr(data-account-name);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  margin-bottom: 4px;
  pointer-events: none;
}
.td-name[data-account-name]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--line);
  z-index: 1001;
  margin-bottom: -1px;
  pointer-events: none;
}
.char-table td:nth-child(6){ width: 110px; }
.level-select{
  background:#0c1328;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:8px;
  padding:6px 8px;
  font-size:14px;
  width: 100%;
  max-width: 100%;
}

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

/* Mobile Anpassungen für Tipp-Hinweis */
@media (max-width: 767px) {
  .side-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .hover-tip {
    font-size: 0.8rem;
    margin-top: 2px;
  }
}

/* Fav-Stern */
.fav-btn{
  width:26px; height:26px; /* kompakter Stern */
  border-radius:8px;
  border:1px solid var(--line);
  background:#1b2550;
  color:#b3bcd7;
  cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:16px;
}
.char-table .fav-btn{ width:26px; height:26px; font-size:16px; padding:0; background:#1b2550; border:1px solid var(--line); border-radius:8px; }
.char-table .fav-btn.active{ color:#ffd54d; border-color:#ffd54d; text-shadow:0 0 8px rgba(255,213,77,.5); }
.td-name{ max-width: 220px; }
.fav-btn.active{
  color:#ffd54d;                 /* golden */
  border-color:#ffd54d;
  text-shadow:0 0 8px rgba(255,213,77,.5);
}
/* Einklappen per Klasse – Breite bleibt stabil */
.acc-section.collapsed #accountsContainer{ display:none; }
/* Hauptspalte: stapelt Accounts-Sektion und Tabellen untereinander */
.main-col{
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0; /* verhindert ungewolltes Überlaufen in Grids */
}

/* Safety: Container im Hauptbereich immer volle Breite */
.main-col .acc-section,
.main-col #tablesContainer,
.main-col .table-scroll{
  width: 100%;
}

/* Modal: seitliches Panel */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: stretch;
  justify-content: flex-end;
  z-index: 1000;
}
.modal.open{ display: flex; }
.modal-panel{
  width: 360px;
  max-width: 90vw;
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 24px rgba(0,0,0,0.4);
  padding: 16px;
}
.modal-panel h3{ margin: 0 0 12px 0; font-size: 1.1rem; }
.modal-body{ display: flex; flex-direction: column; gap: 12px; }
.modal-input{
  background:#0c1328;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:10px;
  padding:12px;
  font-size:16px;
}
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top: 14px; }
.modal-sep{ border: none; border-top: 1px solid var(--line); margin: 4px 0 0 0; }
.guild-subtitle{ margin: 0; font-size: .95rem; color: var(--muted); }
.guild-list{ list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.guild-item{ display: flex; align-items: center; gap: 8px; }
.guild-input{
  flex:1;
  background:#0c1328;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:8px;
  padding:8px 10px;
  font-size:14px;
}
.guild-del{ min-width:44px; height:36px; border-radius:8px; border:1px solid var(--line); background:#c90505; color:#fff; cursor:pointer; }

/* Sprachauswahl Dropdown */
.language-selector {
  position: relative;
  display: inline-block;
}

.language-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  min-width: 140px;
  justify-content: space-between;
  min-height: 44px; /* Gleiche Mindesthöhe wie andere Buttons */
  height: auto; /* Höhe passt sich an */
}

.language-dropdown-btn .dropdown-arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.language-dropdown-btn.open .dropdown-arrow {
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 1000;
  min-width: 160px;
  overflow: hidden;
  margin-top: 4px;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.language-option:hover {
  background: var(--line);
}

.language-option .flag {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.language-option:first-child {
  border-radius: 12px 12px 0 0;
}

.language-option:last-child {
  border-radius: 0 0 12px 12px;
}

/* Mobile Sprachauswahl */
@media (max-width: 767px) {
  .language-selector {
    width: 100%;
    max-width: 300px;
  }
  
  .language-menu {
    right: 0;
    left: 0;
    min-width: unset;
  }
  
  .language-dropdown-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Automatische Spenden Modal */
.donation-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.donation-modal.open {
  display: flex;
}

.donation-modal-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0 20px;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text);
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: var(--line);
  color: var(--text);
}

.donation-modal .modal-body {
  padding: 0 20px 20px 20px;
}

.donation-modal .modal-body p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text);
  text-align: center;
  padding: 20px 0;
}

.donation-modal .modal-body p strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.2rem;
  display: block;
  margin: 8px 0;
}

.donation-modal .modal-actions {
  padding: 0 20px 20px 20px;
  display: flex;
  justify-content: center;
}

.donation-modal .modal-actions .btn {
  min-width: 120px;
  font-size: 1rem;
  padding: 14px 24px;
}

/* Mobile Anpassungen für Donation Modal */
@media (max-width: 767px) {
  .donation-modal {
    padding: 16px;
  }
  
  .donation-modal-panel {
    max-width: none;
    width: 100%;
  }
  
  .modal-header {
    padding: 16px 16px 0 16px;
  }
  
  .modal-header h3 {
    font-size: 1.2rem;
  }
  
  .donation-modal .modal-body {
    padding: 0 16px 16px 16px;
  }
  
  .donation-modal .modal-body p {
    font-size: 1rem;
    padding: 16px 0;
  }
  
  .donation-modal .modal-actions {
    padding: 0 16px 16px 16px;
  }
  
  .donation-modal .modal-actions .btn {
    width: 100%;
    max-width: 200px;
  }
}

/* Gilde-Auswahl spezifische Styles */
.guild-selection-container {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

.guild-selection-dropdown {
  background: #0c1328;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 16px;
  min-width: 200px;
  width: 100%;
  max-width: 300px;
  cursor: pointer;
}

.guild-selection-dropdown:focus {
  outline: 2px solid rgba(58, 99, 255, 0.5);
  outline-offset: 2px;
}

.guild-selection-dropdown option {
  background: #0c1328;
  color: var(--text);
  padding: 8px;
}

.level-info {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin: 16px 0 0 0;
  font-style: italic;
}

.donation-modal .modal-actions .btn:disabled {
  background: #2b3f92;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.donation-modal .modal-actions .btn:disabled:hover {
  transform: none;
  box-shadow: 0 6px 16px rgba(43, 63, 146, 0.25);
}

/* Mobile Anpassungen für Gilde-Auswahl */
@media (max-width: 767px) {
  .guild-selection-container {
    margin: 16px 0;
  }
  
  .guild-selection-dropdown {
    padding: 14px 16px;
    font-size: 16px;
    min-width: unset;
    width: 100%;
  }
  
  .level-info {
    font-size: 0.85rem;
    margin: 12px 0 0 0;
  }
}