:root {
  --bg: #0b0f12;
  --panel: #0f1619;
  --muted: #9aa6ad;
  --accent: #6ee7b7;
  --input: #0c1315;
  --card: #0d1416;
  --user-bubble: #051535;
  --bot-bubble: #033AE9;
  --color-background: #080A0C;
  --min-width: 250px;
  --bottom-wrapper-height: 90px;
  --toolbar-padding: 20px;
}

body {
  margin: 0;
  font-family: "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--color-background);
  color: #e6eef0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-width: var(--min-width);
  overflow-x: hidden;
  overflow-y: auto;
}

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

.container {
  width: 100%;
  #max-width: 800px;
  min-width: var(--min-width);
  height: 100vh;
  height: 100dvh;
  background: var(--color-background);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: var(--bottom-wrapper-height);
  overflow: hidden;
  box-sizing: border-box;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 100%;
  object-fit: cover;
  z-index: 0;
}

#visualizer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  height: 250px;
  z-index: 1;
}

#dbCircle {
  width: 80px;
  height: 80px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.1s ease-out;
  z-index: 1;
}

.toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--toolbar-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.bottom-center {
  position: absolute;
  bottom: var(--toolbar-padding);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: auto;
}














header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

header h1 {
  margin: 0;
  font-size: 18px;
  color: var(--accent);
}

main {
  padding: 16px;
  min-height: 320px;
}

#chat {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  background: radial-gradient(
    208.93% 154.42% at 50% 50.58%,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.8) 97.6%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.chat-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.log {
  flex: 1;
  background: transparent;
  border-radius: 0;
  padding: 20px;
  padding-top: 100px;
  min-height: 0;
  overflow-y: auto;
  font-size: 15px;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 20px;
  max-width: 70%;
  word-break: break-word;
  line-height: 1.5;
  font-size: 14px;
}

.message.user {
  background: radial-gradient(
    208.93% 154.42% at 50% 50.58%,
    rgba(5, 21, 53, 0.8) 0%,
    rgba(5, 21, 53, 1) 97.6%
  );
  color: #e6eef0;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.message.bot {
  background: linear-gradient(135deg, #0239E9 0%, #033AE9 100%);
  color: #ffffff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(2, 57, 233, 0.4);
}

.controls {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}

.controls input[type="text"] {
  flex: 1;
  background: radial-gradient(
    208.93% 154.42% at 50% 50.58%,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.2) 97.6%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e6eef0;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 14px 18px;
  border-radius: 50px;
  outline: none;
  font-size: 14px;
  box-shadow: 0 -2px 10px 0 rgba(0, 0, 0, 0.4) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.controls input[type="text"]:focus {
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 -2px 10px 0 rgba(0, 0, 0, 0.4) inset, 0 0 0 2px rgba(110, 231, 183, 0.2);
}

.controls input[type="text"]::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.controls button {
  background: linear-gradient(90deg, #0239E9, #73ACEB);
  border: none;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(2, 57, 233, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 57, 233, 0.5);
}

.controls button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(2, 57, 233, 0.4);
}

footer {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.01);
  text-align: center;
}

.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

@media (max-width: 700px) {
  main {
    flex-direction: column;
  }
  .controls {
    width: 100%;
  }
}

.detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border: none;
  z-index: 9999;
  pointer-events: auto;
  background: #080A0C;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.full-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border: none;
  z-index: 9999;
  pointer-events: auto;
  background: #080A0C;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-iframe {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 70vh;
    border: none;
    z-index: 3;
}