:root {
	/* Typography */
	--font-family: 'Roboto Mono', Verdana, Arial, sans-serif;
	--font-size-base: 8pt;
	--font-size-link: 11px;
	--font-weight-base: bold;
	--font-weight-normal: normal;

	/* Colors */
	--color-bg: #000000;
	--color-text: #3399ff;
	--color-link: lightgray;
	--color-link-hover: gray;
	--color-th-text: #c0c0c0;
	--color-row-hover: #202020;
	--color-tooltip-bg: lightyellow;
	--color-board-header-bg: gray;
	--color-board-header-text: #ffffff;

	/* Borders */
	--border-color-default: #000000;
	--border-color-table: #000000;

	/* Background images (relative = HTTPS-safe) */
	--bg-body: url("/hintergrund_inhalt2.JPG");
        
	--bg-stars: url("/sterne3.jpg");
	--bg-th: url("/images/hintergruende/th_background.gif");
	--bg-menue: url("/hintergrund_inhalt.JPG");

	/* Radii / spacing */
	--radius-default: 10px;
}

/* Base */
html, body {
	
}

body {
	background-image: var(--bg-body);
        /* Sorgt dafür, dass das Bild den gesamten Bereich abdeckt */
        background-size: cover;
        /* Zentriert das Bild, damit der Fokus erhalten bleibt */
        background-position: center;
        /* Verhindert, dass sich das Bild wiederholt */
        background-repeat: no-repeat;
	background-attachment: fixed;
	background-color: var(--color-bg);
	font-family: var(--font-family);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-base);
	color: var(--color-text);
}

.body-schattendoktrin {
  --bg-body: url("/bilder/hintergrund/background-schattendoktrin.png");
}

.body-maschinendoktrin {
  --bg-body: url("/bilder/hintergrund/background-maschinendoktrin.png");
}

.body-recruiter {
  --bg-body: url("/bilder/hintergrund/background-recruiter.png");
}

table,
td,
th,
div,
input,
select,
textarea {
	font-family: var(--font-family);
	font-size: var(--font-size-base);
}

div.tooltip { z-index: 200; position: absolute; display: none; background-color: black; }

/* Tables */
table {
	border-width: 0px;
	border-color: var(--border-color-table);
}

li {
    text-align: left;
}

.table_nix {
	border-width: 0px;
	border-color: var(--color-bg);
}

.table_beschreibung {
	border-width: 5px;
	border-style: ridge;
}

.table_mh0 {
	border-width: 1px;
	border-color: var(--border-color-default);
	border-style: solid;	
	background-image: var(--bg-stars);
	padding-top: 1pt;
	padding-bottom: 1pt;
	padding-left: 1pt;
	padding-right: 1pt;
	margin-top: 1pt;
	margin-bottom: 1pt;
	margin-left: 1pt;
	margin-right: 1pt;
	border-radius: var(--radius-default);
}

.table_mh80 {
	border-width: 1px;
	border-color: var(--border-color-default);
	border-style: solid;
	width: 80%;
	background-image: var(--bg-stars);
	padding-top: 1pt;
	padding-bottom: 1pt;
	padding-left: 1pt;
	padding-right: 1pt;
	margin-top: 1pt;
	margin-bottom: 1pt;
	margin-left: 1pt;
	margin-right: 1pt;
	border-radius: var(--radius-default);
}

.table_mh100 {
	border-width: 1px;
	border-color: var(--border-color-default);
	border-style: solid;
	width: 100%;
	background-image: var(--bg-stars);
	padding-top: 1pt;
	padding-bottom: 1pt;
	padding-left: 1pt;
	padding-right: 1pt;
	margin-top: 1pt;
	margin-bottom: 1pt;
	margin-left: 1pt;
	margin-right: 1pt;
	border-radius: var(--radius-default);
}

tr:hover {
	background-color: var(--color-row-hover);
}

.tr_nohover:hover {
	background-color: transparent;
}

th, .th_background {
	background-image: var(--bg-th);
	color: var(--color-th-text);
	font-weight: var(--font-weight-base);
	height: 20px;
        padding: 2px;
}

.td_background {
    background-image: var(--bg-stars);
}


/* Links */
a,
a:link,
a:visited,
a:active {
	color: var(--color-link);
	text-decoration: none;
	font-size: var(--font-size-link);
	font-weight: var(--font-weight-base);
	font-family: var(--font-family);
        cursor: pointer;
}

a:hover {
	color: var(--color-link-hover);
	text-decoration: none;
	font-size: var(--font-size-link);
	font-weight: var(--font-weight-base);
	font-family: var(--font-family);
        cursor: pointer;
}

/* Menu */
.menue_body {
	font-family: var(--font-family);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-normal);
	background-color: var(--color-bg);
	background-image: var(--bg-menue);
}

.menue_a:link {
	font-family: var(--font-family);
	color: var(--color-th-text);
	text-decoration: none;
	font-weight: var(--font-weight-normal);
}

.menue_a:hover {
	font-family: var(--font-family);
	color: var(--color-th-text);
	text-decoration: underline overline;
	font-weight: var(--font-weight-normal);
}

.menue_table {
	font-family: var(--font-family);
	border-width: 5px;
	border-style: ridge;
	font-size: var(--font-size-base);
	width: 110px;
}

.menue_td {
	font-family: var(--font-family);
	font-size: var(--font-size-base);
}

.menue_td:hover {
	font-family: var(--font-family);
	font-size: var(--font-size-base);
	background-color: darkblue;
}

/* Form controls */
input {
	color: var(--color-text);
	font-family: var(--font-family);
	font-size: var(--font-size-base);
	text-align: center;
	background-color: var(--color-bg);
}

input[type="number"] {
    width: 75px;
}

select {
	font-family: var(--font-family);
	font-size: var(--font-size-base);
}

textarea {
	font-family: var(--font-family);
	color: var(--color-text);
	font-size: var(--font-size-base);
	background-color: var(--color-bg);
}

/* Tooltip */
.ttip {
	font-family: var(--font-family);
	border: 1px solid var(--border-color-default);
	font-size: var(--font-size-link);
	background-color: var(--color-tooltip-bg);
}

/* Buttons (legacy class) */
.knoepfe {
	font-family: var(--font-family);
	color: var(--color-text);
	font-size: var(--font-size-base);
	background-color: var(--color-bg);
}

/* Board */
.board_header {
	background-color: var(--color-board-header-bg);
	color: var(--color-board-header-text);
	text-align: center;
}

/* Tech tree */
.table_techtree {
	border-width: 1px;
	border-color: var(--border-color-default);
	border-style: solid;
	width: 80%;
	background-image: var(--bg-stars);
	padding: 3pt;
	margin: 3pt;
	border-radius: var(--radius-default);
	text-align: center;
}

/* ===== Battlewars: Techtree ===== */

.bw-divider{
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  margin: 18px auto;
  max-width: 1100px;
}

.bw-techtree{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 14px 24px;
}

.bw-techtree__header{
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.bw-techtree__title{
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: .3px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.bw-tt-spacer{ height: 14px; }

.bw-tt-grid{
  display: grid;
  gap: 12px;
}

/* responsive grids */
.bw-tt-grid--2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bw-tt-grid--4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bw-tt-grid--5{ grid-template-columns: repeat(5, minmax(0, 1fr)); }

@media (max-width: 980px){
  .bw-tt-grid--4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bw-tt-grid--5{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px){
  .bw-tt-grid--2,
  .bw-tt-grid--4,
  .bw-tt-grid--5{
    grid-template-columns: 1fr;
  }
}

/* cards */
.bw-tt-card{
  position: relative;
  padding: 12px 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  box-shadow: 0 12px 35px rgba(0,0,0,.25);
  overflow: hidden;
  min-height: 92px;
}

.bw-tt-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 300px at 10% 0%, rgba(255,255,255,.10), transparent 55%);
  pointer-events: none;
}

.bw-tt-card__title{
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.bw-tt-card__cost{
  display: inline-block;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);
  margin-bottom: 8px;
  white-space: nowrap;
}

.bw-tt-card__desc{
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  opacity: .95;
}

/* requirement lists */
.bw-tt-card__list{
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.4;
  opacity: .95;
}

/* variants (statt <font color=...>) */
.bw-tt-card--build .bw-tt-card__title{ color: #ff4b4b; }
.bw-tt-card--tech  .bw-tt-card__title{ color: #44d07a; }
.bw-tt-card--req   .bw-tt-card__title{ color: #6aa8ff; }


/* status / highlight */
.bw-text-red { color: #ff0000}
.bw-text-green { color: #00ff00; }
.bw-text-muted { color: #505050; }

/* table helper */
.bw-center { text-align: center; }
.bw-right { text-align: right; }

/* “headline”-artige Box wie vorher, nur ohne <font> */
.bw-banner {
  background: #000066;
  padding: 6px 10px;
}
.bw-banner .bw-banner-text {
  font-size: 14px; /* früher font size=2 */
  color: #ff0000;
  font-weight: 700;
  text-align: center;
}

/* Attack warning line */
.bw-attack-warning {
    display: block;          /* Sorgt dafür, dass es die volle Breite einnimmt */
    width: 100%;             /* Streckt das Element auf 100% */
    background-color: red;   /* Der rote Hintergrund */
    padding: 10px 0;         /* Macht den Balken "dicker" (oben/unten 10px) */
    text-align: center;      /* Zentriert den Text im roten Balken */
    font-weight: bold;       /* Macht die Schrift fett */
}
.bw-attack-warning a { text-decoration: none; }
.bw-attack-warning .bw-text-red { 
    color: white !important; 
    text-decoration: none;   /* Entfernt den Unterstrich */
    font-size: 1.2em;        /* Macht den Text etwas größer */
}

/* Cursor sicher */
.table_mh80 td a,
.table_mh80 td .playerlink {
  cursor: pointer;
}

/* Farben wie früher */
.name-weak { color: #007700; }
.name-vacation { color: #777777; }
.name-locked { color: orange; }

/* Optional: Link-Style */
.playerlink { text-decoration: none; }
.playerlink:hover { text-decoration: underline; }

.badge-online{
  display:inline-block;
  padding:2px 8px;
  font:700 10px/14px Verdana, Arial, sans-serif;
  letter-spacing:.5px;
  color:#d8ffd8;
  background:#0a5;
  border:1px solid #063;
  border-radius:2px;
  text-shadow:0 1px 0 rgba(0,0,0,.6);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25);
}

.badge-offline{
  display:inline-block;
  padding:2px 8px;
  font:700 10px/14px Verdana, Arial, sans-serif;
  letter-spacing:.5px;
  color:#ffd8d8;
  background:#a00;
  border:1px solid #600;
  border-radius:2px;
  text-shadow:0 1px 0 rgba(0,0,0,.6);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15);
}

.badge-inrepair{
  display:inline-block;
  padding:2px 8px;
  font:700 10px/14px Verdana, Arial, sans-serif;
  letter-spacing:.5px;
  color:#fff2d8;
  background:#c60;
  border:1px solid #840;
  border-radius:2px;
  text-shadow:0 1px 0 rgba(0,0,0,.6);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.2);
}

.mantis-badge {
    display: inline-flex;
    align-items: center;
    background-color: #2c3e50; /* Dunkles Blau-Grau */
    color: #ffffff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #34495e;
    font-family: sans-serif;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.mantis-badge:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    color: #00bc8c; /* Mantis-Grün beim Hover */
}

.badge-icon {
    font-size: 1.5em;
    margin-right: 12px;
}

.badge-text {
    font-size: 0.9em;
    line-height: 1.2;
}

.badge-text strong {
    color: #00bc8c; /* Hebt den Namen grün hervor */
}

/* Grundlayout */
.bw-layout {
    display: flex;
    width: 100%;
}

/* FIXES linkes Menü */
.bw-menu {
    position: fixed;
    top: 0;
    left: 0;

    width: 200px;
    height: 100vh;


    overflow-y: auto;
    z-index: 100;
}

/* Hauptinhalt rechts neben dem Menü */
.bw-content {
    margin-left: 200px; /* exakt Menübreite */
    flex: 1;
}

/* Container */
.bw-nav {
  width: 160px;              /* falls du links fix 200px nutzt */
  padding: 6px;
}

/* Gruppen als "Cards" */
.bw-nav-group {
  list-style: none;
  margin: 6px 0;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}

/* Links als Buttons */
.bw-nav-link {
  display: block;
  padding: 6px 6px;
  margin: 2px 0;
  text-align: center;

  color: #d0d0d0;
  text-decoration: none;
  font-weight: 600;

  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

.bw-nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.bw-nav-link:active {
  transform: scale(0.99);
}

.bg-red {
    background: red !important;
}

/* Logout etwas auffälliger */
.bw-nav-link--danger:hover {
  background: rgba(255,0,0,0.18);
}

/* Spendenbereich */
.bw-nav-donate {
  margin-top: 12px;
  text-align: center;
}

.bw-nav-donate img {
  border: 0;
  border-radius: 10px;
}

/* Aktiver Menüpunkt */
.bw-nav-link.is-active {
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  position: relative;
}

/* Oranger Balken links */
.bw-nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: #ff9900;
  border-radius: 2px;
}
.bw-nav-link.is-active:hover {
  background: rgba(255,255,255,0.14);
}

/* ===== Mitteilungen UI (neu, Battlewars-like) ===== */

.bw-btn{
  display:inline-block;
  padding:6px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.20);
  background: rgba(0,0,0,.35);
  color: var(--color-link);
  font-weight: 700;
  text-decoration:none;
}
.bw-btn:hover{ background: rgba(255,255,255,.08); color:#fff; }
.bw-btn--danger{ color:#ff6b6b; border-color: rgba(255,107,107,.35); }
.bw-btn--danger:hover{ background: rgba(255,107,107,.12); }
.bw-btn--disabled{ opacity:.55; pointer-events:none; }

.bw-input{
  border:1px solid rgba(255,255,255,.22);
  border-radius:10px;
  padding:6px 8px;
  background:#000;
  color: var(--color-text);
  width:100%;
  box-sizing:border-box;
  text-align:center;
}
.bw-input--small{ width:56px; }

.bw-textarea{
  width:100%;
  min-height:160px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:10px;
  padding:8px 10px;
  background:#000;
  color: var(--color-text);
  box-sizing:border-box;
  resize:vertical;
}

.bw-alert{
  margin:10px 0;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: #c0c0c0;
}
.bw-alert--ok{ border-color: rgba(0,255,0,.25); background: rgba(0,255,0,.06); }
.bw-alert--error{ border-color: rgba(255,80,80,.28); background: rgba(255,80,80,.06); }
.bw-alert--info{ border-color: rgba(80,160,255,.28); background: rgba(80,160,255,.06); }

.bw-tag{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  font-size:10px;
  margin-left:6px;
}
.bw-tag--premium{ border-color: rgba(255,215,0,.35); color:#ffe89a; }
.bw-tag--new{ border-color: rgba(255,200,80,.35); color:#ffd8a6; }

/* Layout */
.bw-mit-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 2px 10px;
}
.bw-mit-meta{ color:#c0c0c0; }
.bw-mit-pager{ display:flex; gap:6px; align-items:center; }

.bw-mit-grid{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap:12px;
}
@media (max-width: 980px){
  .bw-mit-grid{ grid-template-columns: 1fr; }
}

.bw-mit-grid.bw-mit-grid--single{
  grid-template-columns: 1fr !important;
}

.bw-mit-grid.bw-mit-grid--single .bw-mit-panel{
  width: 100%;
  max-width: none;
}


.bw-mit-panel{
  border:0px solid rgba(255,255,255,.12);
  border-radius:10px;
  background: rgba(255,255,255,.03);
  padding:10px;
}
.bw-mit-panel-title{
  color:#c0c0c0;
  font-weight:800;
  margin-bottom:8px;
  text-align:center;
}

.bw-mit-panel .table_mh80 {
    width: 80%;
    margin: 0 auto;
}

.bw-mit-label{ color:#c0c0c0; margin:10px 0 6px; }
.bw-mit-coords{ display:grid; grid-template-columns: repeat(3, 1fr); gap:8px; }
.bw-mit-checks{ display:flex; flex-direction:column; gap:6px; color:#c0c0c0; }
.bw-mit-checks label{ cursor:pointer; }
.bw-mit-actions{ margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* Nachricht */
.bw-mit-msg{
  display:grid;
  grid-template-columns: 70px 1fr;
  gap:10px;
  padding:10px;
  border-top:1px solid rgba(255,255,255,.10);
}
.bw-mit-msg:first-of-type{ border-top:0; }
.bw-mit-msg.is-unread{ background: rgba(255,255,255,.03); }

/* Nachrichten sollen immer volle Breite nutzen */
.bw-mit-msg--wide{
  width: 100%;
  max-width: none;
}

/* falls irgendwo "clamp" oder overflow hidden aktiv ist */
.bw-mit-msg--wide .bw-mit-text{
  max-height: none;
  overflow: visible;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* wichtig bei flex/grid layouts: verhindert "abgeschnitten" durch min-width:auto */
.bw-mit-msg--wide .bw-mit-body{
  min-width: 0;
  width: 100%;
}


.bw-mit-avatar{
  width:70px;height:70px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:10px;
  overflow:hidden;
  background: rgba(0,0,0,.25);
  display:flex; align-items:center; justify-content:center;
}
.bw-mit-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.bw-mit-avatar-fallback{ color:#c0c0c0; font-weight:800; }

/* Nachrichten haben keinen Avatar -> 1 Spalte */
.bw-mit-msg.bw-mit-msg--noavatar{
  grid-template-columns: 1fr;
}

/* optional: falls irgendwo min-width Probleme auftreten */
.bw-mit-msg.bw-mit-msg--noavatar .bw-mit-body{
  min-width: 0;
}


.bw-mit-text{
  margin-top:6px;
  line-height:1.45;
  color:#c0c0c0;
}

.bw-mit-forward{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
  color:#c0c0c0;
}

.bw-mit-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px;
  border-top:1px solid rgba(255,255,255,.10);
}
@media (max-width: 560px){
  .bw-mit-footer{ flex-direction:column; align-items:stretch; }
}

.game-icon {
  /* Größe und Form */
  width: 40px;
  height: 40px;
  border-radius: 5px;
  
  /* Der Glow-Effekt */
  /* Syntax: box-shadow: [H-Versatz] [V-Versatz] [Unschärfe] [Ausbreitung] [Farbe]; */
  box-shadow: 0 0 15px 2px rgba(0, 162, 255, 0.7);
  
  /* Optional: Ein feiner Rahmen passend zum Leuchten */
  border: 1px solid rgba(0, 162, 255, 0.5);
  
  /* Sanfter Übergang beim Laden oder Ändern */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
  /* Das hier zentriert den Text daneben vertikal */
  vertical-align: middle; 
  
  /* Ein kleiner Abstand zum Text */
  margin-right: 15px;
}

/* Kleiner Bonus: Effekt beim Drüberfahren mit der Maus */
.game-icon:hover {
  /* transform: scale(1.05); /* Bild wird minimal größer */
  /* box-shadow: 0 0 25px 5px rgba(0, 162, 255, 0.9); */
}

/* Nachrichten ohne Avatar → eine Spalte */
.bw-mit-msg--noavatar{
  grid-template-columns: 1fr;
}

/* verhindert Abschneiden bei Grid/Flex */
.bw-mit-msg--noavatar .bw-mit-body{
  width: 100%;
  min-width: 0;
}

/* Text darf immer umbrechen */
.bw-mit-msg--noavatar .bw-mit-text{
  white-space: normal;
  overflow-wrap: anywhere;
}

/* optionale Farben */
.bw-text-danger{ color:#ff4d4d; }
.bw-text-success{ color:#2ecc71; }


.bg-select {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.bg-select:hover {
  transform: scale(1.03);
  box-shadow: 0 0 10px rgba(0,0,0,.6);
}

.bg-wrapper {
  text-align: center;
}

.bg-wrapper h3 {
  margin-bottom: 15px;
}

.bg-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.bg-item {
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bg-title {
  font-weight: bold;
  font-size: 14px;
}

.bg-item button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.bg-item img {
  width: 100%;
  border: 1px solid black;
  box-sizing: border-box;
}

/* ==============================
   ASTEROIDEN GUI – SCOPED
   ============================== */

.bw-asteroiden-ui .bw-card{
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
}

.bw-asteroiden-ui .bw-card h3{
  margin: 0 0 10px 0;
  font-weight: bold;
}

/* GRID */
.bw-asteroiden-ui .bw-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}

.bw-asteroiden-ui .bw-grid-1{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* FIELDS */
.bw-asteroiden-ui .bw-field label{
  display: block;
  opacity: .9;
  margin-bottom: 4px;
  text-align: left;
}

.bw-asteroiden-ui .bw-field input,
.bw-asteroiden-ui .bw-field select{
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  outline: none;
  text-align: left; /* überschreibt dein globales center */
}

/* HELP TEXT */
.bw-asteroiden-ui .bw-help{
  opacity: .85;
  line-height: 1.3;
  margin-top: 6px;
}

/* ACTIONS */
.bw-asteroiden-ui .bw-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

/* BUTTON */
.bw-asteroiden-ui .bw-btn{
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}

.bw-asteroiden-ui .bw-btn:hover{
  background: rgba(255,255,255,.16);
  transform: translateY(-1px);
}

/* PILLS / BADGES */
.bw-asteroiden-ui .bw-pill{
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  opacity: .95;
}

.bw-asteroiden-ui .bw-pill.bw-ok{
  border-color: rgba(0,200,120,.35);
  background: rgba(0,200,120,.08);
}

.bw-asteroiden-ui .bw-pill.bw-warn{
  border-color: rgba(255,150,0,.35);
  background: rgba(255,150,0,.08);
}

/* ==============================
   STATUS MELDUNGEN – MARKANT
   ============================== */

.bw-asteroiden-ui .bw-msg{
  padding: 14px 16px;
  border-radius: 12px;
  font-size: .95rem;
  line-height: 1.4;
  margin-bottom: 14px;

  background: rgba(0,0,0,.55);
  border-left: 4px solid rgba(255,255,255,.35);
  border-top: 1px solid rgba(255,255,255,.15);
  border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(0,0,0,.6);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 6px 18px rgba(0,0,0,.35);

  color: #eee;
}

/* ERFOLG */
.bw-asteroiden-ui .bw-msg--ok{
  border-left-color: #3fd18b;
}

/* FEHLER */
.bw-asteroiden-ui .bw-msg--error{
  border-left-color: #d15a5a;
}

/* OPTIONAL: SYSTEM / INFO */
.bw-asteroiden-ui .bw-msg--info{
  border-left-color: #5aaad1;
}


/* RESPONSIVE */
@media (max-width: 700px){
  .bw-asteroiden-ui .bw-grid{
    grid-template-columns: 1fr;
  }
}


/* Das Widget */
.storage{
  display:flex;
  align-items:stretch;
  gap:10px;
  padding:8px 10px;
  border:1px solid #2a2a2a;
  border-radius:8px;
  background: rgba(255,255,255,0.03);
}

/* schmale Balken links/rechts */
.storage-bar{
  width:6px;
  border-radius:6px;
  position:relative;
  overflow:hidden;
  background: rgba(0,0,0,0.35);
  border:1px solid rgba(255,255,255,0.08);
}

/* Füllstand (wächst von unten nach oben) */
.storage-bar .fill{
  position:absolute;
  left:0; right:0;
  bottom:0;
  /* Farbverlauf: unten grün (leer) -> oben rot (voll) */
  background: linear-gradient(to top,
    #2ecc71 0%,
    #f1c40f 55%,
    #e74c3c 100%
  );
}

/* Inhalt Mitte */
.storage-content{
  flex:1;
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-width:0;
}
.storage-title{
  font-weight:bold;
  color:#fff;
  font-size:12px;
  opacity:0.95;
}
.storage-numbers{
  font-family: Verdana, Arial, sans-serif;
  font-size:12px;
  color:#dcdcdc;
  white-space:nowrap;
}

.btn_upgrade{
  margin-left:10px;
  padding:3px 10px;
  font-family: Verdana, Arial, sans-serif;
  font-size:11px;
  font-weight:bold;
  color:#ffffff;
  border:1px solid rgba(255,255,255,0.18);
  background: linear-gradient(#3b4f73, #24324b);
  border-radius:7px;
  cursor:pointer;
}

.btn_upgrade:hover{
  filter: brightness(1.15);
}

.upgrade_info{
  margin-top:4px;
  font-size:10px;
  color:#cfcfcf;
  opacity:0.9;
  line-height:1.25;
}

.upgrade_disabled{
  margin-left:8px;
  font-size:11px;
  color:#888;
}

.btn_running{
  background: linear-gradient(#666, #444);
  color:#ddd;
  cursor:default;
  opacity:0.9;
}

.btn_running:hover{
  filter:none;
}





/* ===== Layout/Overflow Fixes (global) ===== */

/* Einheitliches Box-Modell: verhindert "guckt raus" durch padding/border */
*, *::before, *::after { box-sizing: border-box; }

/* Tabellen nie breiter als der Viewport */
.table_mh80, .table_mh100, table { max-width: 100%; }
.table_mh80 { width: min(80%); } /* optional: angenehme Obergrenze */
@media (max-width: 980px){
  .table_mh80 { width: 100%; }
}

/* ===== Mitteilungen: robuste Grid-Regeln ===== */

/* Grid-Items dürfen schrumpfen, sonst erzeugt 1fr Overflow */
.bw-mit-grid, .bw-mit-panel, .bw-mit-msg, .bw-mit-body { min-width: 0; max-width: 100%; }

/* Nachrichten ohne Avatar: immer 1 Spalte */
.bw-mit-msg.bw-mit-msg--noavatar { grid-template-columns: 1fr; }

/* Text umbrechen – verhindert abgeschnittene Zeilen */
.bw-mit-text { overflow-wrap: anywhere; white-space: normal; }

/* Optional: wenn du keine horizontale Scrollbar willst (nur wenn sicher!) */
/* body { overflow-x: hidden; } */

