/* Hintergrundbild */
body {
  min-height: 100vh;
  min-width: 100vw;
  background: #111 url('public/assets/background.webp') no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  overflow-x: hidden;
}

:root {
  --game-scale: 1;
}

.game-scale-root {
  width: 100%;
  min-height: 100vh;
  zoom: var(--game-scale);
}

@supports not (zoom: 1) {
  .game-scale-root {
    transform: scale(var(--game-scale));
    transform-origin: top left;
    width: calc(100% / var(--game-scale));
    min-height: calc(100vh / var(--game-scale));
  }
}

.game-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(0, 234, 255, 0.12), transparent 42%),
    linear-gradient(rgba(6, 20, 28, 0.72), rgba(6, 20, 28, 0.82)),
    url('public/assets/background.webp') no-repeat center center fixed;
  background-size: cover;
  backdrop-filter: blur(2px);
}

.game-scale-root-preload-hidden {
  visibility: hidden;
}

.game-boot-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid rgba(0, 234, 255, 0.45);
  background: rgba(12, 36, 50, 0.95);
  box-shadow: 0 0 18px rgba(0, 234, 255, 0.2);
}

.game-boot-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(0, 234, 255, 0.22);
  border-top-color: #00eaff;
  border-radius: 50%;
  animation: gameBootSpin 0.9s linear infinite;
}

.game-boot-text {
  color: #dff8ff;
  font-weight: 600;
  letter-spacing: 0.2px;
}

@keyframes gameBootSpin {
  to { transform: rotate(360deg); }
}

.overview-settlement-main {
  border-color: #00eaffaa;
  box-shadow: 0 0 8px #00eaff55;
}

/* Übersicht (neues Dashboard-Design) */
.overview-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.overview-hero-content,
.overview-stat-box,
.overview-panel {
  background: rgba(12, 36, 50, 0.9);
  border: 1px solid rgba(0, 234, 255, 0.35);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.12);
}

.overview-hero-content {
  padding: 14px;
}

.overview-kicker {
  color: #8dd7e8;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.overview-title {
  color: #dff8ff;
  margin: 0 0 6px 0;
  font-size: 1.35rem;
}

.overview-subtitle {
  color: #a9cfda;
  margin: 0;
}

.overview-hero-stats {
  display: grid;
  gap: 10px;
}

.overview-city-image-wrap {
  background: rgba(6, 22, 35, 0.68);
  border: 1px solid #00eaff55;
  border-radius: 12px;
  padding: 8px;
}

.overview-city-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.overview-stat-box {
  padding: 10px 12px;
  color: #dff8ff;
}

.overview-stat-box-accent {
  border-color: rgba(0, 234, 255, 0.7);
}

.overview-dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

.overview-panel {
  padding: 12px;
}

.overview-panel-wide {
  grid-row: span 2;
}

#socialBtn {
  position: relative;
}

.overlay-panel-window .form-control,
.overlay-panel-window .form-control-sm,
.overlay-panel-window textarea {
  background: rgba(34, 74, 96, 0.96) !important;
  color: #dff8ff !important;
  border: 1px solid #00eaff66 !important;
}

.overlay-panel-window .form-control::placeholder,
.overlay-panel-window textarea::placeholder {
  color: #8bc8d8 !important;
}

.overlay-panel-window .form-label {
  color: #9be8ff;
  font-size: 0.83rem;
}

.overlay-panel-backdrop {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  background: transparent !important;
  pointer-events: auto;
  padding-top: 54px !important;
  padding-left: 16px !important;
}

.overlay-panel-window {
  pointer-events: auto;
  width: min(620px, 94vw);
  height: 60vh;
  max-height: 60vh;
  min-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px 10px 14px;
  border-radius: 10px;
  background: rgba(10, 30, 40, 1) !important;
}

.overlay-panel-window-message {
  width: min(560px, 94vw);
}

.overlay-panel-window-friends {
  width: min(560px, 94vw);
}

.compact-list {
  max-height: 14vh;
  overflow-y: auto;
}

.overlay-panel-window h5,
.overlay-panel-window h6 {
  margin-bottom: 6px;
}

.overlay-panel-window .custom-modal-close {
  min-width: 32px;
  padding: 4px 10px;
}

.social-switch .btn {
  padding: 2px 8px;
  font-size: 0.78rem;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  flex: 0 0 112px;
  text-align: center;
  box-sizing: border-box;
}

.modal-fixed-tabs .btn {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  flex: 0 0 104px;
  text-align: center;
  box-sizing: border-box;
}

/* Login/News-Box */
.login-mainbox {
  width: 1080px;
  max-width: 98vw;
  background:
    linear-gradient(180deg, rgba(8, 27, 38, 0.96) 0%, rgba(8, 20, 30, 0.9) 100%);
  border-radius: 22px;
  box-shadow: 0 0 32px 8px #00eaff66, 0 8px 32px 0 rgba(31, 38, 135, 0.22);
  border: 2.5px solid #00eaff; 
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  margin: 40px auto;
}
.login-hero {
  padding: 28px 26px 18px;
  color: #dff8ff;
  background:
    radial-gradient(circle at top center, rgba(0, 234, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(9, 36, 48, 0.94), rgba(8, 21, 31, 0.88));
  border-bottom: 1px solid rgba(0, 234, 255, 0.2);
}
.hero-logo-wrap {
  margin-bottom: 10px;
}
.hero-logo {
  height: 104px;
  width: auto;
  border-radius: 10px;
  filter: drop-shadow(0 0 16px rgba(0, 234, 255, 0.3));
}
.hero-kicker,
.section-kicker,
.timeline-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 234, 255, 0.35);
  background: rgba(0, 234, 255, 0.08);
  color: #8de9ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-title {
  margin: 14px 0 10px;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
}
.hero-subtitle,
.section-text,
.news-copy {
  color: #a7d8e4;
  max-width: 780px;
  margin: 0 auto;
}
.feature-card {
  height: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 234, 255, 0.2);
  background: rgba(5, 22, 33, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 18px rgba(0, 234, 255, 0.08);
}
.feature-card h5 {
  color: #ecfdff;
  margin: 12px 0 8px;
  font-size: 1rem;
}
.feature-card p {
  color: #9ec9d5;
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.45;
}
.feature-badge,
.news-chip,
.patch-tag,
.update-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.feature-badge,
.news-chip {
  background: rgba(0, 234, 255, 0.12);
  color: #92eeff;
  border: 1px solid rgba(0, 234, 255, 0.3);
}
.login-area {
  border-right: 1.5px solid rgba(255,255,255,0.08);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset -1px 0 0 rgba(0, 234, 255, 0.12);
}
.news-area {
  min-height: 460px;
  color: #fff;
  font-size: 1.05em;
  background: rgba(6, 21, 31, 0.55);
}
.login-panel,
.update-highlight,
.timeline-card,
.outlook-card {
  border: 1px solid rgba(0, 234, 255, 0.18);
  border-radius: 16px;
  background: rgba(8, 30, 42, 0.72);
  box-shadow: 0 0 18px rgba(0, 234, 255, 0.08);
}
.login-panel {
  padding: 18px;
}
.section-heading h4 {
  color: #f4fdff;
}
.news-title {
  color: #fff;
  letter-spacing: 0.02em;
}
.update-highlight,
.timeline-card,
.outlook-card {
  padding: 16px;
}
.update-version {
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.32);
  color: #86efac;
}
.patch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.patch-card {
  padding: 14px;
  border-radius: 12px;
  background: rgba(2, 18, 27, 0.74);
  border: 1px solid rgba(0, 234, 255, 0.12);
}
.patch-card strong {
  display: block;
  margin: 10px 0 6px;
  color: #f1fdff;
}
.patch-card p,
.timeline-entry p,
.outlook-card p {
  margin: 0;
  color: #a3ced9;
  font-size: 0.92rem;
  line-height: 1.45;
}
.patch-tag-new {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.32);
}
.patch-tag-balance {
  background: rgba(250, 204, 21, 0.14);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.28);
}
.news-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timeline-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timeline-entry {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
}
.timeline-entry strong {
  display: block;
  color: #f3fdff;
  margin-bottom: 4px;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: #00eaff;
  box-shadow: 0 0 12px rgba(0, 234, 255, 0.75);
}
.outlook-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.news-chip-muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #c8eef5;
}

/* Eingabefelder, Labels, Fehlermeldungen */
.login-input {
  background: rgba(255,255,255,0.22) !important;
  color: #fff !important;
  border: 2px solid #00eaff !important;
  border-radius: 8px !important;
  box-shadow: 0 0 8px #00eaff55;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-input:focus {
  background: rgba(255,255,255,0.34) !important;
  border-color: #00eaff !important;
  color: #212121 !important;
  box-shadow: 0 0 16px #00eaffbb;
}
.login-label {
  color: #fff !important;
  font-weight: 500;
  opacity: 0.95;
  padding-left: 0.1em;
  margin-bottom: 0.25em;
}
.login-message {
  min-height: 24px;
  color: #ffb300;
  text-align: center;
  margin-top: 8px;
  font-size: 1em;
}
.forgot-link {
  color: #fff;
  font-size: 0.97em;
  text-decoration: none;
}
.forgot-link:hover {
  color: #00eaff;
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  .login-mainbox {
    width: 96vw;
  }

  .login-area {
    border-right: none;
    border-bottom: 1.5px solid rgba(255,255,255,0.08);
    box-shadow: none;
  }

  .patch-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .login-hero {
    padding: 22px 18px 16px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .login-area,
  .news-area {
    min-height: auto;
  }

  .login-panel,
  .update-highlight,
  .timeline-card,
  .outlook-card {
    padding: 14px;
  }
}

/* Buttons */
.btn-login {
  background: linear-gradient(90deg, #00eaff 0%, #0050c8 100%);
  color: #fff;
  font-weight: bold;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  margin-top: 8px;
  padding: 8px 18px;
  border: none;
  box-shadow: 0 0 8px #00eaff55;
}
.btn-login:hover {
  background: linear-gradient(90deg, #00ffff 0%, #0050c8 100%);
  color: #fff;
}
.btn-register {
  background: linear-gradient(90deg, #ffe082 0%, #ff9800 100%);
  color: #212121;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  box-shadow: 0 0 8px #ffb30055;
  transition: background 0.2s, color 0.2s;
}
.btn-register:hover {
  background: linear-gradient(90deg, #ffd54f 0%, #ff9800 100%);
  color: #fff;
}
.btn-danger {
  background: #f44336;
  color: #fff;
  border: none;
  border-radius: 8px;
  margin-left: 8px;
  padding: 8px 18px;
  font-weight: bold;
  box-shadow: 0 0 8px #f4433655;
}
.btn-danger:hover {
  background: #d32f2f;
}

.btn-cancel {
  background: #444;
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: background 0.2s;
}
.btn-cancel:hover {
  background: #666;
}

/* Ressourcenleiste */
.resourcebar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(10, 30, 40, 0.93);
  border-bottom: 2.5px solid #00eaff;
  box-shadow: 0 6px 32px 0 #00eaff22;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 52px;
  gap: 12px;
  overflow: hidden;
}

.resourcebar-left,
.resourcebar-right {
  flex: 0 0 auto;
}

.resourcebar-center {
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  justify-content: center !important;
  padding-bottom: 2px;
  text-align: center;
}

.resourcebar-center > * {
  flex: 0 0 auto;
}
.resourcebar-center .resource-item {
  margin: 0 12px;
  color: #fff;
  font-weight: 500;
  font-size: 1.08em;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(0,234,255,0.07);
  border: 1.5px solid #00eaff;
  box-shadow: 0 0 6px #00eaff33;
}
.resource-item .energie-delta-text.energie-positiv {
  color: #00eaff !important;
}
.resource-item .energie-delta-text.energie-warnung {
  color: gold !important;
}
.resource-item .energie-delta-text.energie-kritisch {
  color: red !important;
}
.resource-icon {
  width: 25px;
  height: 25px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  color: #00eaff;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover,
.icon-btn:focus {
  background: #00eaff22;
  color: #fff;
}

.icon-btn-active {
  background: #00eaff33 !important;
  box-shadow: 0 0 10px #00eaff99;
}
.icon-btn svg {
  fill: #00eaff;         /* Neonblau */
  color: #00eaff;        /* Für Fallback oder stroke */
  transition: fill 0.2s;
}

.icon-btn:hover svg,
.icon-btn:focus svg {
  fill: #fff;            /* Optional: Hover-Effekt */
}
.res-tooltip-title {
  font-weight: bold;
  color: #00eaff;
  margin-bottom: 6px;
}
#tooltip {
  position: fixed;
  min-width: 220px;
  background: rgba(20,30,40,0.97);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 1em;
  z-index: 9999;
  box-shadow: 0 0 8px #00eaff99;
  display: none;
}
.resourcebar-right .btn {
  margin-left: 8px;
}

.resourcebar-center::-webkit-scrollbar {
  height: 6px;
}

.resourcebar-center::-webkit-scrollbar-thumb {
  background: rgba(0, 234, 255, 0.35);
  border-radius: 999px;
}
.icon-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}
.icon-btn:hover {
  background: rgba(0,234,255,0.12);
}

.message-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff2a2a;
  color: #fff;
  font-size: 0.72em;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px #ff2a2a99;
}

/* Aktive Siedlung Anzeige in Ressourcenleiste */
.active-settlement-indicator {
  background: rgba(0, 234, 255, 0.12);
  border: 1px solid #00eaff55;
  border-radius: 8px;
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 90px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-right: 8px;
}

.active-settlement-indicator:hover {
  background: rgba(0, 234, 255, 0.22);
  border-color: #00eaff99;
}

.settlement-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}

.active-settlement-indicator #activeSettlementName {
  color: #dff8ff;
  font-weight: 600;
  font-size: 0.85em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.active-settlement-indicator .settlement-location {
  color: #8dd7e8;
  font-size: 0.7em;
}

/* Siedlung Umbenennen Button */
.settlement-rename-btn {
  background: transparent;
  border: none;
  color: #8dd7e8;
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.6;
}

.active-settlement-indicator:hover .settlement-rename-btn {
  opacity: 1;
}

.settlement-rename-btn:hover {
  color: #00eaff;
  background: rgba(0, 234, 255, 0.25);
}

/* Siedlung Umbenennen Modal */
.settlement-rename-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
}

.settlement-rename-dialog {
  background: rgba(12, 36, 50, 0.98);
  border: 1px solid #00eaff55;
  border-radius: 12px;
  padding: 20px;
  min-width: 280px;
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.3);
}

.settlement-rename-dialog h3 {
  color: #dff8ff;
  margin: 0 0 15px 0;
  font-size: 1.1em;
}

.settlement-rename-dialog input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #00eaff55;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: #dff8ff;
  font-size: 1em;
  margin-bottom: 10px;
}

.settlement-rename-dialog input:focus {
  outline: none;
  border-color: #00eaff;
  box-shadow: 0 0 5px rgba(0, 234, 255, 0.3);
}

.settlement-rename-dialog .hint {
  color: #8dd7e8;
  font-size: 0.8em;
  margin-bottom: 15px;
}

.settlement-rename-dialog .buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.settlement-rename-dialog .btn-cancel {
  background: transparent;
  border: 1px solid #8dd7e8;
  color: #8dd7e8;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.settlement-rename-dialog .btn-cancel:hover {
  background: rgba(141, 215, 232, 0.1);
}

.settlement-rename-dialog .btn-save {
  background: #00eaff33;
  border: 1px solid #00eaff;
  color: #dff8ff;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.settlement-rename-dialog .btn-save:hover {
  background: #00eaff55;
}

.settlement-rename-dialog .error-msg {
  color: #ff6b6b;
  font-size: 0.85em;
  margin-top: 5px;
}

.message-inbox-list {
  max-height: 56vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-item {
  border: 1px solid #00eaff55;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 234, 255, 0.05);
}

.message-item.unread {
  border-color: #ff6a6a;
  background: rgba(255, 80, 80, 0.08);
}

.message-body {
  margin-top: 6px;
  white-space: normal;
  color: #d6f9ff;
  font-size: 0.95em;
}

.friends-list-box {
  max-height: 24vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(9, 28, 40, 0.65);
  border: 1px solid #00eaff33;
  border-radius: 8px;
  padding: 6px;
}

.friends-row {
  border: 1px solid #00eaff55;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(8, 33, 48, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.friends-row-column {
  flex-direction: column;
  align-items: stretch;
}

.friends-empty {
  color: #9cd8e8;
  background: rgba(34, 74, 96, 0.96);
  border: 1px solid #00eaff44;
  border-radius: 8px;
  padding: 10px 12px;
}

.report-detail-title {
  color: #dff8ff;
  font-weight: 700;
  margin-bottom: 8px;
}

.fleet-stock-grid,
.fleet-activity-list,
.fleet-result-list {
  display: grid;
  gap: 10px;
}

.fleet-stock-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.fleet-stock-card,
.fleet-activity-card,
.fleet-result-card {
  background: rgba(8, 33, 48, 0.85);
  border: 1px solid #00eaff44;
  border-radius: 10px;
  padding: 10px 12px;
  color: #dff8ff;
}

.fleet-stock-name,
.fleet-result-title,
.fleet-activity-title {
  color: #9eefff;
  font-weight: 700;
}

.fleet-stock-amount {
  font-size: 1.1em;
  font-weight: 700;
}

.fleet-activity-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.fleet-activity-timer {
  color: #65f0a4;
  font-weight: 700;
}

.fleet-activity-route {
  color: #d8f6ff;
  margin-bottom: 8px;
}

.fleet-activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fleet-activity-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 234, 255, 0.12);
  border: 1px solid #00eaff33;
  color: #c9f7ff;
  font-size: 0.82rem;
}

.fleet-result-body {
  color: #d7f3ff;
  margin-top: 4px;
}

.fleet-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.fleet-timeline-shell {
  width: 100%;
}

.fleet-timeline-track-wrap {
  position: relative;
  min-height: 92px;
  padding: 28px 12px 32px;
  overflow: visible;
  border-radius: 12px;
  background:
    radial-gradient(circle at center, rgba(0, 234, 255, 0.12) 0, rgba(0, 234, 255, 0.04) 26%, rgba(0, 0, 0, 0) 27%),
    repeating-linear-gradient(0deg, rgba(0, 234, 255, 0.08) 0, rgba(0, 234, 255, 0.08) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(90deg, rgba(0, 234, 255, 0.07) 0, rgba(0, 234, 255, 0.07) 1px, transparent 1px, transparent 24px),
    linear-gradient(180deg, rgba(4, 22, 34, 0.7), rgba(7, 18, 29, 0.5));
}

.fleet-timeline-axis,
.fleet-timeline-caption-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  color: #9bd7e6;
  font-size: 0.8rem;
  pointer-events: none;
  padding: 0 8px;
}

.fleet-timeline-axis {
  top: 6px;
}

.fleet-timeline-caption-row {
  bottom: 6px;
}

.fleet-timeline-track-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 234, 255, 0.35) 0%, rgba(0, 234, 255, 0.9) 50%, rgba(0, 234, 255, 0.35) 100%);
  box-shadow: 0 0 16px rgba(0, 234, 255, 0.18);
}

.fleet-timeline-track-line::before,
.fleet-timeline-track-line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #00eaff;
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.fleet-timeline-track-line::before {
  left: 0;
}

.fleet-timeline-track-line::after {
  right: 0;
}

.fleet-timeline-marker {
  position: absolute;
  top: calc(50% + var(--fleet-marker-offset, 0px));
  transform: translate(-50%, -50%);
  width: 44px;
  height: 13px;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8dd7e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  z-index: 2;
  box-shadow: none;
}

.fleet-timeline-marker[class*='mission-variant-'] {
  border-left-width: 0;
}

.fleet-timeline-marker-core {
  width: 40px;
  height: 9px;
  background-color: currentColor;
  -webkit-mask-image: url('img/test.png');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url('img/test.png');
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  box-shadow: 0 0 6px currentColor;
}

.fleet-timeline-marker:not(.mission-variant-return) .fleet-timeline-marker-core {
  transform: scaleX(-1);
}

.fleet-timeline-shell-compact .fleet-timeline-track-wrap {
  min-height: 84px;
}

.fleet-timeline-shell-compact .fleet-timeline-marker {
  width: 44px;
  height: 13px;
}

.fleet-timeline-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(280px, 72vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 234, 255, 0.4);
  background: rgba(6, 22, 35, 0.98);
  color: #dff8ff;
  text-align: left;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.14s ease, visibility 0.14s ease;
  z-index: 12;
}

.fleet-timeline-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(6, 22, 35, 0.98);
}

.fleet-timeline-marker:hover .fleet-timeline-tooltip,
.fleet-timeline-marker:focus-visible .fleet-timeline-tooltip {
  opacity: 1;
  visibility: visible;
}

.fleet-timeline-tooltip-title {
  color: #9eefff;
  font-weight: 700;
  margin-bottom: 6px;
}

.fleet-timeline-tooltip-line {
  color: #d6f6ff;
  font-size: 0.84rem;
  line-height: 1.35;
}

.fleet-timeline-overflow,
.fleet-timeline-empty {
  color: #9cd8e8;
  margin-top: 10px;
  font-size: 0.88rem;
}

.fleet-timeline-empty {
  text-align: center;
}

.mission-variant-default { border-left: 3px solid #8dd7e8; }
.mission-variant-transport { border-left: 3px solid #7ad3ff; }
.mission-variant-trade { border-left: 3px solid #65f0a4; }
.mission-variant-explore { border-left: 3px solid #f3d66c; }
.mission-variant-colonize { border-left: 3px solid #9eefff; }
.mission-variant-takeover { border-left: 3px solid #ffb36b; }
.mission-variant-combat { border-left: 3px solid #ff6b6b; }
.mission-variant-raid { border-left: 3px solid #b984ff; }
.mission-variant-return { border-left: 3px solid #6cc8ff; }
.fleet-timeline-marker.mission-variant-default { color: #8dd7e8; }
.fleet-timeline-marker.mission-variant-transport { color: #7ad3ff; }
.fleet-timeline-marker.mission-variant-trade { color: #65f0a4; }
.fleet-timeline-marker.mission-variant-explore { color: #f3d66c; }
.fleet-timeline-marker.mission-variant-colonize { color: #9eefff; }
.fleet-timeline-marker.mission-variant-takeover { color: #ffb36b; }
.fleet-timeline-marker.mission-variant-combat { color: #ff6b6b; }
.fleet-timeline-marker.mission-variant-raid { color: #b984ff; }
.fleet-timeline-marker.mission-variant-return { color: #6cc8ff; }
.fleet-timeline-marker.fleet-timeline-marker-foreign {
  filter: drop-shadow(0 0 7px rgba(255, 70, 170, 0.95));
}

.fleet-timeline-marker.fleet-timeline-marker-foreign::before {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(255, 70, 170, 0.95);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(255, 70, 170, 0.55);
  pointer-events: none;
}

.hs-rank-up {
  color: #3be87e;
  font-weight: 700;
}

.hs-rank-down {
  color: #ff6b6b;
  font-weight: 700;
}

.hs-rank-flat {
  color: #9cd8e8;
  font-weight: 700;
}

.hs-table-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.hs-mode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
  max-width: 780px;
  margin: 0 auto;
}

.hs-mode-btn {
  border: 1px solid #00eaff66;
  background: rgba(14, 44, 60, 0.9);
  color: #c8f7ff;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 600;
}

.hs-mode-btn.active,
.hs-mode-btn:hover {
  background: linear-gradient(90deg, #00eaff 0%, #0050c8 100%);
  color: #fff;
}

.hs-table {
  --bs-table-bg: rgba(22, 56, 74, 0.96);
  --bs-table-striped-bg: rgba(18, 48, 64, 0.96);
  --bs-table-hover-bg: rgba(28, 66, 86, 0.96);
  --bs-table-color: #dff8ff;
  --bs-table-border-color: rgba(0, 234, 255, 0.18);
  background: rgba(10, 30, 40, 0.9);
  border: 1px solid #00eaff55;
  border-radius: 10px;
  overflow: hidden;
  color: #dff8ff;
}

.hs-table th,
.hs-table td {
  padding: 0.5rem 0.65rem;
  border-color: rgba(0, 234, 255, 0.18) !important;
}

#highscoreList .hs-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.hs-table th + th,
.hs-table td + td {
  border-left: 1px solid rgba(0, 234, 255, 0.16);
}

.hs-table thead th {
  background: rgba(18, 52, 70, 0.95);
  color: #b8f2ff;
}

.hs-table tbody tr:nth-child(odd) { background: rgba(24, 60, 78, 0.95); }
.hs-table tbody tr:nth-child(even) { background: rgba(18, 50, 66, 0.95); }

.hs-table tbody tr:hover {
  background: rgba(0, 234, 255, 0.14);
}

.hs-row-me {
  outline: 1px solid #00eaffcc;
}

.hs-row-me td {
  background: rgba(0, 234, 255, 0.22) !important;
  color: #ffffff !important;
  font-weight: 700;
}

.hs-row-me td:first-child {
  box-shadow: inset 4px 0 0 #00eaff;
}

.hs-table th:nth-child(1),
.hs-table td:nth-child(1) {
  width: 56px;
}

.hs-table th:nth-child(2),
.hs-table td:nth-child(2) {
  width: 92px;
}

.hs-table th:nth-child(3),
.hs-table td:nth-child(3) {
  width: 300px;
}

.hs-table th:nth-child(4),
.hs-table td:nth-child(4) {
  width: 180px;
}

.hs-player-cell {
  padding-left: 18px !important;
}

/* Sidebar und Menü */
.profile-sidebar {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: rgba(14, 30, 40, 0.98);
  border-left: 3px solid #00eaff;
  box-shadow: -6px 0 32px #00eaff44;
  z-index: 2002;
  transition: right 0.3s cubic-bezier(.4,2,.2,1);
  padding: 0;
}
.profile-sidebar.open {
  right: 0;
}
.profile-sidebar-content {
  padding: 32px 24px 18px 24px;
  color: #fff;
}
.profile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.32);
  z-index: 2001;
  display: none;
}
.profile-sidebar.open + .profile-sidebar-backdrop,
.profile-sidebar-backdrop.open {
  display: block;
}

.mainpage-layout {
  display: flex;
  min-height: calc(100vh - 60px);
  width: 100vw;
  justify-content: center;
  align-items: flex-start;
  margin-top: 32px;
}
.menu-btn.disabled-tab {
  opacity: 0.5;
  pointer-events: auto; /* wichtig: erlaubt Hover! */
  cursor: not-allowed;
}

.menu-btn.disabled-tab:hover::after {
  content: attr(title);
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.85em;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 999;
}

.overview-bau-card {
  background-color: #1e1e2f;
  border: 1px solid #333;
  border-radius: 8px;
}

.overview-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 234, 255, 0.16), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(170, 80, 255, 0.20), transparent 48%),
    linear-gradient(135deg, rgba(11, 31, 45, 0.96), rgba(18, 44, 62, 0.96));
  border: 1px solid #00eaff44;
  box-shadow: 0 0 18px #00eaff33;
}

.overview-hero-left {
  display: grid;
  gap: 10px;
  align-content: start;
}

.overview-profile-grid {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: start;
}

.overview-profile-label {
  color: #8dd7e8;
  font-weight: 600;
}

.overview-profile-value {
  color: #e8fbff;
  text-align: right;
  min-width: 0;
}

.overview-profile-value-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.overview-profile-rank-link {
  background: none;
  border: none;
  color: #9eefff;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.overview-profile-rank-link:hover {
  color: #ffffff;
}

.overview-kicker {
  color: #9eefff;
  font-size: 0.9em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.overview-title {
  margin: 0;
  font-size: 2em;
  color: #ffffff;
  text-shadow: 0 0 14px #00eaff55;
}

.overview-subtitle {
  margin-top: 10px;
  color: #d4f8ff;
}

.overview-settlements-strip {
  background: rgba(10, 30, 45, 0.78);
  border: 1px solid #00eaff44;
  border-radius: 12px;
  padding: 8px;
}

.overview-settlements-title {
  display: flex;
  align-items: center;
  color: #dff8ff;
  font-weight: 600;
  margin-bottom: 8px;
}

.overview-settlements-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.overview-settlement-card {
  border: 2px solid #00eaff55;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(7, 22, 33, 0.9);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  min-height: 86px;
}

.overview-settlement-card:hover {
  border-color: #00eaffaa;
  box-shadow: 0 0 12px #00eaff44;
  transform: translateY(-2px);
}

.overview-settlement-card.overview-settlement-active {
  border-color: #00ff88;
  box-shadow: 0 0 16px #00ff8866, 0 0 4px #00ff88 inset;
}

.overview-settlement-card.overview-settlement-main .overview-settlement-name::before {
  content: '⭐ ';
}

.overview-settlement-card img {
  width: 100%;
  height: 54px;
  object-fit: cover;
  display: block;
}

.overview-settlement-name {
  padding: 4px 5px;
  font-size: 0.72em;
  color: #dff8ff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1200px) {
  .overview-settlements-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

  .overview-settlements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.overview-quick-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.overview-hero-stats {
  display: grid;
  gap: 10px;
}

.overview-stat-box {
  background: rgba(6, 22, 35, 0.68);
  border: 1px solid #00eaff55;
  border-radius: 12px;
  padding: 12px 14px;
  color: #e8fbff;
  font-size: 0.98em;
  min-height: 78px;
}

.overview-stat-box-accent {
  border-color: #6ce6ff;
  box-shadow: 0 0 10px #00eaff33 inset;
}

.overview-dashboard-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.overview-dashboard-stack {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.overview-panel {
  background: rgba(12, 28, 40, 0.92);
  border: 1px solid #00eaff33;
  border-radius: 14px;
  padding: 14px;
}

.overview-panel h4 {
  color: #8fefff;
  margin-bottom: 10px;
}

.overview-panel-wide {
  grid-row: span 2;
}

.overview-group h5 {
  color: #b5eeff;
  margin-top: 10px;
}

.overview-build-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.overview-cards {
  min-height: 112px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

#aktiveBoosts {
  min-height: 110px;
}

.overview-mini-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  text-align: center;
}

.overview-mini-icon-wrap {
  position: relative;
  width: 102px;
  height: 102px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
}

.overview-mini-icon-wrap.clickable {
  cursor: pointer;
}

.overview-mini-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overview-mini-timer {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
}

.overview-mini-name-inside {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.62);
  color: #dff9ff;
  font-size: 0.7em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.overview-mini-icon-wrap:hover .overview-mini-name-inside {
  white-space: normal;
  text-overflow: clip;
  overflow: visible;
  line-height: 1.1;
}
/* Horizontale Sidebar unter der Ressourcenleiste */
.sidebar-menu.horizontal-menu {
  width: calc(100% - var(--page-scrollbar-width, 0px));
  max-width: calc(100% - var(--page-scrollbar-width, 0px));
  box-sizing: border-box;
  background: rgba(10, 30, 40, 0.92);
  border-bottom: 2.5px solid #00eaff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 6px 32px 0 #00eaff22;
  align-items: center;
  justify-content: center;
  margin: 0 0 20px 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.sidebar-menu.horizontal-menu ul {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0 10px;
  min-width: 100%;
}
.sidebar-menu.horizontal-menu li {
  margin: 0;
  flex: 0 0 auto;
}

.sidebar-menu.horizontal-menu .menu-btn {
  white-space: nowrap;
}
.menu-btn {
  background: none;
  border: none;
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  padding: 9px 18px;
  border-radius: 8px;
  margin: 2px 0;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  cursor: pointer;
}
.menu-btn.active,
.menu-btn:hover {
  background: linear-gradient(90deg, #00eaff 0%, #0050c8 100%);
  color: #fff;
  box-shadow: 0 0 12px #00eaff99;
}

.mainpage-content {
  flex: 1 1 0;
  display: block;
  justify-content: center;
  align-items: flex-start;
}
.main-content-box {
  width: 60%;
  max-width: 98vw;
  background: rgba(20, 20, 30, 0.9);
  border-radius: 22px;
  box-shadow: 0 0 32px 8px #00eaff66;
  border: 2.5px solid #00eaff;
  padding: 36px 32px 28px 32px;
  color: #fff;
  margin: 32px auto;
}

/*Grids für Research und Buildings*/
.resource-grid, .research-grid, .building-grid {
  display: grid;
  max-width: 100%;
  gap: 10px;
  padding: 10px;
  justify-content: center;
  grid-template-columns: repeat(6, 1fr);
}

.grid-batch-pending {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.resource-card, .research-card, .building-card {
  background: rgba(20, 20, 30, 0.7);
  border-radius: 14px;
  box-shadow: 0 0 12px #00eaff77;
  padding: 10px;
  min-width: 120px;                   /* Mindestgröße */
  max-width: 200px;                   /* Maximalgröße (je nach Design) */
  width: 100%; 
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.resource-image-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 5 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(35, 49, 60, 0.95), rgba(22, 31, 39, 0.98));
}
.resource-img, .research-img, .building-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

.grid-card-image {
  transition: opacity 0.16s ease;
}
.resource-card.locked, .research-card.locked, .building-card.locked {
  background: rgba(255, 0, 0, 0.4);
  filter: grayscale(0.7);
  box-shadow: 0 0 10px red;
}
.resource-card.locked.active, .research-card.locked.active, .building-card.locked.active {
  border: 2px solid red;
  box-shadow: 0 0 10px red;
}
.building-card.locked-due-to-build, .resource-card.locked-due-to-build::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 0, 0.3),
    rgba(255, 255, 0, 0.3) 10px,
    rgba(255, 255, 0, 0.5) 10px,
    rgba(255, 255, 0, 0.5) 20px
  );
  z-index: 10;
  pointer-events: none;
}
.resource-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
  margin-top: 8px;
}
.resource-name, .research-name, .building-name {
  font-weight: bold;
  font-size: 1.08em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}
.resource-level, .research-level, .building-level {
  font-weight: bold;
  font-size: 1em;
  color: #b0eaff;
  margin-left: 8px;
  flex-shrink: 0;
}
.resource-card.active,
.research-card.active,
.building-card.active {
  border: 2px solid #00eaff;
  box-shadow: 0 0 10px #00eaff;
  outline-offset: 2px;
}
.locked-overlay {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(255, 0, 0, 0.4);
  z-index: 2;
  border-radius: 14px;
}

.resource-locked,
.bauzeit-overlay {
  pointer-events: none;
}

.bauzeit-overlay {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.3em;
  color: #fff;
  background: rgba(0,0,0,0.5);
  font-weight: bold;
  pointer-events: none;
  border-radius: 8px;
  z-index: 2;
}

/* Info-Box für Gebäude */
.resource-info-box, #resourceInfoBox {
  background: rgba(20, 35, 46, 0.97);
  border-radius: 14px;
  box-shadow: 0 0 18px #00eaff99;
  color: #fff;
  padding: 32px 32px 24px 32px;
  margin-bottom: 24px;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  display: block;
  font-size: 1.15em;
}

.infobox-flex {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.infobox-image img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 12px #0008;
  display: block;
}

.infobox-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  word-break: break-word;
}
.infobox-buttons {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  justify-content: space-between;
}
.infobox-buttons .btn-danger {
}
.infobox-buttons .btn-login {
}

@media (max-width: 900px) {
  .infobox-flex {
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    gap: 18px;
  }
  .infobox-image img {
    width: 100%;
    max-width: 320px;
    height: auto;
  }
  .infobox-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .infobox-buttons .btn-login,
  .infobox-buttons .btn-danger {
    width: 100%;
    margin-left: 0;
  }
}

/* Gemeinsame Modal-Basis */
.custom-modal-backdrop {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-modal-window {
  background: rgba(10, 30, 40, 1);
  border-radius: 12px;
  box-shadow: 0 0 16px 2px #00eaff99;
  border: 1px solid #00eaff99;
  padding: 32px 28px 20px 28px;
  min-width: 320px;
  max-width: 90vw;
  color: #fff;
  text-align: center;
  position: relative;
}
.custom-modal-window.modal-error, .custom-modal-window.modal-cancel {
  box-shadow: 0 0 16px 2px #ff003399;
  border: 1px solid #ff003399;
}
.custom-modal-window.modal-error {
  background: #3a2323;
}
.custom-modal-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 14px;
}
.custom-modal-message {
  margin-bottom: 22px;
}
.custom-modal-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 18px;
}
.custom-modal-close,
.custom-modal-confirm,
.custom-modal-cancel {
  border: none;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.custom-modal-close {
  background: #ff0033;
  color: #fff;
}
.custom-modal-close:hover {
  background: #c4001a;
}
.custom-modal-confirm {
  background: #ff0033;
  color: #fff;
}
.custom-modal-confirm:hover {
  background: #c4001a;
}
.custom-modal-cancel {
  background: #444a;
  color: #fff;
}
.custom-modal-cancel:hover {
  background: #666;
}

.admin-tab { 
  display: none; margin-top: 20px; 
}
.admin-tab.active {
  display: block; 
	}
.admin-tab-button { 
  margin-right: 10px; 
}
.section-separator {
  margin-top: 40px;
  margin-bottom: 20px;
  border-top: 2px solid #00eaff55;
  padding-top: 10px;
}
.admin-form-row {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.admin-form-label {
  flex: 0 0 220px;
  font-size: 1.2em;
  font-weight: bold;
  color: #00eaff;
  text-shadow: 0 0 4px #000;
}
.admin-form-input {
  flex: 1;
  max-width: 400px;
  font-size: 1.1em;
  padding: 12px;
}

/*Media Queries für Responsivität*/
@media (max-width: 900px) {
  .login-mainbox {
    flex-direction: column;
    width: 98vw;
  }
  .login-area, .news-area {
    border-right: none;
    min-height: unset;
  }
  .resources-grid {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .resource-card {
    width: 98vw;
    max-width: 350px;
  }
}
@media (max-width: 1200px) {
  .sidebar-menu.horizontal-menu ul {
    justify-content: flex-start;
    min-width: max-content;
  }

  .mainpage-layout {
    flex-direction: column;
    align-items: center;
    margin-top: 18px;
  }
  .sidebar-menu {
    margin-right: 0;
    margin-bottom: 18px;
    width: 100%;
    max-width: none;
  }
  .main-content-box {
    width: 98vw;
    padding: 18px 4vw 12px 4vw;
  }

  .overview-hero {
    grid-template-columns: 1fr;
  }

  .overview-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .overview-build-columns {
    grid-template-columns: 1fr;
  }

  .overview-panel-wide {
    grid-row: auto;
  }
}
@media (max-width: 700px) {
  .resourcebar {
    gap: 8px;
  }

  .resourcebar-center .resource-item {
    margin: 0 6px;
  }

  .resourcebar-center .resource-item {
    font-size: 0.98em;
    padding: 2px 6px;
    margin: 0 4px;
  }
  .sidebar-menu {
    padding: 12px 0;
  }
  .main-content-box {
    padding: 10px 2vw 8px 2vw;
  }
}

/* ===================== */
/* Merchant / Handel UI  */
/* ===================== */
.merchant-section-title {
  color: #00eaff;
  font-size: 1.2em;
  font-weight: bold;
  margin: 20px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #00eaff44;
}
.merchant-section-premium {
  color: #e0a0ff;
  border-bottom-color: #e0a0ff44;
}

.merchant-premium-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px 0;
}

.merchant-premium-header .merchant-section-title {
  margin: 0;
  flex: 1 1 auto;
}

/* Obere + untere Reihe */
.merchant-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.merchant-row-premium {
  grid-template-columns: repeat(4, 1fr);
}
.merchant-premium-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.merchant-unlock-area {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.merchant-unlock-status {
  color: #c8a8ff;
  font-size: 0.9em;
  font-weight: 600;
}

.merchant-unlock-countdown {
  color: #e8d6ff;
  font-size: 0.82em;
  opacity: 0.9;
}

.merchant-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #c090ff;
  color: #e8d6ff;
  font-size: 0.75em;
  font-weight: 700;
  cursor: help;
  user-select: none;
  background: rgba(144, 80, 204, 0.22);
}
.merchant-row-premium {
  flex: 1 1 auto;
  min-width: 0;
}

/* Karten */
.merchant-card {
  background: rgba(20, 30, 46, 0.92);
  border: 1.5px solid #00eaff66;
  border-radius: 14px;
  box-shadow: 0 0 10px #00eaff33;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: box-shadow 0.2s;
}
.merchant-card:hover {
  box-shadow: 0 0 18px #00eaff88;
}

/* Ressourcen-Icons im Trade */
.merchant-card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 8px 0;
}
.merchant-res {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.05em;
  font-weight: 600;
  color: #fff;
}
.merchant-res-icon {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(0, 234, 255, 0.08);
  padding: 4px;
  box-shadow: 0 0 6px #00eaff33;
}
.merchant-arrow {
  font-size: 1.6em;
  color: #00eaff;
  font-weight: bold;
  margin: 0 4px;
}

.merchant-card-ratio {
  font-size: 1.15em;
  font-weight: bold;
  color: #00eaff;
  background: rgba(0, 234, 255, 0.12);
  border-radius: 6px;
  padding: 3px 16px;
  text-align: center;
}
.merchant-ratio-good {
  color: #44ff88;
  background: rgba(68, 255, 136, 0.12);
  box-shadow: 0 0 6px #44ff8833;
}

.merchant-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.merchant-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.merchant-input-row label {
  color: #aaa;
  font-size: 1em;
  white-space: nowrap;
}
.merchant-input {
  width: 90px;
  padding: 8px 10px;
  font-size: 1.1em;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1.5px solid #00eaff;
  border-radius: 8px;
  box-shadow: 0 0 6px #00eaff33;
  text-align: center;
}
.merchant-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 12px #00eaffaa;
}
.merchant-trade-btn {
  width: 100%;
  margin-top: 4px;
  padding: 10px 0;
  font-size: 1.1em;
}

/* Premium gesperrte Karten */
.merchant-card-premium-locked {
  background: rgba(40, 28, 50, 0.85);
  border-color: #9050cc55;
  box-shadow: 0 0 8px #9050cc22;
  filter: grayscale(0.4);
  opacity: 0.75;
  pointer-events: none;
}
.merchant-card-premium-locked .merchant-arrow {
  color: #9050cc;
}
.merchant-card-premium-locked .merchant-card-ratio {
  background: rgba(144, 80, 204, 0.15);
  color: #c090ff;
}
.merchant-card-empty .merchant-card-visual {
  min-height: 70px;
  justify-content: center;
}
.merchant-lock-info {
  color: #c090ff;
  font-size: 0.95em;
  text-align: center;
  padding: 6px 0;
}
.merchant-card-unavailable {
  opacity: 0.6;
  filter: grayscale(0.3);
}
.merchant-card-unavailable .merchant-lock-info {
  color: #ff8888;
}

/* Unlock-Button-Bereich */
.merchant-unlock-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(40, 28, 50, 0.7);
  border: 2px dashed #c090ff;
  border-radius: 14px;
  padding: 20px 24px;
  min-width: 130px;
  max-width: 260px;
  text-align: center;
  height: auto;
}
.merchant-unlock-icon {
  font-size: 2.2em;
}
.merchant-unlock-text {
  color: #c8a8ff;
  font-size: 0.95em;
  font-weight: 600;
  line-height: 1.3;
}
.merchant-unlock-btn {
  background: linear-gradient(135deg, #9050cc 0%, #c060ff 100%);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 0.95em;
  box-shadow: 0 0 10px #c060ff55;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.merchant-unlock-btn:hover {
  background: linear-gradient(135deg, #a060dd 0%, #d080ff 100%);
  box-shadow: 0 0 16px #c060ff99;
}

.merchant-empty {
  color: #aaa;
  font-style: italic;
  padding: 14px 0;
  grid-column: 1 / -1;
}

@media (max-width: 1000px) {
  .merchant-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .merchant-row-premium {
    grid-template-columns: repeat(2, 1fr);
  }
  .merchant-premium-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .merchant-premium-row { flex-direction: column; }
  .merchant-unlock-area { justify-content: center; }
}
@media (max-width: 600px) {
  .merchant-row,
  .merchant-row-premium {
    grid-template-columns: 1fr;
  }
}

.tiefengrund-section {
  position: relative;
}

.tiefengrund-panel {
  min-height: 70vh;
}

.tiefengrund-summary-card,
.tiefengrund-detail-box-inner,
.tiefengrund-range-box {
  background: rgba(7, 25, 36, 0.72);
  border: 1px solid rgba(0, 234, 255, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  color: #dff8ff;
}

.tiefengrund-controls {
  display: grid;
  gap: 12px;
}

.tiefengrund-control-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.tiefengrund-info-card {
  background: rgba(7, 25, 36, 0.72);
  border: 1px solid rgba(0, 234, 255, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  color: #dff8ff;
}

.tiefengrund-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiefengrund-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dff8ff;
  min-height: 38px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #dff8ff;
}

.legend-player,
.tile-player { background: rgba(32, 118, 255, 0.24); }
.legend-npc,
.tile-npc { background: rgba(0, 208, 184, 0.22); }
.legend-pirate,
.tile-pirate { background: rgba(255, 99, 71, 0.24); }
.legend-abandoned,
.tile-abandoned { background: rgba(132, 184, 82, 0.22); }
.legend-destroyed,
.tile-destroyed { background: rgba(121, 121, 121, 0.24); }
.legend-raid,
.tile-raid { background: rgba(162, 74, 255, 0.28); }
.legend-unknown,
.tile-unknown { background: rgba(58, 79, 97, 0.34); }

.tiefengrund-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.tiefengrund-tile {
  min-height: 96px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(0, 234, 255, 0.22);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  padding: 10px;
  color: #e8fbff;
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.tiefengrund-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(0, 234, 255, 0.16);
}

.tiefengrund-tile.selected {
  border-color: rgba(0, 234, 255, 0.95);
  box-shadow: 0 0 16px rgba(0, 234, 255, 0.34);
}

.tiefengrund-tile.own-settlement {
  outline: 2px solid rgba(255, 255, 255, 0.22);
}

.tile-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: #9aefff;
}

.tile-name {
  font-weight: 700;
  line-height: 1.2;
}

.tile-meta {
  font-size: 0.76rem;
  color: #b7d9e2;
}

.tiefengrund-raid-row {
  display: flex;
  justify-content: center;
}

.tiefengrund-raid-tile {
  width: min(420px, 100%);
}

.tiefengrund-mission-board {
  width: 100%;
}

.tiefengrund-mission-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tiefengrund-mission-summary {
  color: #dff8ff;
  font-weight: 600;
}

.tiefengrund-mission-list {
  display: grid;
  gap: 8px;
}

.tiefengrund-mission-row {
  padding: 10px 12px;
  border: 1px solid rgba(0, 234, 255, 0.18);
  border-radius: 10px;
  background: rgba(6, 22, 35, 0.58);
}

.tiefengrund-mission-main {
  color: #e8fbff;
  font-weight: 600;
  margin-bottom: 2px;
}

.tiefengrund-mission-row-inline {
  padding: 8px 12px;
}

.tiefengrund-mission-inline-text {
  color: #dff8ff;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tiefengrund-mission-meta,
.tiefengrund-mission-empty {
  color: #b7d9e2;
  font-size: 0.9rem;
}

.tiefengrund-action-modal {
  position: fixed;
  inset: 0;
  z-index: 4200;
}

.tiefengrund-action-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 16, 24, 0.78);
}

.tiefengrund-action-window {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 234, 255, 0.28);
  background: rgba(10, 30, 40, 0.98);
  box-shadow: 0 0 24px rgba(0, 234, 255, 0.14);
}

.tiefengrund-action-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.tiefengrund-action-body {
  color: #dff8ff;
}

.tiefengrund-offer-line {
  color: #dff8ff;
}

.tiefengrund-detail-kicker {
  color: #88dff1;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.tiefengrund-detail-title {
  margin: 0 0 10px 0;
  color: #e8fbff;
}

.tiefengrund-detail-type {
  margin-bottom: 4px;
  color: #bde8f4;
}

.tiefengrund-detail-desc {
  color: #d9f6ff;
  margin: 10px 0 14px 0;
}

.tiefengrund-detail-meta {
  color: #caedf6;
  margin-bottom: 8px;
}

.tiefengrund-detail-good {
  color: #65f0a4;
  margin-bottom: 8px;
  font-weight: 600;
}

.tiefengrund-detail-warn {
  color: #ff9b8d;
  margin-bottom: 8px;
  font-weight: 600;
}

.tiefengrund-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiefengrund-trade-box {
  margin: 12px 0;
  display: grid;
  gap: 8px;
}

.tiefengrund-trade-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 234, 255, 0.16);
  border-radius: 10px;
  background: rgba(6, 22, 35, 0.58);
}

.tiefengrund-trade-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tiefengrund-trade-actions .form-control {
  width: 90px;
}

.tiefengrund-inline-select {
  min-width: 150px;
}

.tiefengrund-combat-select-grid {
  display: grid;
  gap: 8px;
}

.tiefengrund-combat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #dff8ff;
}

.tiefengrund-combat-row .form-control {
  width: 92px;
}

.widescreen-only-overlay {
  display: none !important;
}

@media (max-width: 1100px) {
  .tiefengrund-control-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

@media (max-width: 980px) {
  .tiefengrund-tile {
    min-height: 82px;
    padding: 8px;
  }

  .tile-name {
    font-size: 0.85rem;
  }

  .tile-meta,
  .tile-badge {
    font-size: 0.72rem;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .tiefengrund-grid {
    gap: 6px;
  }

  .tiefengrund-control-row {
    grid-template-columns: 1fr;
  }
}
