:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
  --bg-deep: #071428;
  --bg-mid: #0f2744;
  --gold-start: #d4af37;
  --gold-mid: #f5e6a8;
  --gold-end: #b8941f;
  --text-soft: rgba(255, 255, 255, 0.92);
  --line-soft: rgba(255, 255, 255, 0.35);
  --card-bg: rgba(8, 24, 45, 0.72);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0a1a33 0%, #071428 42%, #05101f 100%);
  color: var(--text-soft);
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.waves {
  width: 100%;
  height: 100%;
}

.app {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
}

.brand {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.6rem, 10vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.logo-ocm {
  background: linear-gradient(
    135deg,
    var(--gold-start) 0%,
    var(--gold-mid) 45%,
    var(--gold-end) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-genie {
  color: #ffffff;
}

.logo-i {
  position: relative;
}

.spark {
  position: absolute;
  top: -0.95rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.95rem;
  height: 0.95rem;
  color: var(--gold-mid);
}

.tagline {
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.landing-cta-wrap {
  margin: 1.15rem 0 0;
}

.landing-cta {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--gold-start);
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.prompt-card {
  margin-top: auto;
}

.prompt-card textarea {
  width: 100%;
  min-height: 9rem;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 1.35rem 1.2rem;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.prompt-card textarea::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.prompt-card textarea:focus {
  outline: 2px solid rgba(212, 175, 55, 0.35);
  outline-offset: 2px;
}

.messages {
  display: grid;
  gap: 0.75rem;
}

.messages:not(:empty) {
  margin-bottom: 0.5rem;
}

.message {
  padding: 0.875rem 1rem;
  border-radius: 14px;
  white-space: pre-wrap;
  font-size: 0.95rem;
}

.message.user {
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.28);
}

.message.assistant {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.voice-controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.icon-button {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.icon-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 0.75rem;
}

.action-button {
  border: 1.5px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  padding: 0.8rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.action-button-wide {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: min(100%, 16rem);
}

.action-button:hover,
.action-button.is-active {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.45);
}

.action-button:disabled,
.icon-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 768px) {
  .app {
    padding-top: 3rem;
  }
}
