
:root {
  --bg-gradient: #e5e7eb;
  --card-bg: rgba(255, 255, 255, 0.85);
  --accent: #4c7dff;
  --accent-strong: #2f65f5;
  --text-primary: #15213b;
  --text-muted: #647097;
  --surface-border: rgba(150, 170, 220, 0.3);
  --shadow: 0 20px 36px rgba(8, 16, 40, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-sizing: border-box;
}

.app-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0;
  letter-spacing: 0.02em;
}

.app-header .subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.scenario-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 200px;
}

.scenario-picker select {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.scenario-picker select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.control-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.controls button {
  min-width: 120px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.controls button:disabled {
  cursor: not-allowed;
  filter: saturate(0.55) brightness(0.85);
  box-shadow: none;
}

.controls button:not(:disabled):hover {
  transform: translateY(-2px);
}

#start {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #061222;
  box-shadow: 0 16px 24px rgba(57, 123, 255, 0.25);
}

#start:not(:disabled):hover {
  box-shadow: 0 20px 32px rgba(57, 123, 255, 0.32);
}

#stop {
  background: linear-gradient(135deg, #ff9d7b 0%, #ff4255 100%);
  color: #361414;
  box-shadow: 0 16px 28px rgba(255, 78, 101, 0.28);
}

#stop:not(:disabled):hover {
  box-shadow: 0 22px 40px rgba(255, 78, 101, 0.32);
}

#stop:disabled {
  filter: saturate(0.55) brightness(0.85);
  box-shadow: none;
}

.card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 28px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.avatar-card {
  align-items: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: #e5e7eb;
  border: none;
  box-shadow: none;
}

.convo-card {
  gap: 12px;
}


.panel-title {
  margin: 0;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

#mouth-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#mouth-image {
  width: 100%;
  max-width: 360px;
  height: auto;
  border: none;
  box-shadow: none;
  background: transparent;
}

.mouth-state {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

#convo {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  color: #1f2937;
}

.convo-line {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(150, 170, 220, 0.3);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.04);
}

.convo-line .role {
  font-weight: 700;
  margin-right: 6px;
  color: #111827;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 24px 16px;
    margin: 0;
    gap: 20px;
  }

  .card {
    padding: 20px 16px;
  }

  .controls button {
    flex: 1 1 160px;
  }
}
