
:root {
  --color-bg: #111214;
  --color-bg-box: #191a1e;
  --color-bg-table: #16181b;
  --color-bg-input: #26272a;
  --color-bg-btn: #232326;
  --color-bg-btn-hover: #18181a;
  --color-bg-btn-active: #101012;
  --color-shadow-box: 0 14px 36px #000e;
  --color-shadow-header: 0 1px 24px #000e;
  --color-shadow-btn: 0 4px 14px #000a;
  --color-shadow-hover: 0 0 16px #8885;
  --color-text: #fff;
  --color-text-muted: #ccc;
  --color-text-light: #f2f2f2;
  --color-text-title: #fff;
  --color-green: #42ff6a;
  --color-green-dark: #13c838;
  --color-red: #ff2c1a;
  --color-grey: #888;
  --color-border: #222326;
  --color-border-grey: #444;
  --color-table-head: #18191e;
  --color-table-row-hover: #232328;
  --radius-box: 18px;
  --radius-btn: 18px;
  --radius-field: 12px;
  --font-family: 'Inter', Arial, Helvetica, sans-serif;

  /* Overlay-Chat & Header */
  --header-height: max(8vh, 56px);

  /* Feinjustage der vertikalen Position der Notice (negativ = leicht höher): */
  --notice-offset-y: -2.5vh;

  /* Accent für moderne Notice-Box */
  --notice-accent: #7aa2ff;

  /* Sidebar (NEU): dynamische Breite */
  --sidebar-width-min: 210px;
  --sidebar-width-vw: 13vw;
  --sidebar-width-max: 320px;

  /* Sidebar Offset */
  --sidebar-nav-offset: -6vh;
}

/* === GLOBAL === */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--color-bg);
}
body {
  color: var(--color-text);
  font-family: var(--font-family);
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
  letter-spacing: 0.01em;
  background: #111214;
}
body.no-scroll-search { overflow: hidden; }
body.ai-chat-open { overflow: hidden; }

/* A11y utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body *:not(#sidebar):not(#sidebar *) {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  #sidebar {
    transition: transform 0.2s ease-out !important;
  }
}

/* === HEADER === */
header {
  width: 100vw;
  height: 8vh;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--color-bg);
  z-index: 40000 !important;
  box-shadow: var(--color-shadow-header);
  user-select: none;
  backdrop-filter: blur(10px);
}
@media (max-width: 1100px) {
  header { height: 50px; min-height: 50px; }
}
.logo-menu-container {
  display: flex;
  align-items: center;
  position: relative;
  gap: 14px;
  padding-left: 14px;
}
.menu-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  outline: none;
  border-radius: 12px;
  transition: background 0.18s;
  padding: 6px;
}
.menu-toggle-btn:hover,
.menu-toggle-btn:focus {
  background: #222223;
  box-shadow: none;
}
.menu-toggle-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 3px;
}
.menu-toggle-icon svg {
  width: 32px;
  height: 32px;
  display: block;
  transition: filter 0.18s;
}
@media (max-width: 1100px) {
  .menu-toggle-icon svg { width: 28px; height: 28px; }
}
/* Burger Linien */
.menu-line {
  fill: #888;
  transition: fill .25s, transform .35s cubic-bezier(.7,.2,.2,1);
}
.menu-toggle-btn.active .menu-line {
  fill: #fff;
}
.logo {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
  margin-left: 0;
  z-index: 105;
  color: var(--color-text-title);
  text-shadow: 0 0 10px #fff2;
  transition: text-shadow 0.18s, filter 0.18s;
}
.logo:hover {
  text-shadow: 0 0 16px #fff3;
  filter: brightness(1.08);
}
@media (max-width: 1100px) {
  .logo { font-size: 1.5rem; letter-spacing: 0.05em; }
}

/* === ALWAYS-ON-TOP SAFETY === */
#search-modal-wrapper,
.search-modal-backdrop,
.search-modal,
.modal,
.modal-profile,
.modal-success,
.modal-backdrop,
#modal,
#modal-success,
#modal-profile,
#global-notice-root,
#watchlist-limit-notice,
.ai-chat-overlay,
#ai-chat-overlay {
  z-index: 30000 !important;
}

/* === CURRENCY SELECTOR === */
.currency-selector {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 310;
}
.currency-btn {
  background: var(--color-bg-btn);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 8px 18px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: var(--color-shadow-btn);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.16s, box-shadow 0.16s;
}
.currency-btn:hover,
.currency-btn:focus {
  background: var(--color-bg-btn-hover);
  outline: none;
}
.currency-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.currency-btn:active { background: var(--color-bg-btn-active); }
.currency-dropdown {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 6px 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg-box);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 10px 28px -8px #000d, 0 0 12px #1d283355;
  min-width: 160px;
  display: none;
  z-index: 300;
}
.currency-dropdown.open {
  display: flex;
  flex-direction: column;
}
.currency-dropdown li {
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s;
  color: #eee;
  white-space: nowrap;
}
.currency-dropdown li:hover,
.currency-dropdown li:focus {
  background: #232328;
  outline: none;
}
.currency-dropdown li[aria-selected="true"] {
  background: #232328;
  position: relative;
}

/* === LANGUAGE SELECTOR === */
.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 320;
}
.lang-btn {
  background: var(--color-bg-btn);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 14px 8px 14px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: var(--color-shadow-btn);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.16s, box-shadow 0.16s;
  min-width: 72px;
}
.lang-btn:hover,
.lang-btn:focus {
  background: var(--color-bg-btn-hover);
  outline: none;
}
.lang-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.lang-btn:active { background: var(--color-bg-btn-active); }
.lang-flag { font-size: 1.03rem; line-height: 1; display: inline-flex; }
.lang-flag-img {
  width: 26px; height: 18px; display: block; object-fit: cover;
  border-radius: 3px; box-shadow: 0 0 0 1px #222;
}
.lang-caret { font-size: 0.75rem; opacity: 0.9; }
.lang-dropdown {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 8px 10px;
  position: absolute;
  top: 100%; left: 0;
  background: var(--color-bg-box);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 10px 28px -8px #000d, 0 0 12px #1d283355;
  width: auto;
  min-width: unset;
  display: none;
  z-index: 310;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  font-size: 0.92rem;
  justify-content: center;
}
.lang-dropdown.open { display: flex; }
.lang-dropdown li {
  padding: 4px;
  font-size: 0;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, transform 0.14s;
  color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  border-radius: 10px;
  position: relative;
}
.lang-dropdown li img {
  width: 28px; height: 20px; object-fit: cover;
  border-radius: 3px; box-shadow: 0 0 0 1px #222;
}
.lang-dropdown li:hover,
.lang-dropdown li:focus { background: #232328; outline: none; }
.lang-dropdown li[aria-selected="true"] {
  background: #232328;
  box-shadow: 0 0 0 1px #2562e4, 0 0 8px #2562e455;
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: calc(100vh - var(--header-height));
  width: clamp(var(--sidebar-width-min), var(--sidebar-width-vw), var(--sidebar-width-max));
  background: #111214;
  z-index: 101;
  transform: translate3d(-100%, 0, 0);
  transition: transform 0.8s cubic-bezier(.25,.8,.25,1), box-shadow 0.25s, width 0.25s ease;
  will-change: transform;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0;
  box-shadow: 0 0 18px #0007;
}
.sidebar.open {
  transform: translate3d(0, 0, 0);
  background: #111214;
}
.sidebar nav {
  width: 100%;
  margin-top: var(--sidebar-nav-offset);
}
.sidebar nav ul { list-style: none; padding-left: 12px; }
.sidebar nav ul li {
  margin-bottom: 13px;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
  user-select: none;
  color: var(--color-text);
  border-radius: 8px;
  padding: 10px 19px;
  position: relative;
}
.sidebar nav ul li:hover {
  background: #222223;
  color: #fff;
}
.sidebar nav ul li:focus-visible,
.sidebar nav ul li:active,
.sidebar nav ul li.active,
.sidebar nav ul li[aria-current="page"] {
  background: #222223;
  color: #fff;
}
.sidebar nav ul li a,
.sidebar nav ul li a:visited {
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  display: inline-block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transition: color 0.14s;
}
.sidebar nav ul li:hover a,
.sidebar nav ul li:focus-visible a,
.sidebar nav ul li:active a,
.sidebar nav ul li.active a,
.sidebar nav ul li[aria-current="page"] a {
  color: #fff !important;
}
@media (max-width: 1100px){
  .sidebar{
    width: 230px;
    justify-content: flex-start;
    padding-top: 150px;
  }
  .sidebar nav{ margin-top: 0; }
}

/* === TOP-RIGHT === */
.top-right {
  margin-right: 3.8vh;
  display: flex;
  align-items: center;
  gap: 14px;
}
@media (max-width: 1100px) {
  .top-right { gap: 10px; margin-right: 10px; }
}

/* === PROFILE AVATAR === */
.profile-avatar-container { display: flex; align-items: center; }
.profile-avatar-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  outline: none;
  display: none;
  align-items: center;
  transition: box-shadow 0.17s;
}
.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
  display: block;
}
.profile-avatar-btn:focus .profile-avatar,
.profile-avatar-btn:hover .profile-avatar {
  border-color: #eaeaea;
  box-shadow: 0 1px 8px rgba(0,0,0,0.45);
}

/* === ACCOUNT SYMBOL === */
.acc-symbol-profile{
  width: 54px;
  height: 54px;
  margin-top: 0.3vh;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  border: none;
  margin-right: 10px;
  margin-left: 0.9vh;
  transform: translateX(1.3vh);
  box-shadow: none;
  display: block;
  cursor: pointer;
}
.profile-avatar-container:hover .acc-symbol-profile{
  filter: none;
}
@media (max-width: 1100px){
  .acc-symbol-profile{
    width: 42px;
    height: 42px;
    margin-right: 8px;
    margin-left: 0.6vh;
    transform: translateX(1.0vh);
    border-radius: 50%;
    border: none;
    box-shadow: none;
    cursor: pointer;
  }
}

/* === LOGIN BUTTON === */
.login-btn {
  background: var(--color-bg-btn);
  color: var(--color-text);
  border: none;
  border-radius: var(--radius-btn);
  padding: 8px 28px;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s, box-shadow 0.16s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-height: 40px;
  font-family: var(--font-family);
  box-shadow: var(--color-shadow-btn);
  letter-spacing: 0.03em;
  text-align: center;
}
.login-btn:hover,
.login-btn:focus {
  background: var(--color-bg-btn-hover);
  color: #fff;
  outline: none;
}
.login-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.login-btn:active { background: var(--color-bg-btn-active); }

/* === SEARCH BUTTON === */
.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
}
.search-btn svg {
  height: 26px;
  width: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2px;
  transition: stroke 0.16s;
}
.search-btn:hover svg,
.search-btn:focus svg { stroke: #fff; }

/* Entfernt im sichtbaren Header */
.top-right .search-btn { display: none !important; }
#login-btn { display: none !important; }

/* === MAIN LAYOUT === */
main {
  display: flex;
  flex-direction: row;
  width: 100vw;
  min-height: 100vh;
  margin-top: var(--header-height);
  background: var(--color-bg);
  overflow: visible;
}

/* === CENTER MENU WRAPPER / SIDE BOXEN (Basis) === */
.center-menu-wrapper {
  display: flex;
  flex-direction: row;
  width: 100vw;
  min-height: 100vh;
  background: var(--color-bg);
  position: relative;
  justify-content: center;
  align-items: flex-start;
  margin-top: 0;
  padding-top: 24px;
}
.side-box {
  flex: 0 0 53vh;
  width: 53vh;
  height: 50vh;
  background: var(--color-bg-box);
  border-radius: var(--radius-box);
  box-shadow: var(--color-shadow-box);
  color: var(--color-text);
  padding: 32px 26px 26px 26px;
  font-size: 1.09rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  border: 1.5px solid #222326;
  margin-top: 0;
}
.side-box.left { margin-left: 4vh; margin-right: 0; }
.side-box.right { margin-right: 4vh; margin-left: 0; }
.side-box-title {
  font-size: 1.17rem;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: 0.03em;
  color: var(--color-text-title);
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-box-list { list-style: none; margin: 0; padding: 0; width: 100%; }
.side-box-list li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 1.6vh;
  font-size: 1.01rem;
  padding: 4px 0;
  border-radius: 8px;
  background: none;
  transition: background 0.13s, box-shadow 0.13s;
}
.side-box-list li:hover,
.side-box-list li:focus,
.side-box-list li.active {
  cursor: pointer;
  background: #232328;
  box-shadow: 0 0 8px #2562e455;
}
.side-box-list li:focus-visible {
  background: #232328;
  box-shadow: 0 0 8px #2562e455;
}
.side-box-coin-icon {
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: none;
  margin-bottom: 0;
  margin-right: 10px;
  object-fit: cover;
  display: block;
  box-shadow: none;
  border: none;
}
@media (min-width: 1101px) {
  .side-box { padding-top: 22px; }
  .side-box-title { margin-bottom: 12px; }
  .side-box-coin-name-container {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    max-width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .side-box-coin-fullname {
    font-weight: 700;
    color: #fff;
    opacity: 0.96;
    font-size: 0.98rem;
  }
  .side-box-list li{
    display: grid;
    grid-template-columns: 24px minmax(0,1fr) 110px max-content;
    column-gap: 10px;
    align-items: center;
  }
  .side-box-coin-icon{ grid-column: 1; }
  .side-box-coin-name-container{ grid-column: 2; }
  .side-box-coin-info{
    grid-column: 3;
    justify-self: end;
    flex: 0 0 auto;
  }
  .side-box-coin-price{
    display: block;
    width: 110px;
    margin-left: 0;
    text-align: right;
  }
  .side-box-trend-graphic-vertical{
    grid-column: 4;
    justify-self: end;
    align-items: flex-end;
  }
  .side-box-list li {
    padding: 6px 10px;
    border: 1px solid transparent;
    transition: background .13s, box-shadow .13s, border-color .13s;
  }
  .side-box-list li:hover,
  .side-box-list li:focus,
  .side-box-list li.active {
    background: #232328;
    border-color: #2a2b2f;
    box-shadow: 0 0 0 1px #2a2b2f,
                0 2px 12px -6px rgba(0,0,0,0.45);
  }
  .side-box-list li:focus-visible {
    background: #232328;
    border-color: #2a2b2f;
    box-shadow: 0 0 0 1px #2a2b2f,
                0 2px 12px -6px rgba(0,0,0,0.45);
  }
}
.side-box-coin-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-width: 0;
  flex: 1 1 0;
  gap: 0;
}
.side-box-coin-symbol {
  font-weight: 700;
  text-align: left;
  min-width: 54px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0;
  color: #fff;
}
.side-box-coin-price {
  font-weight: 700;
  text-align: right;
  width: 100px;
  display: inline-block;
  margin-left: 18vh;
  color: #fff;
}
.side-box-trend-graphic-vertical {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  gap: 0;
  margin-left: auto;
}
.side-box-sparkline-vertical {
  width: 48px !important;
  height: 20px !important;
  display: block;
  margin: 0;
  padding: 0;
}
.side-box-trend-vertical {
  font-size: 0.95em;
  font-weight: 700;
  color: var(--color-green);
  margin: 0;
  padding: 0;
  text-align: right;
  line-height: 1.1;
  width: 100%;
}

/* === FILTERBAR & FAVORITEN === */
.top-filter-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 1vh 0 8px 0;
  padding: 0 0 4px 0;
  width: 100%;
}
.filter-btn {
  background: var(--color-bg-btn);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 6px 22px;
  font-size: 1.07rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, box-shadow 0.14s;
  box-shadow: var(--color-shadow-btn);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-height: 40px;
  gap: 6px;
  outline: none;
}
.filter-btn svg { width: 22px; height: 22px; vertical-align: middle; }
.filter-btn.active,
.filter-btn:focus,
.filter-btn:hover {
  background: var(--color-bg-btn-hover);
  color: #fff;
}
.filter-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.fav-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.12s;
}
.fav-btn svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: #fff;
}
.fav-btn.fav-active svg {
  fill: #ffd700;
  stroke: #ffd700;
  filter: drop-shadow(0 0 2px #ffd700);
}
@media (min-width: 1101px) {
  .fav-btn.fav-active svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.8)) !important;
  }
}
.fav-btn:focus,
.fav-btn:hover { background: #232328; }
.fav-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}

/* === CENTER MENU === */
.center-menu {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0px 4vw 4vw 4vw;
  width: 100%;
  font-size: 1.05rem;
}
.chat-center {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0;
}
.chat-headline {
  text-align: center;
  font-size: 3.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.03em;
  margin-bottom: 2.3rem;
  text-shadow: 0 0 6px #fff2;
  filter: brightness(1.05);
}
.custom-chat-info {
  font-size: 1.10rem;
  color: #ccc;
  margin-bottom: 7vh;
  text-align: center;
  font-weight: 500;
  line-height: 1.6;
  text-shadow: 0 0 6px #fff2;
  filter: brightness(1.05);
}
.chat-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #eee;
  letter-spacing: 0.03em;
  margin-bottom: 2.3vh;
  text-shadow: 0 0 8px #fff3;
}
.chat-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 34vw;
  background: transparent;
  z-index: 10;
  position: static;
  margin: 0 auto;
}
.chat-messages {
  width: 100%;
  min-height: 0;
  max-height: 17vh;
  overflow-y: auto;
  background: none;
  margin-bottom: 2.5vh;
  border-radius: 8px;
  font-size: 1.01rem;
  color: var(--color-text);
  padding: 2px 7px;
}

/* Chat input */
.chat-input-form,
.home-chat-input-form {
  width: 100%;
  background: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 0;
}
.chat-input-row,
.home-chat-input-row {
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--color-bg-input);
  border-radius: 32px;
  box-shadow: 0 2px 14px #10101044;
  padding: 10px 14px;
  gap: 8px;
  position: relative;
}

/* Markt-Zusammenfassung Button (Desktop) */
.home-chat-summary-btn {
  background: #2b2c2f;
  border: 1px solid #3a3c40;
  color: #d3d6d9;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.05);
  transition: background .18s, box-shadow .18s, color .18s, transform .18s;
}
.home-chat-summary-btn svg {
  stroke: currentColor;
  width: 58%;
  height: 58%;
}
.home-chat-summary-btn:hover {
  background: #323438;
  color: #ffffff;
  box-shadow: 0 4px 12px -2px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.06);
}
.home-chat-summary-btn:active {
  transform: scale(.94);
  box-shadow: 0 2px 8px -2px rgba(0,0,0,.75), inset 0 0 0 1px rgba(255,255,255,.08);
}
.home-chat-summary-btn:focus-visible,
.home-chat-send-btn:focus-visible,
.chat-send-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
@media (min-width: 1101px) {
  .home-chat-input-row {
    padding-left: 12px;
    padding-right: 12px;
  }
  .home-chat-input {
    padding-left: 2px;
  }
}

.chat-input,
.home-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.11rem;
  font-family: var(--font-family);
  padding: 6px 0;
  outline: none;
  text-shadow: 0 0 6px #fff3;
}
.chat-input::placeholder,
.home-chat-input::placeholder {
  color: #ccc;
  font-size: 1.03rem;
  opacity: 1;
}
.chat-send-btn,
.chat-mic-btn,
.home-chat-send-btn {
  background: var(--color-bg-btn);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 50%;
  transition: background 0.16s;
}
.chat-send-btn:hover,
.chat-mic-btn:hover,
.chat-send-btn:focus,
.chat-mic-btn:focus,
.home-chat-send-btn:hover,
.home-chat-send-btn:focus {
  background: var(--color-bg-btn-hover);
  outline: none;
}
.chat-send-btn:active,
.chat-mic-btn:active,
.home-chat-send-btn:active {
  background: var(--color-bg-btn-active);
}

/* === CRYPTO TABLE === */
.crypto-table {
  width: 191vh;
  margin: 8px 0 0 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.03rem;
  background: var(--color-bg-table);
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 8px 32px #191a1d77;
  position: relative;
  z-index: 0;
  border: 1.2px solid #222326;
}
@media (min-width: 1101px) {
  :root { --page-gutter: 4vh; }
  .crypto-table {
    width: calc(100vw - var(--page-gutter) - var(--page-gutter));
    max-width: calc(100vw - var(--page-gutter) - var(--page-gutter));
    margin-left: var(--page-gutter);
    margin-right: var(--page-gutter);
  }
}
.crypto-table th,
.crypto-table td {
  border: none;
  padding: 11px 10px;
  text-align: left;
  color: #f4f4f4;
  background: var(--color-bg-table);
  vertical-align: middle;
  white-space: nowrap;
  position: relative;
}
.crypto-table tr { position: relative; }
.crypto-table tr:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50px;
  right: 20px;
  bottom: 0;
  height: 0;
  border-bottom: 1px solid var(--color-border);
  pointer-events: none;
}
.crypto-table td {
  border-bottom: none !important;
  color: var(--color-text-muted);
  font-size: 1.03rem;
}
.crypto-table td.price-cell {
  color: #fff !important;
  font-weight: bold;
}
.crypto-table th {
  background: var(--color-table-head);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.05rem;
  border-bottom: 1.2px solid #222326;
  color: #fff;
}
.crypto-table tr:hover td {
  background: var(--color-table-row-hover);
  color: #fff;
}
.crypto-table tr:focus-within td,
.crypto-table tr:focus td {
  background: var(--color-table-row-hover);
  color: #fff;
}
.crypto-table td img {
  vertical-align: middle;
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 8px;
}
.crypto-table th:first-child,
.crypto-table td:first-child { padding-left: 26px; }
.crypto-table th:last-child,
.crypto-table td:last-child,
.crypto-table td.sparkline-cell {
  padding-right: 4vh !important;
  text-align: right !important;
}
.crypto-table th span[title] {
  cursor: help;
  font-size: 1.01em;
  color: #e2e2e2;
  margin-left: 4px;
}
.sparkline {
  display: inline-block;
  background: none;
  margin-right: 0;
  height: 3.5vw;
  border-radius: 0;
}
.sparkline.first { border-bottom-left-radius: 12px; }
.sparkline.last { border-bottom-right-radius: 12px; }
.sparkline:not(.clicked):hover,
.sparkline:not(.clicked):focus { cursor: pointer; }
.sparkline.clicked { cursor: default; }
.crypto-row-hoverable:hover,
.crypto-row-hoverable.hovered {
  cursor: pointer;
  background: #191a1d !important;
  box-shadow: 0 0 8px #2562e455;
  transition: background 0.13s, box-shadow 0.13s;
}
.crypto-row-hoverable:focus,
.crypto-row-hoverable:focus-within {
  background: #191a1d !important;
  box-shadow: 0 0 8px #2562e455;
}

/* Mobile Header-Höhe Override */
@media (max-width: 1100px) {
  :root { --header-height: 50px; }
}

/* === MODAL BACKDROP === */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(14px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.23s;
}
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* === SEARCHBAR MODE === */
.crypto-searchbar-wrapper {
  width: 100%;
  width: 110vh;
  margin: 38px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
}
.crypto-searchbar {
  width: 100%;
  font-size: 1.22rem;
  font-weight: 500;
  background: var(--color-bg-input);
  color: #fff;
  border: 2px solid var(--color-border-grey);
  border-radius: 32px;
  padding: 18px 32px;
  box-shadow: 0 2px 16px #10101044;
  outline: none;
  transition: background 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.crypto-searchbar:focus {
  background: var(--color-bg-btn-hover);
  border-color: var(--color-grey);
}
.crypto-searchbar:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.crypto-search-suggestions {
  width: 100%;
  background: var(--color-bg-box);
  border-radius: 18px;
  box-shadow: 0 4px 24px #10101044;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 90vh;
  overflow-y: auto;
}
.crypto-search-suggestion {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  cursor: pointer;
  border-radius: 14px;
  transition: background 0.14s, box-shadow 0.14s;
}
.crypto-search-suggestion:hover,
.crypto-search-suggestion:focus {
  background: #232328;
  box-shadow: 0 0 8px #2562e455;
}
.crypto-search-suggestion:focus-visible {
  background: #232328;
  box-shadow: 0 0 8px #2562e455;
}
.crypto-search-suggestion-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #222;
  object-fit: cover;
  margin-right: 0;
}
.crypto-search-suggestion-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.crypto-search-suggestion-name {
  font-size: 1.07rem;
  font-weight: 700;
  color: #fff;
}
.crypto-search-suggestion-symbol {
  font-size: 0.99rem;
  font-weight: 600;
  color: #888;
  opacity: 0.92;
}
.crypto-search-suggestion-price {
  margin-left: auto;
  font-size: 1.09rem;
  font-weight: 700;
  color: var(--color-green);
}
.crypto-search-suggestion-empty {
  text-align: center;
  color: #888;
  font-size: 1.07rem;
  padding: 18px 0;
}

/* === SEARCH MODAL === */
#search-modal-wrapper {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}
.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,12,0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.search-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.search-modal {
  position: absolute;
  top: 50%; left: 50%;
  width: 660px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  transform: translate(-50%, -48%) scale(.94);
  background: linear-gradient(145deg,#191a1e 0%, #16171a 100%);
  border: 1.5px solid #222326;
  border-radius: 28px;
  box-shadow: 0 18px 48px -8px #000d, 0 0 22px #1d283355;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: transform .28s cubic-bezier(.7,.2,.2,1), opacity .28s;
  pointer-events: none;
}
.search-modal.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 12px 30px;
}
.search-modal-header h2 {
  font-size: 1.28rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: .04em;
  background: linear-gradient(90deg,#fff,#dcdcdc);
  -webkit-background-clip: text;
  color: transparent;
}
.search-modal-close-btn {
  background: var(--color-bg-btn);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--color-shadow-btn);
  transition: background .16s, box-shadow .16s;
}
.search-modal-close-btn:hover,
.search-modal-close-btn:focus {
  background: var(--color-bg-btn-hover);
  outline: none;
}
.search-modal-close-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.search-modal-close-btn:active { background: var(--color-bg-btn-active); }
.search-modal-body {
  padding: 4px 30px 24px 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 auto;
}
.search-modal-input-wrapper { position: relative; width: 100%; }
.search-modal-input {
  width: 100%;
  font-size: 1.15rem;
  font-weight: 500;
  background: var(--color-bg-input);
  color: #fff;
  border: 2px solid var(--color-border-grey);
  border-radius: 22px;
  padding: 16px 22px 15px 22px;
  outline: none;
  box-shadow: 0 2px 14px #0d0d0f55;
  transition: background .17s, border-color .17s, box-shadow .17s;
}
.search-modal-input:focus {
  background: var(--color-bg-btn-hover);
  border-color: #555;
  box-shadow: 0 4px 22px -4px #0f111455;
}
.search-modal-input:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.search-modal-suggestions {
  width: 100%;
  background: var(--color-bg-box);
  border-radius: 22px;
  box-shadow: 0 6px 28px -6px #0a0a0dcc, 0 0 14px #1d283355;
  padding: 6px 4px 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 48vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #222326 #16181b;
}
.search-modal-suggestion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 16px;
  background: transparent;
  transition: background .14s, box-shadow .14s, transform .14s;
  position: relative;
}
.search-modal-suggestion:focus,
.search-modal-suggestion:hover {
  background: #232328;
  box-shadow: 0 0 0 1px #26272b, 0 0 10px #2562e444;
  outline: none;
}
.search-modal-suggestion:focus-visible {
  background: #232328;
  box-shadow: 0 0 0 1px #26272b, 0 0 10px #2562e444;
}
.search-modal-suggestion:active { transform: scale(.97); }
.search-modal-suggestion-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #222;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px #202225;
}
.search-modal-suggestion-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.search-modal-suggestion-name {
  font-size: 1.01rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}
.search-modal-suggestion-symbol {
  font-size: .85rem;
  font-weight: 600;
  color: #888;
  opacity: .9;
  letter-spacing: .04em;
}
.search-modal-suggestion-price {
  margin-left: auto;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-green);
  letter-spacing: .01em;
}
.search-modal-suggestion-empty {
  text-align: center;
  color: #777;
  font-size: 1.02rem;
  padding: 26px 0 30px 0;
}
@media (max-width: 700px) {
  .search-modal { width: calc(100vw - 20px); border-radius: 26px; }
  .search-modal-header { padding: 18px 20px 10px 24px; }
  .search-modal-body { padding: 4px 22px 22px 22px; }
  .search-modal-suggestion { padding: 11px 14px; }
  .search-modal-suggestion-icon { width: 30px; height: 30px; }
  .search-modal-suggestion-name { font-size: .99rem; }
  .search-modal-suggestion-price { font-size: .97rem; }
}

/* === RESPONSIVE BREAKPOINTS === */
@media (max-width: 1800px) {
  .side-box {
    flex-basis: 350px;
    max-width: 350px;
    min-width: 220px;
    padding: 18px 12px 14px 12px;
    font-size: 1.01rem;
    top: 8vh;
  }
  .side-box.left { margin-left: 4vh; }
  .side-box.right { margin-right: 4vh; }
  .side-box-trend-graphic-vertical {
    width: 36px;
    min-width: 36px;
  }
  .side-box-sparkline-vertical {
    width: 36px !important;
    height: 14px !important;
  }
}
@media (max-width: 1400px) {
  .side-box {
    flex-basis: 260px;
    max-width: 260px;
    min-width: 170px;
    padding: 14px 9px 12px 9px;
    font-size: 0.99rem;
    top: 7vh;
  }
  .side-box.left { margin-left: 4vh; }
  .side-box.right { margin-right: 4vh; }
  .side-box-trend-graphic-vertical {
    width: 28px;
    min-width: 28px;
  }
  .side-box-sparkline-vertical {
    width: 28px !important;
    height: 10px !important;
  }
}
@media (max-width: 1100px) {
  .center-menu-wrapper { flex-direction: column; }
  .side-box.left, .side-box.right { margin: 18px auto 0 auto; }
  .side-box {
    width: 97vw;
    max-width: 99vw;
    margin-top: 18px;
    position: static;
    top: unset;
  }
  .side-box-trend-graphic-vertical {
    width: 20px;
    min-width: 20px;
  }
  .side-box-sparkline-vertical {
    width: 20px !important;
    height: 8px !important;
  }
}

/* MOBILE Anpassungen (<=1100px) */
@media (max-width: 1100px) {
  .chat-container {
    width: 98vw;
    min-width: 0;
    max-width: 99vw;
    margin-top: 0;
    margin-bottom: 40px;
  }
  .chat-headline { font-size: 1.6rem; margin-bottom: 1vw; }
  .chat-title { font-size: 1.2rem; margin-bottom: 1vw; }
  .custom-chat-info { font-size: 1.05rem; margin-bottom: 1vw; }
  .chat-messages {
    font-size: 1.0rem;
    padding: 7px 12px;
    max-height: 24vh;
  }
  .chat-input-row,
  .home-chat-input-row {
    padding: 8px 12px;
    border-radius: 26px;
  }
  .chat-input,
  .home-chat-input {
    font-size: 1.01rem;
    padding: 7px 0;
  }
  .chat-input::placeholder,
  .home-chat-input::placeholder { font-size: 0.99rem; }
  .crypto-table {
    font-size: 1.01rem;
    border-radius: 8px;
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    overflow-x: auto;
    margin: 8px 0 0 0;
  }
  .crypto-table th, .crypto-table td {
    padding: 9px 6px;
    font-size: 1.01rem;
  }
  .crypto-table th:first-child,
  .crypto-table td:first-child { padding-left: 12px; }
  .crypto-table th:last-child,
  .crypto-table td:last-child,
  .crypto-table td.sparkline-cell {
    padding-right: 6vh !important;
    text-align: right !important;
  }
  .crypto-table tr:not(:last-child)::after {
    left: 12px;
    right: 7px;
  }
  .side-box {
    font-size: 1.01rem;
    padding: 10px 5px 10px 5px;
    position: static;
    top: unset;
  }
  .side-box-trend-graphic-vertical {
    width: 14px;
    min-width: 14px;
  }
  .side-box-sparkline-vertical {
    width: 14px !important;
    height: 5px !important;
  }
  .side-box-coin-icon {
    width: 24px;
    height: 24px;
    border-radius: 0;
    background: none;
    margin-bottom: 0;
    margin-right: 10px;
    object-fit: cover;
    display: block;
    box-shadow: none;
    border: none;
  }
  .top-right { gap: 10px; }
  .lang-btn { padding: 6px 12px; min-width: 66px; }
  .top-filter-bar {
    gap: 10px;
    margin: 1vh 0 4px 0;
    padding: 0 0 2px 0;
    font-size: 0.99em;
  }
  .filter-btn {
    padding: 4px 13px;
    font-size: 1em;
    min-height: 36px;
  }
  .fav-btn { width: 22px; height: 22px; }
  .fav-btn svg { width: 17px; height: 17px; }
  .crypto-searchbar-wrapper { max-width: 99vw; margin-top: 18px; }
  .crypto-searchbar {
    font-size: 1.08rem;
    padding: 12px 16px;
    margin-bottom: 12px;
  }
  .crypto-search-suggestions {
    max-height: 220px;
    padding: 2px 0;
  }
  .crypto-search-suggestion {
    padding: 11px 12px;
    gap: 10px;
  }
  .crypto-search-suggestion-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
  }
  .crypto-search-suggestion-name { font-size: 1.01rem; }
  .crypto-search-suggestion-symbol { font-size: 0.93rem; }
  .crypto-search-suggestion-price { font-size: 1.01rem; }
  .crypto-price { font-size: 0.95em; font-weight: bold; }
  .crypto-percent{display:block;font-size:.99em;font-weight:600;margin-top:2px;text-align:right;width:100%;opacity:.92;}
  .crypto-percent.positive{color:var(--color-green) !important;}
  .crypto-percent.negative{color:#ff2c1a;}
  .coin-info-mobile{display:flex;flex-direction:column;align-items:flex-start;}
  .coin-name-mobile{display:block;font-size:1.07em;font-weight:600;color:#fff;}
  .coin-symbol-mobile{display:block;font-size:.93em;font-weight:600;color:#888;opacity:.8;}

  .side-box-trend-graphic-vertical{
    display:block !important;
    margin:0 auto 0 auto !important;
    position:relative !important;
    top:1vh !important;
    width:100% !important;
    text-align:center !important;
  }
  .side-box-trend-graphic-vertical canvas,
  .side-box-sparkline-vertical{display:none !important;}
  .side-box-trend-vertical{
    display:block !important;
    margin:0 auto 0 auto !important;
    width:100% !important;
    text-align:center !important;
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 7px;
  background: var(--color-bg-table);
}
::-webkit-scrollbar-thumb {
  background: #222326;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: #888; }

/* === AI CHAT OVERLAY === */
.ai-chat-overlay {
  position: fixed;
  left: 0; right: 0;
  top: var(--header-height);
  bottom: 0;
  background: #111214;
  z-index: 90;
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: 16px 0 22px 0;
}
.ai-chat-overlay.active { display: flex; }
.ai-chat-back-btn {
  position: absolute;
  top: 5vh;
  left: 14px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: none;
  background: var(--color-bg-btn);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  box-shadow: var(--color-shadow-btn);
  font-size: 18px;
  line-height: 1;
}
.ai-chat-back-btn:hover,
.ai-chat-back-btn:focus { background: var(--color-bg-btn-hover); }
.ai-chat-back-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.ai-chat-column {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100% - 6px);
  padding: 0 14px;
}
.ai-chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 6px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ai-msg { display: flex; width: 100%; }
.ai-msg .ai-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 4px 14px #0006;
  border: 1px solid #232326;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.ai-msg.user { justify-content: flex-end; }
.ai-msg.user .ai-bubble {
  background: #2f3136;
  color: #fff;
}
.ai-msg.assistant { justify-content: flex-start; }
.ai-msg.assistant .ai-bubble {
  background: transparent;
  color: #f1f1f1;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.ai-chat-input-form {
  padding: 8px 4px 6px 4px;
  position: relative;
}
.ai-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2a2b2f;
  border: 1px solid #2f2f33;
  border-radius: 28px;
  padding: 12px 14px;
  box-shadow: 0 4px 18px #0008;
}
.ai-chat-input {
  flex: 1 1 auto;
  background: transparent;
  color: #fff;
  border: none;
  outline: none;
  font-size: 1.02rem;
}
.ai-chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-btn);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ai-chat-send-btn:hover,
.ai-chat-send-btn:focus { background: var(--color-bg-btn-hover); }
.ai-chat-send-btn:focus-visible {
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
.ai-typing {
  opacity: .85;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0% { opacity: .65; }
  50% { opacity: 1; }
  100% { opacity: .65; }
}

/* === CANCEL BUTTON (Overlay Chat) === */
.ai-chat-cancel-btnx {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #2f3134;
  background: #242527;
  color: #d0d0d0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px -4px rgba(0,0,0,0.7);
  transition: background .18s, border-color .18s, color .18s, transform .15s, opacity .15s;
}
.ai-chat-cancel-btnx:hover:not(:disabled) {
  background: #2a2d30;
  border-color: #34373b;
  color: #ffffff;
}
.ai-chat-cancel-btnx:active:not(:disabled) { transform: translateY(1px); }
.ai-chat-cancel-btnx:focus-visible {
  outline: 2px solid #ff8c5a;
  outline-offset: 2px;
}
.ai-chat-cancel-btnx:disabled {
  opacity: .35;
  cursor: default;
  transform: none;
}
.ai-chat-cancel-btnx.ai-active {}

/* === GLOBAL NOTICE BANNER (Watchlist / Login) === */
#global-notice-root{
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}
#watchlist-limit-notice,
#watchlist-login-notice{
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(env(safe-area-inset-top), 10px)
    max(env(safe-area-inset-right), 10px)
    max(env(safe-area-inset-bottom), 10px)
    max(env(safe-area-inset-left), 10px);
  pointer-events: none;
}
#watchlist-limit-notice::before,
#watchlist-login-notice::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10,10,12,0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  pointer-events: auto;
}
#watchlist-limit-notice .global-notice,
#watchlist-login-notice .global-notice{
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: 660px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  background: linear-gradient(145deg,#191a1e 0%, #16171a 100%);
  border: 1.5px solid #222326;
  border-radius: 28px;
  box-shadow: 0 18px 48px -8px #000d, 0 0 22px #1d283355;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 26px 30px;
  text-align: center;
  pointer-events: auto;
}
#watchlist-limit-notice .global-title-lines,
#watchlist-login-notice .global-title-lines{
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.32;
  gap: 6px;
  font-weight: 800;
  font-size: 1.28rem;
  color: #fff;
}
#watchlist-limit-notice .global-title-lines .line,
#watchlist-login-notice .global-title-lines .line{ display:block; }
#watchlist-limit-notice .global-actions,
#watchlist-login-notice .global-actions{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}
#watchlist-limit-notice .upgrade-btn,
#watchlist-login-notice .upgrade-btn{
  background: var(--color-bg-btn);
  color: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 12px 20px;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
  box-shadow: var(--color-shadow-btn);
  transition: background .16s, box-shadow .16s, transform .06s, outline-color .16s, border-color .16s;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
#watchlist-limit-notice .upgrade-btn:hover,
#watchlist-limit-notice .upgrade-btn:focus,
#watchlist-login-notice .upgrade-btn:hover,
#watchlist-login-notice .upgrade-btn:focus{
  background: var(--color-bg-btn-hover);
  border-color: #2a2b2f;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  outline-color: transparent;
}
#watchlist-limit-notice .upgrade-btn:focus-visible,
#watchlist-login-notice .upgrade-btn:focus-visible{
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
#watchlist-limit-notice .upgrade-btn:active,
#watchlist-login-notice .upgrade-btn:active{
  background: var(--color-bg-btn-active);
  transform: translateY(1px);
}
#watchlist-limit-notice .close-btn,
#watchlist-login-notice .close-btn{
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--color-bg-btn);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: 800;
  box-shadow: var(--color-shadow-btn);
  transition: background .16s, color .16s, transform .06s, box-shadow .16s;
}
#watchlist-limit-notice .close-btn:hover,
#watchlist-limit-notice .close-btn:focus,
#watchlist-login-notice .close-btn:hover,
#watchlist-login-notice .close-btn:focus{
  background: var(--color-bg-btn-hover);
  outline: none;
}
#watchlist-limit-notice .close-btn:focus-visible,
#watchlist-login-notice .close-btn:focus-visible{
  outline: 2px solid #2562e4;
  outline-offset: 2px;
}
#watchlist-limit-notice .close-btn:active,
#watchlist-login-notice .close-btn:active{
  transform: translateY(1px);
  background: var(--color-bg-btn-active);
}
@media (max-width: 1100px){
  #watchlist-limit-notice,
  #watchlist-login-notice{
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    padding:
      max(env(safe-area-inset-top), 12px)
      max(env(safe-area-inset-right), 12px)
      max(env(safe-area-inset-bottom), 12px)
      max(env(safe-area-inset-left), 12px);
  }
  #watchlist-limit-notice .global-notice,
  #watchlist-login-notice .global-notice{
    width: calc(100vw - 20px);
    border-radius: 26px;
    padding: 22px 22px;
  }
  #watchlist-limit-notice .global-title-lines,
  #watchlist-login-notice .global-title-lines{
    font-size: 1.12rem;
  }
}

/* === DESKTOP GRID LAYOUT (≥1101px) === */
@media (min-width: 1101px){
  .center-menu-wrapper{
    width: calc(100vw - var(--page-gutter) - var(--page-gutter));
    margin-left: var(--page-gutter);
    margin-right: var(--page-gutter);
    padding-left: 0;
    padding-right: 0;
    --grid-gap: 32px;
    --center-min: clamp(540px, 30vw, 600px);
    --center-max: clamp(640px, 34vw, 760px);
    display: grid;
    box-sizing: border-box;
    grid-template-columns: 1fr minmax(var(--center-min), var(--center-max)) 1fr;
    column-gap: var(--grid-gap);
    align-items: start;
    justify-content: stretch;
    padding-top: 24px;
  }
  .side-box{
    width: 100%;
    max-width: none;
    height: clamp(420px, 50vh, 560px);
    padding: clamp(18px, 1.9vw, 32px) clamp(18px, 1.35vw, 26px) clamp(16px, 1.6vw, 26px);
    margin: 0 !important;
  }
  .side-box.left{ margin-left: 0 !important; }
  .side-box.right{ margin-right: 0 !important; }
  .side-box-list li{
    margin-bottom: clamp(8px, 1.4vh, 18px);
    grid-template-columns: 24px minmax(0,1fr) clamp(86px, 5.8vw, 118px) max-content;
    column-gap: clamp(6px, 0.8vw, 12px);
  }
  .side-box-coin-name-container{ max-width: clamp(120px, 9vw, 160px); }
  .side-box-coin-price{
    width: clamp(86px, 5.8vw, 118px);
    margin-left: 0;
    text-align: right;
  }
  .side-box-trend-graphic-vertical{
    width: clamp(28px, 2.5vw, 48px);
    min-width: clamp(28px, 2.5vw, 48px);
  }
  .side-box-sparkline-vertical{
    width: clamp(28px, 2.5vw, 48px) !important;
    height: clamp(10px, 1.05vw, 20px) !important;
  }
  .center-menu{
    grid-column: 2;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .chat-container{
    width: 100%;
    max-width: var(--center-max);
  }
  .chat-messages{ max-height: clamp(160px, 17vh, 200px); }
}

/* === FIX: Side-Boxen nicht klappen (1000–1400px Höhe) === */
@media (min-width: 1101px) and (min-height: 1000px) and (max-height: 1400px) {
  .side-box {
    height: 520px !important;
    overflow: hidden;
  }
  .side-box .side-box-list {
    overflow: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .side-box .side-box-list::-webkit-scrollbar {
    display: none;
  }
  .chat-center {
    min-height: 520px;
  }
}

/* === NEW: Leicht geringere Side-Box-Höhe bei niedrigen Desktop-Viewporthöhen (1000–1100px) === */
/* Ziel: Verhindern, dass Side-Boxen die Crypto-Table leicht berühren, ohne Design stark zu ändern. */
@media (min-width: 1101px) and (min-height: 1000px) and (max-height: 1100px) {
  .side-box {
    height: 490px !important; /* leicht verringert gegenüber 50vh/520px */
  }
  .chat-center {
    min-height: 490px !important;
  }
}

/* === ULTRA-WIDE (≥3000px) === */
@media (min-width: 3000px) {
  .center-menu-wrapper{
    --center-min: clamp(640px, 32vw, 840px);
    --center-max: clamp(820px, 36vw, 1100px);
    --grid-gap: 40px;
  }
  .chat-headline { font-size: 4.4rem; }
  .custom-chat-info { font-size: 1.28rem; }
  .chat-title { font-size: 1.6rem; }
  .side-box { font-size: 1.14rem; }
  .side-box-title { font-size: 1.32rem; }
  .side-box-coin-fullname { font-size: 1.08rem; }
  .side-box-coin-price { font-size: 1.12rem; }
  .side-box-trend-vertical { font-size: 1.12rem; }
  .crypto-table { font-size: 1.12rem; }
  .crypto-table th { font-size: 1.18rem; }
  .crypto-table td { font-size: 1.12rem; }
  .crypto-table td.price-cell { font-size: 1.18rem; }
  .crypto-table td.price-cell .crypto-price { font-size: 1.22rem; }
  .crypto-table th, .crypto-table td { padding: 13px 12px; }
}

/* === LANGUAGE-SPECIFIC Sidebar Breite === */
html:lang(en) {
  --sidebar-width-min: 230px;
  --sidebar-width-vw: 14.5vw;
  --sidebar-width-max: 360px;
}
@media (max-width: 1100px){
  html:lang(en) .sidebar{
    width: 260px;
  }
}