:root {
  --bg: #222830;
  --bg-elevated: #363b46;
  --bg-elevated-soft: #313641;
  --border-subtle: #424753;

  --accent: #800020;          /* Burgundy */
  --accent-soft: #3f0010;
  --accent-strong: #b00030;

  --text: #f5f5f7;
  --text-muted: #9fa1a8;
  --text-soft: #6f727b;

  --card-radius: 16px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-accent: 0 18px 55px rgba(0, 0, 0, 0.85);

  --transition-fast: 0.16s ease-out;
  --transition-med: 0.22s ease-out;

  --font-main: "Montserrat Alternates", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(
    circle at top left,
    #14151a 0,
    #050608 55%,
    #020203 100%
  );
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Root Layout */
.app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Der gesamte sichtbare App-Inhalt liegt über der Hintergrund-Animation */
.tb-app-shell {
  position: relative;
  z-index: 1;
}

/* Header */
.tb-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: linear-gradient(
    135deg,
    rgba(12, 14, 18, 0.98),
    rgba(6, 7, 10, 0.98)
  );
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 20;
}

.tb-header-actions {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Linke Header-Aktionsleiste (View-Mode-Button) */
.tb-header-actions-left {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-titleblock {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-titletext {
  text-align: center;
}

.tb-titletext h1.tb-title {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tb-titletext .tb-subtitle {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-soft);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Main */
.tb-main {
  flex: 1;
  padding: 24px;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
}

/* Glas-Section */
.tb-section {
  background: rgba(12, 14, 20, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 22px 22px 26px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

/* Messages */
.tb-message {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text-muted);
}

.tb-message-error {
  border-color: rgba(255, 64, 64, 0.65);
  background: radial-gradient(
    circle at top left,
    rgba(255, 64, 64, 0.25),
    rgba(0, 0, 0, 0.3)
  );
  color: #ffd1d1;
}

.tb-message-hidden {
  display: none;
}

/* Footer */
.tb-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px 18px;
  font-size: 0.78rem;
  color: var(--text-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  background: radial-gradient(circle at bottom, #111318, #050608);
}

.tb-footer-separator {
  opacity: 0.5;
}

.tb-header-icon-btn {
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  padding: 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.tb-header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-strong);
  transform: translateY(-1px); /* kein translateY(-50%) mehr nötig */
}

.tb-header-icon-btn-hidden {
  display: none;
}

.tb-header-icon-btn-left {
  left: 20px;
  right: auto;
}

/* Responsive */
@media (max-width: 960px) {
  .tb-main {
    padding: 20px 16px;
  }
}

@media (max-width: 640px) {
  .tb-header {
    padding: 12px 12px;
  }

  .tb-main {
    padding: 16px 10px;
  }

  .tb-section {
    padding: 18px 14px 20px;
  }
}
