/* RLGD Frontend Release - Main CSS */

/* ----------------------------------------
   Variables & Base Styles
   ---------------------------------------- */
:root {
  --green-dark: #153b2c;
  --green-mid: #2d6b3f;
  --green-light: #3f8f53;
  --green-soft: #e5f3ea;
  --bg-main: #f6f7f5;
  --text-main: #111;
  --text-secondary: #555;
  --border-soft: #d3ddd5;
  --header-height: 60px;
  --nav-height: 50px;
  --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.15);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Ubuntu", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  color: var(--green-mid);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ----------------------------------------
   Typography
   ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--green-dark);
}

h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--green-mid);
  border-bottom: 2px solid var(--green-light);
  padding-bottom: 5px;
}

h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--green-dark);
}

p {
  margin-bottom: 16px;
}

ul, ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

blockquote {
  border-left: 4px solid var(--green-light);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-style: italic;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 24px 0;
}

/* ----------------------------------------
   Layout Components
   ---------------------------------------- */

/* Header */
header {
  background: var(--green-dark);
  color: white;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 22px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  background: white;
  color: var(--green-dark);
}

.header-right button:hover {
  background: var(--green-soft);
}

/* Navigation */
nav {
  background: var(--green-mid);
  color: white;
  height: var(--nav-height);
  position: relative;
  
  z-index: 100;
  box-shadow: var(--shadow-soft);
}

.nav-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  height: 100%;
}

.nav-dropdown {
  position: relative;
  height: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  box-shadow: var(--shadow-soft);
  z-index: 10;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  color: var(--text-main);
  text-decoration: none;
  transition: background 0.2s;
}

.nav-dropdown-item:hover {
  background: var(--green-soft);
  text-decoration: none;
}

/* Main Content */
main {
  min-height: calc(100vh - var(--header-height) - var(--nav-height) - 100px);
  padding: 20px 0;
}

/* KI Overlay */
.ki-overlay {
  position: fixed;
  top: 50%;
  left: 40px;
  transform: translateY(-50%);
  width: 380px;
  max-height: 70vh;
  display: flex;
  flex-direction: row;
  background: #050505;
  color: white !important;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  overflow: hidden;
}
.ki-overlay-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* KI-Auswahl Sidebar */
.ki-select-bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 4px;
  background: rgba(0, 0, 0, 0.4);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
}
.ki-select-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  letter-spacing: 0.5px;
}

/* Inaktiv: KI-Farbe als Textfarbe + dezenter Border */
.ki-sel-orgi { color: #dab040; border-color: rgba(218,176,64,0.3); }
.ki-sel-sam { color: #66bb6a; border-color: rgba(102,187,106,0.3); }
.ki-sel-phil { color: #c48bb0; border-color: rgba(196,139,176,0.3); }
.ki-sel-otto { color: #c46050; border-color: rgba(196,96,80,0.3); }
.ki-sel-valora { color: #e0c040; border-color: rgba(224,192,64,0.3); }
.ki-sel-anna { color: #80c8e8; border-color: rgba(128,200,232,0.3); }
.ki-sel-kassandra { color: #8899aa; border-color: rgba(136,153,170,0.3); }
.ki-sel-mrpublic { color: #5080b0; border-color: rgba(80,128,176,0.3); }

/* Hover: heller + Border staerker */
.ki-select-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}
.ki-sel-orgi:hover { color: #f0c850; border-color: rgba(218,176,64,0.6); }
.ki-sel-sam:hover { color: #88dd8a; border-color: rgba(102,187,106,0.6); }
.ki-sel-phil:hover { color: #d8a0c8; border-color: rgba(196,139,176,0.6); }
.ki-sel-otto:hover { color: #e07060; border-color: rgba(196,96,80,0.6); }
.ki-sel-valora:hover { color: #f0d060; border-color: rgba(224,192,64,0.6); }
.ki-sel-anna:hover { color: #a0e0ff; border-color: rgba(128,200,232,0.6); }
.ki-sel-kassandra:hover { color: #a0b0c0; border-color: rgba(136,153,170,0.6); }
.ki-sel-mrpublic:hover { color: #6090c0; border-color: rgba(80,128,176,0.6); }

/* Aktiv: volle Farbe als Hintergrund */
.ki-sel-orgi.ki-select-active { background: #dab040; color: #000; border-color: #dab040; }
.ki-sel-sam.ki-select-active { background: #66bb6a; color: #000; border-color: #66bb6a; }
.ki-sel-phil.ki-select-active { background: #c48bb0; color: #000; border-color: #c48bb0; }
.ki-sel-otto.ki-select-active { background: #c46050; color: #000; border-color: #c46050; }
.ki-sel-valora.ki-select-active { background: #e0c040; color: #000; border-color: #e0c040; }
.ki-sel-anna.ki-select-active { background: #80c8e8; color: #000; border-color: #80c8e8; }
.ki-sel-kassandra.ki-select-active { background: #8899aa; color: #000; border-color: #8899aa; }
.ki-sel-mrpublic.ki-select-active { background: #5080b0; color: #fff; border-color: #5080b0; }


/* Redirect-Uebergabe-Nachricht */
.ki-msg-redirect {
  align-self: flex-start;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  font-size: 0.8rem;
  padding: 4px 12px;
  max-width: 85%;
}
.ki-overlay-header {
  padding: 10px 15px;
  background: #000;
  color: white !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ki-overlay-header button {
  background: transparent;
  color: white !important;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
}

.ki-overlay-body {
  padding: 15px;
  overflow-y: auto;
  flex-grow: 1;
  color: white !important;
}

.ki-overlay p, 
.ki-overlay span, 
.ki-overlay a {
  color: white !important;
}

/* Environment Badge */
.env-switcher {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  display: flex;
  gap: 4px;
}
.env-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 4px;
  text-decoration: none;
  color: rgba(255,255,255,.6);
  background: rgba(21, 59, 44, 0.5);
  transition: all .15s;
}
.env-btn:hover {
  background: rgba(21, 59, 44, 0.8);
  color: #fff;
}
.env-btn.active {
  background: rgba(21, 59, 44, 0.95);
  color: #fff;
}


/* Footer */
footer {
  background: var(--green-dark);
  color: white;
  padding: 24px 0;
  text-align: center;
}

/* ── Fix: Logo nicht vom Badge überlappt ── */
.logo {
  margin-left: 80px;
}

/* ── Modul-Sektionen: Trennlinie zwischen Modulen ── */
.module-section + .module-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid var(--border-soft);
}

/* ── Wissen-Seiten: saubere Formatierung ── */
.page-wissen h2 {
  border-bottom: none;
  color: var(--green-dark);
  padding-bottom: 0;
}

.page-wissen h3 {
  margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   CHAT OVERLAY
   ═══════════════════════════════════════════════════ */

/* --- Overlay Container --- */
.chat-overlay {
  position: fixed;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  width: 520px;
  max-height: 80vh;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #ccc;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  font-family: 'Ubuntu', sans-serif;
  font-size: 14px;
}

.chat-overlay.hidden {
  display: none;
}

/* --- Header --- */
.chat-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--green-dark, #153b2c);
  color: #fff;
  border-radius: 12px 12px 0 0;
  font-weight: 500;
  font-size: 15px;
}

.close-chat-btn {
  background: none;
  border: none;
  color: #eee;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.close-chat-btn:hover {
  color: #ff6b6b;
}

/* --- Body --- */
.chat-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.chat-body-grid {
  display: flex;
  flex-direction: column;
  min-height: 400px;
  flex: 1;
}

#overlay-chat-wrapper-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* --- Kontakt-Bereich --- */
.contact-wrapper {
  padding: 12px;
}

/* Self ID */
.self-id-block {
  margin-bottom: 10px;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 6px;
}
.self-id-label {
  display: block;
  font-size: 11px;
  color: #777;
  margin-bottom: 4px;
}
.self-id-value {
  display: flex;
  align-items: center;
  gap: 8px;
}
#self-id-value {
  font-family: monospace;
  font-size: 13px;
  color: var(--green-dark, #153b2c);
}
.self-id-copy-btn {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--green-mid, #2d6b3f);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.self-id-copy-btn:hover {
  background: var(--green-light, #3f8f53);
}

/* Kontaktsuche */
.contact-search-form {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.contact-search-form input {
  flex: 1;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #1a1a1a;
  font-size: 13px;
}
.contact-search-form button {
  padding: 6px 10px;
  background: var(--green-mid, #2d6b3f);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.contact-search-feedback {
  font-size: 12px;
  color: #555;
  margin-bottom: 6px;
  min-height: 16px;
}
.contact-search-feedback.is-error {
  color: #ff6b6b;
}
.contact-search-action {
  padding: 4px 10px;
  background: var(--green-mid, #2d6b3f);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-bottom: 8px;
}
.contact-search-action.hidden {
  display: none;
}

/* Arbeitsgruppen (Mini-Liste im Chat) */
.workgroup-mini-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(45, 107, 63, 0.20);
  border-radius: 10px;
  background: #f7fbf8;
}
.workgroup-mini-header {
  font-size: 12px;
  color: #375;
  margin-bottom: 6px;
  font-weight: 600;
}
.workgroup-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.workgroup-mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(45, 107, 63, 0.18);
  background: #fff;
  cursor: pointer;
}
.workgroup-mini-item:hover {
  border-color: rgba(45, 107, 63, 0.45);
  background: #f3faf5;
}
.workgroup-mini-name {
  font-weight: 600;
  color: #153b2c;
}
.workgroup-mini-id {
  font-size: 11px;
  color: #6a6a6a;
  font-family: monospace;
}

/* Kontakt-Status */
.contact-status {
  font-size: 12px;
  color: #555;
  padding: 4px 0;
}

/* Kontaktliste */
.contact-list {
  max-height: 200px;
  overflow-y: auto;
  margin: 8px 0;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  background: none;
  border: none;
  border-bottom: 1px solid #eee;
  color: #1a1a1a;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  transition: background .15s;
}
.contact-item:hover {
  background: #f5f5f5;
}
.contact-item.contact-self {
  opacity: 1;
  cursor: pointer;
}
.contact-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ddd;
  flex-shrink: 0;
}
.contact-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.contact-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-meta {
  font-size: 11px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-hint {
  font-size: 11px;
  color: #888;
  padding: 4px 0;
}

/* --- Gruppen --- */
.group-manager {
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 8px;
}
.group-creator {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.group-creator input {
  flex: 1;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #1a1a1a;
  font-size: 13px;
}
.group-creator button {
  padding: 6px 10px;
  background: var(--green-mid, #2d6b3f);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.group-card {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
}
.group-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.group-card-delete {
  font-size: 11px;
  padding: 2px 8px;
  background: #fff0f0;
  color: #c33;
  border: 1px solid #e0b0b0;
  border-radius: 4px;
  cursor: pointer;
}
.group-card-delete:hover {
  background: #ffe0e0;
}
/* --- Inbox / Neue Nachrichten --- */
.inbox-panel {
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 8px;
}
.inbox-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark, #153b2c);
  margin-bottom: 6px;
}
.inbox-card {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  background: #f0faf0;
  border: 1px solid #c0e0c0;
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.inbox-card:hover {
  background: #e0f5e0;
}
.inbox-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.inbox-preview {
  font-size: 12px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-time {
  font-size: 10px;
  color: #999;
  margin-top: 2px;
}

/* --- Kontaktanfragen --- */
.contact-requests-panel {
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 8px;
}
.requests-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark, #153b2c);
  margin-bottom: 6px;
}
.request-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: #f5faf5;
  border: 1px solid #d0e8d0;
  border-radius: 6px;
  margin-bottom: 4px;
}
.request-info {
  font-size: 12px;
  color: #1a1a1a;
  word-break: break-all;
  flex: 1;
  margin-right: 8px;
}
.request-buttons {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.request-accept {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--green-mid, #2d6b3f);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.request-accept:hover {
  background: var(--green-dark, #153b2c);
}
.request-decline {
  font-size: 11px;
  padding: 3px 10px;
  background: #fff0f0;
  color: #c33;
  border: 1px solid #e0b0b0;
  border-radius: 4px;
  cursor: pointer;
}
.request-decline:hover {
  background: #ffe0e0;
}

.group-list-message {
  font-size: 12px;
  color: #555;
  padding: 4px 0;
}
.group-list-error {
  color: #ff6b6b;
}

/* --- Drag-Fix: Overlay nicht verschieben --- */
.chat-overlay-body {
  overflow-anchor: none;
}
.contact-list, .group-list-panel {
  overflow-anchor: none;
}

/* --- Contact Item Layout --- */
.contact-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  cursor: grab;
  transition: background 0.15s, border-color 0.15s;
  gap: 8px;
}
.contact-item:hover {
  background: #f0f7f0;
  border-color: #d0e8d0;
}
.contact-item.contact-self {
  cursor: pointer;
}
.contact-item.dragging {
  opacity: 0.5;
  border-color: var(--green-mid, #2d6b3f);
  background: #e8f5e8;
}
.contact-chat-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.5;
  flex-shrink: 0;
}
.contact-chat-btn:hover {
  opacity: 1;
}
.contact-delete-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #c33;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.contact-item:hover .contact-delete-btn {
  opacity: 0.5;
}
.contact-delete-btn:hover {
  opacity: 1 !important;
}
.contact-group-tag {
  display: block;
  font-size: 10px;
  color: var(--green-mid, #2d6b3f);
  margin-bottom: 1px;
}

/* --- Group Drop Zone --- */
.group-card {
  border: 2px dashed transparent;
  transition: border-color 0.2s, background 0.2s;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #fafafa;
}
.group-card.group-drop-hover {
  border-color: var(--green-mid, #2d6b3f);
  background: #e8f5e8;
}
/* Member remove button */
.group-members {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.group-member-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  background: #e0f0e0;
  color: #1a1a1a;
  padding: 2px 6px;
  border-radius: 3px;
}
.group-member-remove {
  cursor: pointer;
  color: #999;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  padding: 0 2px;
  margin-left: 2px;
}
.group-member-remove:hover {
  color: #c33;
}

/* --- Conversation --- */
.chat-conversation {
  border-top: 2px solid var(--green-mid, #2d6b3f);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.chat-conversation.hidden {
  display: none;
}
.chat-conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f5f5f5;
  font-weight: 500;
  color: #1a1a1a;
}
#chat-conversation-close {
  background: none;
  border: none;
  color: #2a2a2a;
  font-size: 18px;
  cursor: pointer;
}
.chat-history {
  flex: 1;
  min-height: 180px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px 12px;
}
.chat-message {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  max-width: 85%;
  word-wrap: break-word;
}
.chat-message.self {
  background: var(--green-dark, #153b2c);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}
.chat-message.partner {
  background: #f0f0f0;
  color: #1a1a1a;
  margin-right: auto;
  border-bottom-left-radius: 2px;
}
.chat-message .meta {
  font-size: 10px;
  color: #888;
  margin-top: 4px;
}
.chat-message.self .meta {
  color: rgba(255,255,255,.6);
}
.chat-conversation-status {
  font-size: 12px;
  color: #555;
  padding: 4px 12px;
  min-height: 18px;
}
.chat-form {
  display: flex;
  gap: 6px;
  padding: 8px 12px 12px;
}
.chat-form input {
  flex: 1;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #1a1a1a;
  font-size: 13px;
}
.chat-form input:focus {
  outline: none;
  border-color: var(--green-mid, #2d6b3f);
}
.chat-form button {
  padding: 8px 14px;
  background: var(--green-mid, #2d6b3f);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.chat-form button:hover {
  background: var(--green-light, #3f8f53);
}

}

/* --- Responsive: kleine Screens --- */
@media (max-width: 480px) {
  .chat-overlay {
    width: calc(100vw - 20px);
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    max-height: 85vh;
  }
  .ki-overlay {
    width: calc(100vw - 20px);
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* ═══════════════════════════════════════════════════
   LOGIN-SEITE
   ═══════════════════════════════════════════════════ */

.page-login {
  max-width: 480px;
  margin: 2rem auto;
}
.page-login h1 {
  margin-bottom: 1rem;
}
.page-login p {
  margin-bottom: .8rem;
  line-height: 1.6;
}
.login-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--green-mid, #2d6b3f);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-family: 'Ubuntu', sans-serif;
  cursor: pointer;
  margin-top: .5rem;
}
.login-btn:hover {
  background: var(--green-light, #3f8f53);
}
.login-btn-logout {
  background: #666;
}
.login-btn-logout:hover {
  background: #888;
}
.login-profile {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  margin-top: 1rem;
}
.login-profile-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.login-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}
.login-name {
  font-weight: 600;
  font-size: 16px;
}
.login-email {
  color: #555;
  font-size: 14px;
}
.login-id {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}
.login-id code {
  background: #e8e8e8;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}

/* ── Trans-Toggle ──────────────────────────────── */
.trans-toggle-btn {
  margin-left: 10px;
  padding: 4px 12px;
  border: 1px solid #555;
  border-radius: 14px;
  background: transparent;
  color: #aaa;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  vertical-align: middle;
}
.trans-toggle-btn:hover {
  border-color: #888;
  color: #ddd;
}
.trans-toggle-btn.trans-active {
  background: #1a3a2a;
  border-color: #4caf50;
  color: #4caf50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

/* ── Trans Dual Toggle + Guthaben ──────────────── */
.trans-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  vertical-align: middle;
}
.trans-balance {
  font-size: 0.75rem;
  color: #4caf50;
  margin-left: 4px;
}
.trans-balance.balance-empty {
  color: #f44336;
}

/* ── KI-Chat ───────────────────────────────────── */
.ki-header-title {
  font-weight: bold;
  font-size: 0.95rem;
}
.ki-balance {
  font-size: 0.75rem;
  color: #4caf50;
  margin-left: auto;
  margin-right: 10px;
}
.ki-balance.balance-empty {
  color: #f44336;
}
#ki-history {
  padding: 12px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ki-msg-user {
  align-self: flex-end;
  background: #1a3a2a;
  color: #ddd;
  padding: 8px 12px;
  border-radius: 12px 12px 2px 12px;
  max-width: 85%;
  font-size: 0.9rem;
  word-wrap: break-word;
}
.ki-msg-ki {
  align-self: flex-start;
  background: #1a1a2e;
  color: #ddd;
  padding: 8px 12px;
  border-radius: 12px 12px 12px 2px;
  max-width: 85%;
  font-size: 0.9rem;
  word-wrap: break-word;
}
.ki-msg-ki .ki-role-name {
  font-size: 0.75rem;
  font-weight: bold;
  color: #7b8cde;
  margin-bottom: 3px;
}
/* KI-Farben: Name + Hintergrund pro Rolle */
.ki-msg-ki.ki-role-sam .ki-role-name { color: #66bb6a; }
.ki-msg-ki.ki-role-sam { background: rgba(40, 80, 50, 0.5); border-left: 3px solid #66bb6a; }

.ki-msg-ki.ki-role-phil .ki-role-name { color: #c48bb0; }
.ki-msg-ki.ki-role-phil { background: rgba(75, 35, 55, 0.5); border-left: 3px solid #c48bb0; }

.ki-msg-ki.ki-role-otto .ki-role-name { color: #c46050; }
.ki-msg-ki.ki-role-otto { background: rgba(75, 35, 30, 0.5); border-left: 3px solid #c46050; }

.ki-msg-ki.ki-role-valora .ki-role-name { color: #e0c040; }
.ki-msg-ki.ki-role-valora { background: rgba(70, 60, 20, 0.5); border-left: 3px solid #e0c040; }

.ki-msg-ki.ki-role-anna_lys .ki-role-name { color: #80c8e8; }
.ki-msg-ki.ki-role-anna_lys { background: rgba(30, 55, 75, 0.5); border-left: 3px solid #80c8e8; }

.ki-msg-ki.ki-role-kassandra .ki-role-name { color: #8899aa; }
.ki-msg-ki.ki-role-kassandra { background: rgba(40, 48, 60, 0.5); border-left: 3px solid #8899aa; }

.ki-msg-ki.ki-role-mr_public .ki-role-name { color: #5070a0; }
.ki-msg-ki.ki-role-mr_public { background: rgba(25, 35, 60, 0.5); border-left: 3px solid #5070a0; }

.ki-msg-ki.ki-role-trans .ki-role-name { color: #888888; }
.ki-msg-ki.ki-role-trans { background: rgba(45, 45, 50, 0.5); border-left: 3px solid #888888; }

/* KI Message Header + Downvote */
.ki-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.ki-downvote-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0 4px;
  transition: all 0.2s;
  line-height: 1;
}
.ki-downvote-btn:hover {
  color: #f44336;
}
.ki-downvote-btn.ki-downvoted {
  color: #f44336;
  cursor: default;
}
.ki-status {
  padding: 4px 12px;
  font-size: 0.75rem;
  color: #888;
  min-height: 20px;
}
.ki-chat-form {
  display: flex;
  padding: 8px;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.ki-chat-form input {
  flex: 1;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 12px;
  color: #ddd;
  font-size: 0.9rem;
  outline: none;
}
.ki-chat-form input:focus {
  border-color: #555;
}
.ki-chat-form button {
  background: #1a3a2a;
  border: 1px solid #4caf50;
  border-radius: 8px;
  color: #4caf50;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 1rem;
}
.ki-chat-form button:hover {
  background: #2a5a3a;
}

/* ── Game HUD Bar ──────────────────────────────── */
:root {
  --hud-height: 72px;
}

#game-hud {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--hud-height);
  background: linear-gradient(180deg, rgba(15, 35, 25, 0.92) 0%, rgba(10, 25, 18, 0.97) 100%);
  border-top: 1px solid rgba(63, 143, 83, 0.4);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.4), 0 -1px 0 rgba(63, 143, 83, 0.2);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 16px;
  font-family: 'Ubuntu', sans-serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#game-hud.hidden {
  display: none !important;
}

/* HUD Left */
.hud-left {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 12px;
}

.hud-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.1rem;
}

.hud-btn:hover {
  background: rgba(63, 143, 83, 0.2);
  border-color: rgba(63, 143, 83, 0.5);
  color: #fff;
}

.hud-btn.active {
  background: rgba(63, 143, 83, 0.3);
  border-color: rgba(63, 143, 83, 0.6);
  color: #4caf50;
}

/* HUD Center - Currency: OR oben, SR unten */
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
}

.hud-currency {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(63, 143, 83, 0.25);
  border-radius: 20px;
}

.hud-currency-icon {
  font-size: 0.85rem;
}

.hud-currency-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: #4caf50;
  letter-spacing: 0.02em;
  min-width: 60px;
  text-align: center;
}

.hud-currency-value.empty {
  color: #f44336;
}

.hud-currency-label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* HUD OR-Waehrung (gelb) */
.hud-currency-or {
  border-color: rgba(255, 193, 7, 0.3);
}
.hud-currency-or .hud-currency-value {
  color: #ffc107;
}
.hud-currency-or .hud-currency-icon {
  color: #ffc107;
}

/* HUD Konvertierungspfeile */
/* HUD Konvertierung: Wrapper mit Pfeilen links/rechts */
.hud-convert-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-currency-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hud-convert-arrow {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 2px;
  position: relative;
  z-index: 5;
}
.hud-convert-arrow svg,
.hud-convert-arrow svg * {
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  border-radius: 8px;
}
.hud-convert-arrow:hover {
  color: #fff;
  background: rgba(63, 143, 83, 0.25);
  transform: scale(1.2);
}
.hud-convert-up:hover {
  color: #ffc107;
}
.hud-convert-down:hover {
  color: #4caf50;
}

/* Konvertierungs-Overlay */
.convert-overlay {
  position: fixed;
  bottom: calc(var(--hud-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 550;
  width: 320px;
  max-width: 90vw;
}
.convert-overlay.hidden {
  display: none;
}

.convert-overlay-inner {
  background: rgba(12, 30, 20, 0.97);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 1px rgba(63, 143, 83, 0.3);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.convert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(63, 143, 83, 0.2);
}
.convert-header span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4caf50;
}
.convert-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}
.convert-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.convert-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.convert-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.convert-rate-line,
.convert-balance-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}
.convert-rate-line strong,
.convert-balance-line strong {
  color: #fff;
  font-size: 0.85rem;
}

.convert-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.convert-input-row label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}
.convert-input-row input {
  flex: 1;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(63, 143, 83, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.convert-input-row input:focus {
  border-color: rgba(63, 143, 83, 0.7);
}
.convert-input-row span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.convert-preview {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  min-height: 1.2em;
  padding: 6px 0;
  text-align: center;
}

.convert-submit {
  padding: 10px;
  background: rgba(63, 143, 83, 0.3);
  border: 1px solid rgba(63, 143, 83, 0.5);
  border-radius: 8px;
  color: #4caf50;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.convert-submit:hover {
  background: rgba(63, 143, 83, 0.5);
  color: #fff;
}

.convert-result {
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  text-align: center;
}
.convert-result.hidden {
  display: none;
}
.convert-result.success {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #81c784;
}
.convert-result.error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #e57373;
}

/* HUD Right */
.hud-right {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 12px;
}

/* ── HUD Transactions (75% rechts) ─────────────── */
.hud-transactions {
  position: absolute;
  right: 25%;
  bottom: 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.hud-tx-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.hud-tx-pill:hover {
  border-color: rgba(63, 143, 83, 0.4);
  background: rgba(0, 0, 0, 0.5);
}
.hud-vote-pill {
  border-color: rgba(63, 143, 83, 0.2);
}
.hud-vote-pill .hud-tx-value {
  color: #4caf50;
}
.hud-vote-pill.hud-votes-empty .hud-tx-value {
  color: rgba(255, 255, 255, 0.3);
}

.hud-tx-label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hud-tx-value {
  font-size: 0.8rem;
  font-weight: 500;
  color: #e57373;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.hud-tx-pill[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  padding: 6px 12px;
  background: rgba(10, 25, 18, 0.95);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 8px;
  font-size: 0.75rem;
  color: #ccc;
  white-space: nowrap;
  z-index: 600;
}

/* ── Grosse Messzylinder (Game-Style HP/Mana) ──── */
.hud-cylinder-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}
.hud-cylinder-big:hover {
  transform: scale(1.05);
}

.cylinder-glass-big {
  width: 22px;
  height: 90px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  position: relative;
  overflow: hidden;
  /* Ragt nach oben aus der HUD heraus */
  margin-bottom: 0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5), 0 0 6px rgba(0, 0, 0, 0.3);
}

/* Glas-Reflektion */
.cylinder-glass-big::after {
  content: '';
  position: absolute;
  top: 0;
  left: 2px;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.08) 100%
  );
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}

.cylinder-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transition: height 1s ease-out;
  border-radius: 2px 2px 0 0;
}

.cylinder-fill-yellow {
  background: linear-gradient(0deg,
    rgba(255, 160, 0, 0.95) 0%,
    rgba(255, 193, 7, 0.85) 40%,
    rgba(255, 235, 59, 0.6) 80%,
    rgba(255, 245, 157, 0.3) 100%
  );
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.4), inset 0 -2px 4px rgba(255, 160, 0, 0.3);
}

.cylinder-fill-blue {
  background: linear-gradient(0deg,
    rgba(21, 101, 192, 0.95) 0%,
    rgba(33, 150, 243, 0.85) 40%,
    rgba(100, 181, 246, 0.6) 80%,
    rgba(179, 229, 252, 0.3) 100%
  );
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.4), inset 0 -2px 4px rgba(21, 101, 192, 0.3);
}

.cylinder-marks-big {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.cylinder-marks-big .cyl-mark {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.cylinder-pct {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 3;
  pointer-events: none;
}

.cylinder-base-big {
  width: 28px;
  height: 6px;
  border-radius: 0 0 4px 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top: none;
}
.cylinder-base-yellow {
  background: rgba(255, 193, 7, 0.15);
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.1);
}
.cylinder-base-blue {
  background: rgba(33, 150, 243, 0.15);
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.1);
}

.cylinder-label-big {
  font-size: 0.45rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
  .hud-transactions {
    display: none;
  }
  .hud-tx-label {
    display: none;
  }
  .cylinder-glass-big {
    height: 70px;
    width: 18px;
  }
  .cylinder-base-big {
    width: 24px;
  }
  .cylinder-label-big {
    display: none;
  }
}

/* Body padding for HUD *//* Body padding for HUD */
body {
  padding-bottom: var(--hud-height);
}

/* Footer adjustment */
footer {
  margin-bottom: 0;
}

/* ── Kontakt-Seite ─────────────────────────────── */
.kontakt-card {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  max-width: 600px;
}

.kontakt-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.kontakt-body h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  color: var(--green-dark);
}

.kontakt-body p {
  margin: 6px 0;
  color: var(--text-secondary);
}

.kontakt-email a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-mid);
}

.kontakt-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 12px !important;
}

/* ── Admin-Badge in Kontaktliste ──────────────── */
.contact-admin-badge {
  display: inline-block;
  background: var(--green-mid);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Beta-Banner ───────────────────────────────── */
.beta-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #1a3a2a 0%, #0f2a1c 100%);
  border: 1px solid rgba(63, 143, 83, 0.5);
  border-left: 4px solid #4caf50;
  border-radius: 10px;
  color: #e0e0e0;
  font-size: 1.05rem;
  line-height: 1.6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.beta-banner-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.beta-banner-text strong {
  color: #4caf50;
}

/* ── Schwebende Overlay-Buttons ────────────────── */
.hud-float-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 35, 25, 0.85);
  border: 1px solid rgba(63, 143, 83, 0.4);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.2s;
}
.hud-float-btn:hover {
  background: rgba(63, 143, 83, 0.3);
  border-color: rgba(63, 143, 83, 0.7);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}
.hud-float-btn.active {
  background: rgba(63, 143, 83, 0.4);
  border-color: #4caf50;
  color: #4caf50;
}
/* hud-float-left: siehe Resonanzfinder-CSS unten */
.hud-float-right {
  right: 10px;
  top: calc(50% + 30px);
}
.hud-float-right-top {
  right: 10px;
  top: calc(50% - 30px);
}

.hud-float-right-top2 {
  right: 10px;
  top: calc(50% - 90px);
}

@media (max-width: 600px) {
  .hud-float-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .hud-float-left { left: 6px; }
  .hud-float-right { right: 6px; }
}

/* Mobile: Compact HUD */
@media (max-width: 600px) {
  #game-hud {
    padding: 0 8px;
  }
  .hud-btn {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
  .hud-currency {
    padding: 3px 10px;
  }
  .hud-currency-value {
    font-size: 0.8rem;
    min-width: 50px;
  }
}


/* ── Arbeitsgruppen Overlay ── */
.workgroups-overlay {
  position: fixed;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  max-height: 80vh;
  background: rgba(10, 20, 15, 0.96);
  border: 1px solid rgba(63, 143, 83, 0.35);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
  z-index: 1000;
  overflow: hidden;
}
.workgroups-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(63, 143, 83, 0.25);
  color: rgba(255,255,255,0.92);
}
#workgroups-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(15, 35, 25, 0.75);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
}
#workgroups-close:hover {
  border-color: rgba(63, 143, 83, 0.7);
  background: rgba(63, 143, 83, 0.25);
}
.workgroups-body {
  padding: 12px;
  color: rgba(255,255,255,0.82);
  overflow: auto;
  max-height: calc(80vh - 56px);
}
.workgroups-intro {
  line-height: 1.5;
  font-size: 0.95rem;
}



.workgroups-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.workgroups-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(15, 35, 25, 0.55);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
}
.workgroups-tab.active {
  border-color: #4caf50;
  background: rgba(63, 143, 83, 0.25);
  color: #fff;
}
.wg-panel.hidden {
  display: none;
}
.wg-label {
  display: block;
  font-size: 0.85rem;
  margin: 8px 0 6px;
  color: rgba(255,255,255,0.85);
}
.wg-row {
  display: flex;
  gap: 8px;
}
.wg-input {
  flex: 1;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(5, 10, 8, 0.55);
  color: rgba(255,255,255,0.92);
  outline: none;
}
.wg-input:focus {
  border-color: rgba(76, 175, 80, 0.9);
}
.wg-textarea {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(5, 10, 8, 0.55);
  color: rgba(255,255,255,0.92);
  outline: none;
  resize: vertical;
}
.wg-primary {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(76, 175, 80, 0.8);
  background: rgba(76, 175, 80, 0.22);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.wg-primary:hover {
  background: rgba(76, 175, 80, 0.32);
}
.wg-hint {
  margin-top: 8px;
  font-size: 0.82rem;
  opacity: 0.82;
  line-height: 1.4;
}
.wg-result {
  margin-top: 10px;
  font-size: 0.9rem;
  min-height: 18px;
}
.wg-result.error {
  color: #ff8a8a;
}
.wg-result.ok {
  color: #9ef0a6;
}
.wg-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(63, 143, 83, 0.25);
}
.wg-section-title {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.92);
  margin-bottom: 8px;
}
.wg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wg-item {
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(63, 143, 83, 0.28);
  background: rgba(10, 20, 15, 0.55);
}
.wg-item-title {
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}
.wg-item-sub {
  margin-top: 2px;
  font-size: 0.8rem;
  opacity: 0.78;
  font-family: monospace;
}
/* ── Shoutbox Overlay ── */
.shoutbox-overlay {
  position: fixed;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 340px;
  max-height: 500px;
  background: rgba(10, 28, 18, 0.97);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 14px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.shoutbox-overlay.hidden { display: none; }
.shoutbox-overlay-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(63, 143, 83, 0.3);
  font-weight: 600;
  color: #b0ffb8;
  font-size: 0.95rem;
}
.shoutbox-overlay-header button {
  margin-left: auto;
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.3rem;
  cursor: pointer;
}
.shoutbox-overlay-header button:hover { color: #fff; }
.shoutbox-trans-badge {
  background: rgba(80, 80, 80, 0.6);
  color: #ccc;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 500;
}
.shoutbox-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  min-height: 200px;
  max-height: 380px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
}
.shoutbox-input-row {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(63, 143, 83, 0.3);
}
.shoutbox-input-row input {
  flex: 1;
  background: #ffffff;
  border: 1px solid rgba(63, 143, 83, 0.3);
  border-radius: 8px;
  padding: 7px 10px;
  color: #111;
  font-size: 0.88rem;
  outline: none;
}
.shoutbox-input-row input:focus {
  border-color: rgba(63, 143, 83, 0.7);
}
.shoutbox-input-row button {
  background: rgba(63, 143, 83, 0.3);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 8px;
  color: #b0ffb8;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.95rem;
}
.shoutbox-input-row button:hover {
  background: rgba(63, 143, 83, 0.5);
}

@media (max-width: 600px) {
  .shoutbox-overlay {
    right: 5px;
    left: 5px;
    width: auto;
    max-height: 60vh;
  }
  .hud-float-right-top { right: 6px; top: calc(50% - 26px); }
  .hud-float-right { top: calc(50% + 26px); }
}

/* -- Shoutbox Messages -- */
.shoutbox-msg {
  padding: 4px 0;
  border-bottom: 1px solid rgba(63, 143, 83, 0.1);
}
.shoutbox-msg:last-child { border-bottom: none; }
.shoutbox-msg-user {
  color: #4caf50;
  font-weight: 600;
  font-size: 0.8rem;
}
.shoutbox-msg-time {
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
  margin-left: 6px;
}
.shoutbox-msg-text {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  margin-top: 1px;
  word-break: break-word;
}
.shoutbox-msg-normalized .shoutbox-msg-text {
  color: rgba(200, 200, 255, 0.85);
  font-style: italic;
}
.shoutbox-msg-defused .shoutbox-msg-text {
  color: rgba(255, 200, 150, 0.85);
  font-style: italic;
}
.shoutbox-notice {
  padding: 6px 10px;
  margin: 4px 0;
  background: rgba(255, 100, 100, 0.15);
  border-radius: 6px;
  color: rgba(255, 150, 150, 0.9);
  font-size: 0.8rem;
  text-align: center;
}

/* -- Shoutbox Tabs -- */
.shoutbox-tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
}
.shoutbox-tab {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(63, 143, 83, 0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  padding: 3px 10px;
  cursor: pointer;
}
.shoutbox-tab.active {
  background: rgba(63, 143, 83, 0.25);
  border-color: rgba(63, 143, 83, 0.5);
  color: #b0ffb8;
}
.shoutbox-tab:hover { color: #fff; }

/* -- Shoutbox Rules -- */
.shoutbox-rule {
  padding: 8px 0;
  border-bottom: 1px solid rgba(63, 143, 83, 0.1);
}
.shoutbox-rule.whitelisted { opacity: 0.5; }
.rule-original {
  color: rgba(255, 130, 130, 0.9);
  font-size: 0.82rem;
  text-decoration: line-through;
}
.rule-arrow {
  color: rgba(255,255,255,0.3);
  font-size: 0.7rem;
  text-align: center;
  padding: 2px 0;
}
.rule-filtered {
  color: rgba(130, 255, 160, 0.9);
  font-size: 0.82rem;
}
.rule-reason {
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  font-style: italic;
  margin-top: 2px;
}
.rule-votes {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.rule-vote-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  padding: 3px 10px;
  cursor: pointer;
}
.rule-vote-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.vote-filter:hover { border-color: rgba(255, 100, 100, 0.5); }
.vote-whitelist:hover { border-color: rgba(100, 255, 130, 0.5); }
.rule-wl-needed {
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
}
.rule-whitelisted {
  color: #4caf50;
  font-size: 0.75rem;
  font-weight: 600;
}
.shoutbox-loading, .shoutbox-empty {
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}

/* -- Resonanzfinder Button -- */
.hud-float-left {
  left: 10px;
  top: calc(50% + 30px);
}
.hud-float-left-top {
  left: 10px;
  top: calc(50% - 30px);
}

/* -- Resonanzfinder Overlay -- */
.resonanz-overlay {
  position: fixed;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 340px;
  max-height: 520px;
  background: rgba(10, 28, 18, 0.97);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 14px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.resonanz-overlay.hidden { display: none; }
.resonanz-overlay-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(63, 143, 83, 0.3);
  font-weight: 600;
  color: #b0ffb8;
  font-size: 0.95rem;
}
.resonanz-overlay-header button {
  margin-left: auto;
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.3rem;
  cursor: pointer;
}
.resonanz-overlay-header button:hover { color: #fff; }
.resonanz-sam-badge {
  background: rgba(63, 143, 83, 0.3);
  color: #8f8;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 500;
}
.resonanz-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}
.resonanz-intro {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-bottom: 14px;
  text-align: center;
}

/* -- Profile Buttons -- */
.resonanz-profiles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.resonanz-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(63, 143, 83, 0.2);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  color: #fff;
  transition: all 0.15s;
}
.resonanz-profile:hover {
  background: rgba(63, 143, 83, 0.15);
  border-color: rgba(63, 143, 83, 0.5);
}
.resonanz-profile.selected {
  background: rgba(63, 143, 83, 0.25);
  border-color: #4caf50;
}
.resonanz-profile-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.resonanz-profile-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
}
.resonanz-profile-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  display: block;
}

/* -- Config Area -- */
.resonanz-config {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(63, 143, 83, 0.2);
}
.resonanz-config.hidden { display: none; }
.resonanz-config-title {
  color: #b0ffb8;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.resonanz-config-hint {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  margin-bottom: 8px;
}
.resonanz-textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(63, 143, 83, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  font-size: 0.85rem;
  resize: vertical;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.resonanz-textarea:focus {
  border-color: rgba(63, 143, 83, 0.7);
}
.resonanz-submit {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  background: rgba(63, 143, 83, 0.35);
  border: 1px solid rgba(63, 143, 83, 0.5);
  border-radius: 8px;
  color: #b0ffb8;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.resonanz-submit:hover {
  background: rgba(63, 143, 83, 0.5);
}
.resonanz-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.resonanz-status {
  margin-top: 12px;
  padding: 10px;
  background: rgba(63, 143, 83, 0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  text-align: center;
}
.resonanz-status.hidden { display: none; }

@media (max-width: 600px) {
  .resonanz-overlay {
    left: 5px;
    right: 5px;
    width: auto;
    max-height: 70vh;
  }
  .hud-float-left-top { left: 6px; top: calc(50% - 26px); }
  .hud-float-left { top: calc(50% + 26px); }
}

/* -- Resonanzfinder Chat -- */
.resonanz-chat {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  min-height: 200px;
  max-height: 350px;
}
.resonanz-msg {
  margin-bottom: 8px;
}
.resonanz-msg-sam .resonanz-msg-label {
  color: #4caf50;
  font-weight: 600;
  font-size: 0.8rem;
}
.resonanz-msg-user .resonanz-msg-label {
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  font-size: 0.8rem;
}
.resonanz-msg-sam .resonanz-msg-text {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
}
.resonanz-msg-user .resonanz-msg-text {
  color: rgba(180, 220, 255, 0.85);
  font-size: 0.85rem;
}
.resonanz-msg-system .resonanz-msg-text {
  color: rgba(255, 150, 150, 0.8);
  font-size: 0.8rem;
  font-style: italic;
}
.resonanz-input-row {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(63, 143, 83, 0.3);
}
.resonanz-input-row input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(63, 143, 83, 0.3);
  border-radius: 8px;
  padding: 7px 10px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
}
.resonanz-input-row input:focus {
  border-color: rgba(63, 143, 83, 0.7);
}
.resonanz-input-row button {
  background: rgba(63, 143, 83, 0.3);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 8px;
  color: #b0ffb8;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.95rem;
}
.resonanz-input-row button:hover {
  background: rgba(63, 143, 83, 0.5);
}
.resonanz-loading {
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}
.resonanz-done {
  text-align: center;
  padding: 12px;
  margin-top: 8px;
  background: rgba(63, 143, 83, 0.15);
  border-radius: 8px;
  color: #b0ffb8;
  font-size: 0.9rem;
}
.resonanz-back {
  display: inline-block;
  margin-top: 6px;
  background: #ffffff;
  border: 1px solid rgba(63, 143, 83, 0.3);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
.resonanz-back:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* -- Profil Overlay -- */
.profil-overlay {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  max-height: 560px;
  background: rgba(10, 28, 18, 0.97);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 14px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.profil-overlay.hidden { display: none; }
.profil-overlay-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(63, 143, 83, 0.3);
  font-weight: 600;
  color: #b0ffb8;
  font-size: 0.95rem;
}
.profil-overlay-header > button {
  margin-left: auto;
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.3rem;
  cursor: pointer;
}
.profil-overlay-header > button:hover { color: #fff; }
.profil-miro-badge {
  background: rgba(160, 160, 170, 0.3);
  color: #ccc;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 500;
}

/* -- Profil Tabs -- */
.profil-tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
}
.profil-tab {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(63, 143, 83, 0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  padding: 3px 10px;
  cursor: pointer;
}
.profil-tab.active {
  background: rgba(63, 143, 83, 0.25);
  border-color: rgba(63, 143, 83, 0.5);
  color: #b0ffb8;
}
.profil-tab:hover { color: #fff; }

/* -- Datenblatt -- */
.profil-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  min-height: 200px;
  max-height: 420px;
}
.profil-field {
  margin-bottom: 10px;
}
.profil-field-label {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  margin-bottom: 3px;
  font-weight: 500;
}
.profil-field-value-row {
  display: flex;
  gap: 4px;
}
.profil-field-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(63, 143, 83, 0.2);
  border-radius: 6px;
  padding: 6px 8px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}
.profil-field-input:focus {
  border-color: rgba(63, 143, 83, 0.5);
}
.profil-field-input::placeholder {
  color: rgba(255,255,255,0.2);
}
.profil-field-save {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(63, 143, 83, 0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.4);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85rem;
}
.profil-field-save:hover {
  background: rgba(63, 143, 83, 0.2);
  color: #b0ffb8;
}
.profil-field-save.saved {
  color: #4caf50;
  border-color: #4caf50;
}

/* -- Miro Chat -- */
.profil-msg {
  margin-bottom: 8px;
}
.profil-msg-miro .profil-msg-label {
  color: #aaa;
  font-weight: 600;
  font-size: 0.8rem;
}
.profil-msg-user .profil-msg-label {
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  font-size: 0.8rem;
}
.profil-msg-miro .profil-msg-text {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
}
.profil-msg-user .profil-msg-text {
  color: rgba(180, 220, 255, 0.85);
  font-size: 0.85rem;
}
.profil-msg-system .profil-msg-text {
  color: rgba(100, 255, 130, 0.7);
  font-size: 0.78rem;
  font-style: italic;
}
.profil-input-row {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(63, 143, 83, 0.3);
}
.profil-input-row input {
  flex: 1;
  background: #ffffff;
  border: 1px solid rgba(63, 143, 83, 0.3);
  border-radius: 8px;
  padding: 7px 10px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
}
.profil-input-row input:focus {
  border-color: rgba(63, 143, 83, 0.7);
}
.profil-input-row button {
  background: rgba(63, 143, 83, 0.3);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 8px;
  color: #b0ffb8;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.95rem;
}
.profil-input-row button:hover {
  background: rgba(63, 143, 83, 0.5);
}
.profil-loading {
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .profil-overlay {
    left: 5px;
    right: 5px;
    width: auto;
    transform: translateY(-50%);
    max-height: 75vh;
  }
}

/* -- Chosi: Match-Ergebnisse -- */
.chosi-loading {
  color: rgba(255,255,255,0.5);
  font-style: italic;
}
.chosi-results-header {
  text-align: center;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}
.chosi-icon {
  font-size: 1.1rem;
}
.chosi-hint {
  margin-top: 4px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}
.chosi-match-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.chosi-match-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.chosi-match-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
}
.chosi-match-score {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 2px 8px;
  border-radius: 12px;
}
.chosi-score-high {
  background: rgba(76, 175, 80, 0.25);
  color: #b0ffb8;
}
.chosi-score-mid {
  background: rgba(255, 193, 7, 0.2);
  color: #ffe082;
}
.chosi-score-low {
  background: rgba(244, 67, 54, 0.2);
  color: #ffab91;
}
.chosi-match-reason {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  line-height: 1.3;
}
.chosi-feedback-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chosi-feedback-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-right: 4px;
}
.chosi-fb-btn {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.chosi-fb-btn:hover {
  background: rgba(255,255,255,0.18);
}
.chosi-fb-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.chosi-fb-comment {
  flex: 1;
  min-width: 120px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 4px 8px;
  color: #fff;
  font-size: 0.75rem;
  outline: none;
}
.chosi-fb-comment::placeholder {
  color: rgba(255,255,255,0.3);
}
.chosi-fb-comment:focus {
  border-color: rgba(255,255,255,0.3);
}
.chosi-fb-done {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}
.resonanz-match-btn {
  display: inline-block;
  margin-right: 6px;
  background: rgba(63, 143, 83, 0.3);
  border: 1px solid rgba(63, 143, 83, 0.5);
  border-radius: 6px;
  color: #b0ffb8;
  padding: 5px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
}
.resonanz-match-btn:hover {
  background: rgba(63, 143, 83, 0.5);
}
.resonanz-match-shortcut {
  display: block;
  margin-top: 6px;
  background: rgba(63, 143, 83, 0.35);
  border: 1px solid rgba(63, 143, 83, 0.5);
  border-radius: 6px;
  color: #b0ffb8;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
}
.resonanz-match-shortcut:hover {
  background: rgba(63, 143, 83, 0.55);
}

/* -- Miro-Preview + Connect -- */
.chosi-match-clickable {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.chosi-match-clickable:hover {
  border-color: rgba(63, 143, 83, 0.5);
  background: rgba(255,255,255,0.09);
}
.chosi-match-action {
  font-size: 0.78rem;
  color: rgba(180, 220, 255, 0.7);
  margin-top: 4px;
  text-align: right;
}
.resonanz-msg-label-miro {
  color: #b0b8c8 !important;
}
.miro-decide-trigger {
  padding: 7px 10px !important;
  font-size: 1rem !important;
  min-width: 36px;
}
.chosi-decision-row {
  text-align: center;
  padding: 14px;
  margin-top: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
.chosi-decision-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 10px;
}
.chosi-decide-btn {
  display: inline-block;
  margin: 4px 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}
.chosi-decide-yes {
  background: rgba(76, 175, 80, 0.25);
  color: #b0ffb8;
}
.chosi-decide-yes:hover {
  background: rgba(76, 175, 80, 0.4);
}
.chosi-decide-no {
  background: rgba(244, 67, 54, 0.15);
  color: #ffab91;
}
.chosi-decide-no:hover {
  background: rgba(244, 67, 54, 0.3);
}
.chosi-decide-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.chosi-decision-result {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  padding: 6px 0;
}
.chosi-fb-after-decision {
  margin-top: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}

/* -- Eingehende Kontaktanfragen -- */
.resonanz-incoming {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 10px;
}
.resonanz-incoming-header {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffe082;
  margin-bottom: 8px;
}
.resonanz-incoming-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
  gap: 6px;
}
.resonanz-incoming-card:first-of-type {
  border-top: none;
}
.resonanz-incoming-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.resonanz-incoming-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.9);
}
.resonanz-incoming-type {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}
.resonanz-incoming-btn {
  background: rgba(63, 143, 83, 0.3);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 6px;
  color: #b0ffb8;
  padding: 5px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
}
.resonanz-incoming-btn:hover {
  background: rgba(63, 143, 83, 0.5);
}

/* -- Eingehende Kontaktanfragen -- */
.resonanz-incoming {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 10px;
}
.resonanz-incoming-header {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffe082;
  margin-bottom: 8px;
}
.resonanz-incoming-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
  gap: 6px;
}
.resonanz-incoming-card:first-of-type {
  border-top: none;
}
.resonanz-incoming-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.resonanz-incoming-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.9);
}
.resonanz-incoming-type {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}
.resonanz-incoming-btn {
  background: rgba(63, 143, 83, 0.3);
  border: 1px solid rgba(63, 143, 83, 0.4);
  border-radius: 6px;
  color: #b0ffb8;
  padding: 5px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
}
.resonanz-incoming-btn:hover {
  background: rgba(63, 143, 83, 0.5);
}
.chosi-decide-block {
  background: rgba(120, 120, 120, 0.15);
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem !important;
  padding: 6px 14px !important;
  margin-top: 4px !important;
}
.chosi-decide-block:hover {
  background: rgba(244, 67, 54, 0.25);
  color: #ffab91;
}

/* -- Verfeinern-Button + Hinweis -- */
.resonanz-refine-btn {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: rgba(255,255,255,0.6) !important;
}
.resonanz-refine-btn:hover {
  background: rgba(255,255,255,0.15) !important;
  color: rgba(255,255,255,0.85) !important;
}
.resonanz-done-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

/* -- Resonanzfinder: breiteres Overlay -- */
/* Override fuer Desktop */
@media (min-width: 769px) {
  .resonanz-overlay {
    width: 600px !important;
    max-height: 85vh !important;
    left: 70px !important;
  }
  .resonanz-chat {
    max-height: 60vh !important;
    min-height: 300px !important;
  }
}
/* Override fuer Mobil */
@media (max-width: 768px) {
  .resonanz-overlay {
    max-height: 85vh !important;
  }
  .resonanz-chat {
    max-height: 55vh !important;
  }
}
/* Allgemein */
.resonanz-chat {
  max-height: 55vh;
}

/* ── Feature Showcase Section ──────────────────── */
.features-section {
  padding: 2rem 0;
  max-width: 900px;
  margin: 0 auto;
}
.features-section h2 {
  text-align: center;
  color: var(--green-accent, #4caf50);
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
}
.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.feature-card {
  background: var(--bg-card, #1a2a1a);
  border: 1px solid var(--green-dark, #2d6b3f);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--green-accent, #4caf50);
}
.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
}
.feature-card h3 {
  color: var(--green-accent, #4caf50);
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
}
.feature-card p {
  color: #ccc;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
}
.features-cta {
  text-align: center;
  margin: 1.5rem 0;
}
.features-hint {
  text-align: center;
  color: #999;
  font-size: 0.85rem;
  margin-top: 1rem;
  padding: 0.8rem;
  background: rgba(45, 107, 63, 0.15);
  border-radius: 8px;
  line-height: 1.5;
}

/* CTA Buttons */
.cta-button {
  background: var(--green-mid, #2d6b3f);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 1.05rem;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.cta-button.cta-secondary {
  background: transparent;
  border: 2px solid var(--green-mid, #2d6b3f);
  color: var(--green-mid, #2d6b3f);
}
.cta-button.cta-secondary:hover {
  background: var(--green-mid, #2d6b3f);
  color: #fff;
}

.cta-button:hover {
  background: var(--green-accent, #4caf50);
  transform: scale(1.03);
}
.cta-button-small {
  padding: 6px 16px;
  font-size: 0.9rem;
  margin-left: 8px;
  vertical-align: middle;
}

/* Hero tagline */
.hero-tagline {
  font-size: 1.2rem;
  color: var(--green-accent, #4caf50);
  font-weight: 500;
  margin-bottom: 0.8rem;
}
.hero-cta {
  text-align: center;
  margin-top: 1.5rem;
}

/* Responsive: Feature Cards stacked on mobile */
@media (max-width: 600px) {
  .feature-cards {
    grid-template-columns: 1fr;
  }
  .feature-card {
    padding: 1.2rem;
  }
}

/* =======================================
   Wünsch-dir-was Overlay
   ======================================= */
.wish-overlay {
  position: fixed;
  left: 60px;
  bottom: 80px;
  width: 380px;
  max-height: 520px;
  background: rgba(10, 18, 28, 0.97);
  border: 1px solid rgba(218, 165, 32, 0.4);
  border-radius: 14px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.wish-overlay.hidden { display: none; }
.wish-overlay-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(218, 165, 32, 0.3);
  font-weight: 600;
  color: #ffd700;
  font-size: 0.95rem;
}
.wish-overlay-header button {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.3rem;
  cursor: pointer;
}
.wish-overlay-header > button:last-child {
  margin-left: auto;
}
.wish-overlay-header button:hover { color: #fff; }
.wish-tabs {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}
.wish-tab {
  background: rgba(218, 165, 32, 0.15);
  color: #bbb;
  border: none;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}
.wish-tab.active {
  background: rgba(218, 165, 32, 0.4);
  color: #ffd700;
}
.wish-tab:hover { color: #fff; }

.wish-body {
  padding: 12px 14px;
  overflow-y: auto;
  max-height: 420px;
  flex: 1;
}

/* Formular */
.wish-form label {
  display: block;
  color: #ccc;
  font-size: 0.8rem;
  margin-bottom: 4px;
  margin-top: 10px;
}
.wish-form label:first-child { margin-top: 0; }
.wish-select {
  width: 100%;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: 8px;
  color: #eee;
  font-size: 0.85rem;
}
.wish-select option {
  background: #1a1a2e;
  color: #eee;
}
.wish-textarea {
  width: 100%;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: 8px;
  color: #eee;
  font-size: 0.85rem;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.wish-textarea:focus, .wish-select:focus {
  outline: none;
  border-color: #ffd700;
}
.wish-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.wish-char-count {
  font-size: 0.75rem;
  color: #888;
}
.wish-submit-btn {
  background: rgba(218, 165, 32, 0.3);
  color: #ffd700;
  border: 1px solid rgba(218, 165, 32, 0.5);
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
}
.wish-submit-btn:hover {
  background: rgba(218, 165, 32, 0.5);
}
.wish-result {
  margin-top: 8px;
  font-size: 0.82rem;
  text-align: center;
}
.wish-result-ok { color: #ffd700; }
.wish-result-error { color: #e74c3c; }

/* Wunsch-Liste */
.wish-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wish-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(218, 165, 32, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
}
.wish-card.wish-status-accepted {
  border-color: rgba(76, 175, 80, 0.4);
}
.wish-card.wish-status-done {
  border-color: rgba(76, 175, 80, 0.6);
  background: rgba(76, 175, 80, 0.08);
}
.wish-card.wish-status-rejected {
  opacity: 0.5;
}
.wish-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.wish-cat {
  font-size: 0.72rem;
  color: #aaa;
}
.wish-status-badge {
  font-size: 0.72rem;
  color: #bbb;
}
.wish-card-text {
  color: #ddd;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
  word-break: break-word;
}
.wish-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.wish-vote-btn {
  background: rgba(218, 165, 32, 0.15);
  color: #ffd700;
  border: 1px solid rgba(218, 165, 32, 0.3);
  padding: 2px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.wish-vote-btn:hover:not(:disabled) {
  background: rgba(218, 165, 32, 0.35);
}
.wish-vote-btn.wish-voted {
  background: rgba(218, 165, 32, 0.35);
  cursor: default;
}
.wish-date {
  font-size: 0.7rem;
  color: #666;
  margin-left: auto;
}
.wish-admin-note {
  cursor: help;
  font-size: 0.8rem;
}
.wish-loading, .wish-empty, .wish-error {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  padding: 20px 0;
}
.wish-empty { color: #ffd700; }
.wish-error { color: #e74c3c; }

@media (max-width: 600px) {
  .wish-overlay {
    left: 4px;
    right: 4px;
    bottom: 70px;
    width: auto;
    max-height: 60vh;
  }
}

/* =======================================
   Magic Link Login
   ======================================= */
.login-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 360px;
  margin: 0 auto;
}
.login-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 16px 0;
  gap: 12px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.15);
}
.login-divider span {
  color: #888;
  font-size: 0.85rem;
}
.magic-link-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.magic-input {
  color: #222 !important;
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid rgba(63, 143, 83, 0.3);
  border-radius: 8px;
  
  font-size: 0.95rem;
  box-sizing: border-box;
}
.magic-input:focus {
  outline: none;
  border-color: #4CAF50;
}
.magic-input::placeholder {
  color: #777;
}
.login-btn-magic {
  background: #2d5016 !important;
  border: 1px solid #2d5016 !important;
  color: #fff !important;
}
.login-btn-magic:hover {
  background: #3a6b1e !important;
}
.magic-status {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}
.magic-status-ok { color: #4CAF50; }
.magic-status-error { color: #e74c3c; }

/* Google verknüpfen */
.login-link-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.login-link-hint {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/* ── Hamburger Menu (Mobile Navigation) ──────── */

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  z-index: 110;
}

.hamburger-line {
  display: block;
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X Animation */
.hamburger-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ── Mobile Breakpoint ──────────────────────────── */
@media (max-width: 768px) {

  /* Hamburger anzeigen */
  .hamburger-btn {
    display: flex;
  }

  /* Nav-Container vertikal */
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    min-height: var(--nav-height);
  }

  /* Nav-Links verstecken bis Toggle */
  .nav-left {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 8px;
  }

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

  /* Dropdowns vertikal */
  .nav-dropdown {
    width: 100%;
    height: auto;
  }

  .nav-link {
    padding: 12px 20px;
    height: auto;
    width: 100%;
    justify-content: space-between;
  }

  /* Dropdown-Menu: nicht absolut, sondern im Flow */
  .nav-left.open {
    background: var(--green-mid);
  }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0;
    display: none;
  }

  /* Tap-to-open statt Hover */
  .nav-dropdown:hover .nav-dropdown-menu {
    display: none;
  }
  .nav-dropdown.mobile-open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-item {
    padding: 10px 32px;
    color: white;
  }

  .nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}

/* ── Mobile: Horizontales Scrollen verhindern ──── */
html, body {
  overflow-x: hidden;
}

/* ── Mobile: HUD kompakter ─────────────────────── */
@media (max-width: 768px) {

  /* Float-Buttons kleiner + enger am Rand */
  .hud-float-btn {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
  .hud-float-left,
  .hud-float-left-top {
    left: 4px;
  }
  .hud-float-right,
  .hud-float-right-top {
    right: 4px;
  }

  /* HUD Bar: kompakter */
  #game-hud {
    padding: 0 6px;
    height: 62px;
    overflow: hidden;
  }

  :root {
    --hud-height: 62px;
  }

  .hud-left {
    gap: 4px;
    padding-bottom: 8px;
  }

  .hud-btn {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  /* Zylinder kleiner */
  .hud-cylinder {
    transform: scale(0.75);
    transform-origin: bottom center;
  }

  /* Mitte: Waehrungen kompakter */
  .hud-center {
    bottom: 4px;
  }

  .hud-currency {
    padding: 2px 8px;
    gap: 4px;
  }
  .hud-currency-value {
    font-size: 0.7rem;
    min-width: 40px;
  }
  .hud-currency-icon {
    font-size: 0.7rem;
  }
  .hud-currency-label {
    font-size: 0.5rem;
  }

  /* Konvertierungspfeile kleiner */
  .hud-convert-arrow svg {
    width: 16px;
    height: 32px;
  }

  /* Transaktions-Pill: kompakter */
  .hud-transactions {
    right: 15%;
    bottom: 14px;
  }
  .hud-tx-pill {
    padding: 2px 8px;
    gap: 4px;
  }
  .hud-tx-label {
    font-size: 0.5rem;
  }
  .hud-tx-value {
    font-size: 0.7rem;
  }
  .hud-vote-pill {
    padding: 2px 6px;
  }

  .hud-right {
    gap: 4px;
    padding-bottom: 8px;
  }
}

/* Mitstreiter-Sektion */
.mitstreiter-section {
  background: linear-gradient(135deg, rgba(30, 35, 45, 0.95), rgba(20, 25, 35, 0.98));
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 2.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mitstreiter-section h2 {
  color: #d4af37;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.mitstreiter-section h3 {
  color: #e8e8e8;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}

.mitstreiter-section p {
  color: #b8b8b8;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.mitstreiter-section ul {
  color: #b8b8b8;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.mitstreiter-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.mitstreiter-closing {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  color: #d4af37 !important;
  font-size: 1.1rem;
}

/* YouTube Header Button */
.yt-header-btn {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.5em 1em; background: #ff0000; color: #fff;
  text-decoration: none; border-radius: 4px; font-weight: 500;
  font-size: 0.95em; transition: background 0.2s, transform 0.1s;
  cursor: pointer; border: none; font-family: inherit;
}
.yt-header-btn:hover { background: #cc0000; transform: scale(1.03); }
/* YouTube Dropdown */
.yt-dropdown { position: relative; display: inline-block; margin-right: 0.8em; }
.yt-dropdown-menu {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: #1a1a2e; border: 1px solid #333; border-radius: 6px;
  min-width: 220px; z-index: 1000; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.yt-dropdown.open .yt-dropdown-menu { display: block; }
.yt-dropdown-menu a {
  display: block; padding: 0.7em 1em; color: #fff; text-decoration: none;
  font-size: 0.9em; transition: background 0.15s;
}
.yt-dropdown-menu a:hover { background: #ff000030; }

/* ── Workgroups Detail / Bewerberliste ── */
.wg-detail.hidden { display:none; }
.wg-detail {
  margin-top: 12px;
  border: 1px solid rgba(63, 143, 83, 0.28);
  border-radius: 14px;
  background: rgba(5, 10, 8, 0.55);
  overflow: hidden;
}
.wg-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(63, 143, 83, 0.22);
}
.wg-detail-title { font-weight: 700; color: rgba(255,255,255,0.92); }
.wg-detail-close {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(15, 35, 25, 0.55);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
}
.wg-detail-body { padding: 12px; color: rgba(255,255,255,0.85); }
.wg-req-item {
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(63, 143, 83, 0.22);
  background: rgba(10, 20, 15, 0.45);
  margin-bottom: 8px;
}
.wg-req-name { font-weight: 600; }
.wg-req-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(76, 175, 80, 0.8);
  background: rgba(76, 175, 80, 0.22);
  color:#fff;
  cursor:pointer;
  white-space:nowrap;
}

.wg-select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(5, 10, 8, 0.55);
  color: rgba(255,255,255,0.92);
  outline: none;
}

.wg-detail-status {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(63, 143, 83, 0.18);
  font-size: 0.9rem;
  min-height: 18px;
  background: rgba(0, 0, 0, 0.18);
}
.wg-detail-status.error { color: #ff8a8a; }
.wg-detail-status.ok { color: #9ef0a6; }

/* ── AG-Struktur Overlay (eigenes Fenster) ── */
.wg-tree-overlay {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 460px;
  max-height: 82vh;
  background: rgba(10, 20, 15, 0.97);
  border: 1px solid rgba(63, 143, 83, 0.35);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wg-tree-overlay.hidden { display: none; }
.wg-tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(63, 143, 83, 0.25);
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  font-size: 1rem;
}
#wg-tree-close {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(15, 35, 25, 0.75);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  font-size: 1.1rem;
}
#wg-tree-close:hover {
  border-color: rgba(63, 143, 83, 0.7);
  background: rgba(63, 143, 83, 0.25);
}
.wg-tree-body {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
}
.wg-tree-status {
  padding: 8px 14px;
  border-top: 1px solid rgba(63, 143, 83, 0.18);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.15);
  min-height: 20px;
}
.wg-tree-status.error { color: #ff8a8a; }

/* Baum-Knoten */
.wg-tree-node {
  position: relative;
  padding: 7px 10px;
  margin-bottom: 4px;
  border-radius: 10px;
  border: 1px solid rgba(63, 143, 83, 0.18);
  background: rgba(10, 20, 15, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wg-tree-node-name {
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  flex: 1;
}
.wg-tree-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.wg-tree-badge.leader {
  background: rgba(255, 193, 7, 0.22);
  color: #ffd54f;
  border: 1px solid rgba(255, 193, 7, 0.35);
}
.wg-tree-badge.group-leader {
  background: rgba(100, 181, 246, 0.18);
  color: #90caf9;
  border: 1px solid rgba(100, 181, 246, 0.3);
}

/* Gruppen-Container mit Verbindungslinie */
.wg-tree-group {
  margin-left: 18px;
  padding-left: 14px;
  border-left: 2px solid rgba(63, 143, 83, 0.25);
  margin-bottom: 10px;
}
.wg-tree-group-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
  padding-left: 2px;
}

/* Bewerber-Sektion */
.wg-tree-section {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(63, 143, 83, 0.2);
}
.wg-tree-section-title {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  font-weight: 600;
}

/* Aktions-Buttons im Baum */
.wg-tree-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.wg-tree-btn {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(76, 175, 80, 0.6);
  background: rgba(76, 175, 80, 0.15);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 0.78rem;
  white-space: nowrap;
}
.wg-tree-btn:hover {
  background: rgba(76, 175, 80, 0.28);
}
.wg-tree-select {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(5, 10, 8, 0.55);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  outline: none;
}
.wg-tree-icon-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(63, 143, 83, 0.35);
  background: rgba(15, 35, 25, 0.55);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wg-tree-icon-btn:hover {
  border-color: rgba(63, 143, 83, 0.6);
  background: rgba(63, 143, 83, 0.2);
}
.wg-tree-icon-btn.contact {
  border-color: rgba(100, 181, 246, 0.35);
}
.wg-tree-icon-btn.contact:hover {
  border-color: rgba(100, 181, 246, 0.6);
  background: rgba(100, 181, 246, 0.15);
}
.wg-tree-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  margin-top: 12px;
}
.wg-tree-team-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
}

/* ── Einkommensbalken ── */
.wg-income-wrap {
  margin: 10px 0 14px;
}
.wg-income-bar {
  position: relative;
  height: 22px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 11px;
  overflow: visible;
  border: 1px solid rgba(63, 143, 83, 0.3);
}
.wg-income-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #f9c74f 0%, #f4a261 100%);
  border-radius: 11px 0 0 11px;
  transition: width 0.6s ease;
  min-width: 0;
}
.wg-income-fill.full {
  border-radius: 11px;
}
.wg-income-marker {
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  z-index: 2;
}
.wg-income-marker .wg-im-line {
  width: 1px;
  height: 26px;
  background: rgba(0, 0, 0, 0.25);
}
.wg-income-marker .wg-im-icon {
  font-size: 0.9rem;
  line-height: 1;
  margin-top: 2px;
  filter: grayscale(0.3);
}

/* Manifest */
.manifest-section {
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(135deg, #0a1a12 0%, #153b2c 100%);
  color: #e0e0e0;
}
.manifest-content {
  max-width: 640px;
  margin: 0 auto;
}
.manifest-headline {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.3;
}
.manifest-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 14px 0;
  color: #ccc;
}
.manifest-cta {
  margin-top: 28px !important;
  color: #fff !important;
}
.manifest-cta strong {
  font-size: 1.15rem;
  color: #ffd700;
}
.manifest-cta em {
  font-style: italic;
  color: #aadbb5;
}

/* OR-Balance Anzeige */
.wg-balance-display {
  text-align: center;
  margin: 8px 0 4px;
  font-size: 1.1rem;
  color: #e0e0e0;
}
.wg-balance-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffd700;
}
.wg-balance-unit {
  font-size: 1rem;
  color: #aaa;
  margin-left: 4px;
}

/* Produkte */
.wg-products-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.wg-products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.wg-product-card {
  position: relative;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 10px 28px 10px 12px;
  min-width: 140px;
  max-width: 220px;
}
.wg-product-link {
  color: #7ecfff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}
.wg-product-link:hover {
  text-decoration: underline;
}
.wg-product-desc {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 4px;
}
.wg-product-remove {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  color: #ff8a8a;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.wg-product-remove:hover {
  color: #ff4444;
}
