:root {
  --bg: #0f1115;
  --bg-accent: #171a22;
  --bg-gradient: radial-gradient(1400px 800px at 70% -10%, rgba(99,126,255,0.3), transparent),
                  radial-gradient(1000px 700px at -10% 80%, rgba(85,214,255,0.22), transparent);
  --text: #e8eaf0;
  --text-secondary: #a8afc4;
  --accent: #6aa7ff;
  --accent-strong: #3f8cff;
  --accent-glow: rgba(106, 167, 255, 0.4);
  --bubble-ai: #171a22;
  --bubble-user: linear-gradient(135deg, #3f8cff, #7ab4ff);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --glass: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
}

:root.light {
  --bg: #f7f8fb;
  --bg-accent: #ffffff;
  --bg-gradient: radial-gradient(1400px 800px at 70% -10%, rgba(99,126,255,0.15), transparent),
                  radial-gradient(1000px 700px at -10% 80%, rgba(85,214,255,0.12), transparent);
  --text: #1a1d29;
  --text-secondary: #4c5874;
  --accent: #3f8cff;
  --accent-strong: #2f74f5;
  --accent-glow: rgba(63, 140, 255, 0.3);
  --bubble-ai: #ffffff;
  --bubble-user: linear-gradient(135deg, #2f74f5, #5599ff);
  --shadow: 0 10px 30px rgba(0,0,0,0.12);
  --glass: rgba(255,255,255,0.65);
  --border: rgba(0,0,0,0.07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg-gradient), var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', 'Noto Sans', 'Helvetica Neue', sans-serif;
  overflow: hidden;
}

/* Grundlayout */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.icon-btn {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(20px);
  background: var(--glass);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* -- topbar alignment: logo + title side-by-side, controls to the sides -- */
.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: center;
}

.left-controls { justify-self: start; }
.right-controls { justify-self: end; }

/* --- ensure chat list action buttons are inline (horizontal) --- */
.chat-list .chat-item .actions,
.sidebar .chat-item .actions,
.chat-list .actions,
.sidebar .actions,
.chat-item .actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
}

/* opt. kleine Anpassungen fr Buttons, damit sie gleich aussehen */
.rename-btn,
.delete-btn {
  background: transparent;
  border: none;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.rename-btn svg,
.delete-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Theme toggle icons: show sun in light theme, moon in dark theme; yellow color */
.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  color: #FFD54F; /* gelb, für stroke="currentColor" SVGs */
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* default: dark -> show moon, hide sun */
.theme-toggle .sun-icon { display: none; }
.light .theme-toggle .sun-icon { display: inline-block; }
.light .theme-toggle .moon-icon { display: none; }


.topbar h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}




