:root {
  --bg: #36454f;
  --panel: #36454f;
  --ink: #f7f7f7;
  --muted: #c7ced4;
  --accent: #f7d23c;
  --accent-2: #f7d23c;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Fira Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg) url("Asset/synth.png") no-repeat right bottom;
  background-size: 38vw auto;
  min-height: 100vh;
}

.don-avatar {
  width: 117px;
  height: auto;
  flex-shrink: 0;
}

.experience {
  max-width: 960px;
  margin: 0 auto;
  padding: 50px 24px 40px;
  display: grid;
  gap: 26px;
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
  padding-top: 10px;
  padding-bottom: 10px;
}

.hero-text {
  display: grid;
  gap: 6px;
}

h1 {
  margin: 0;
  font-size: 40px;
  font-family: "Comic Neue", "Baloo 2", "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: -1px;
  color: var(--accent);
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
}

.chat {
  display: grid;
  gap: 16px;
}

.chat-log {
  min-height: 260px;
  background: transparent;
  border-radius: 16px;
  padding: 12px 8px;
  display: grid;
  gap: 14px;
}

.message {
  display: grid;
  gap: 6px;
}

.message .who {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.message .text {
  padding: 14px 18px;
  border-radius: 24px;
  font-size: 16px;
  color: #101010;
  position: relative;
  max-width: 520px;
}

.message.ai .text {
  background: var(--accent);
  color: #101010;
}

 .message.ai .text::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}

.message.user {
  justify-self: end;
  max-width: 85%;
}

.message.user .text {
  background: #101010;
  color: var(--accent);
}

.message.user .text::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: #101010;
  border-radius: 2px;
  transform: rotate(45deg);
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-input {
  background: #2f3b44;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 18px 32px var(--shadow);
  display: grid;
  gap: 10px;
}

label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

textarea {
  background: #f7d23c;
  color: #101010;
  border: 1px solid #c9a700;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  resize: vertical;
  min-height: 64px;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cta {
  border: none;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--accent);
  color: #101010;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.ghost {
  border: 1px solid var(--accent);
  padding: 12px 18px;
  border-radius: 14px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.status {
  margin: 0;
  color: var(--muted);
}

.chips-title {
  margin: 0;
  color: var(--muted);
}

.foot {
  color: var(--muted);
  font-size: 12px;
}

.sound-toggles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toggle-btn {
  border: 1px solid var(--accent);
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--accent);
  color: #101010;
  border-color: transparent;
}

.detail-level {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.detail-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.floating-controls {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  gap: 12px;
  align-items: center;
}

.floating-actions {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  gap: 12px;
  align-items: center;
}

.midi-fab {
  position: relative;
}

.midi-fab-btn {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.midi-popup {
  position: absolute;
  left: 0;
  bottom: 58px;
  min-width: 240px;
  background: #2f3b44;
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 12;
}

.clear-chat {
  width: auto;
}

.midi-popup.open {
  display: grid;
  gap: 10px;
}

.midi-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.midi-close {
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  color: var(--accent);
}

.midi-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

select {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: #36454f;
  color: #f7f7f7;
  font-size: 14px;
}

@media (max-width: 720px) {
  h1 {
    font-size: 30px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .don-avatar {
    width: 72px;
  }
}
