/* CSS for Convai Playground UI */

:root {
  color-scheme: dark;
  --glass-bg: rgba(17, 25, 40, 0.58);
  --glass-border: rgba(255, 255, 255, 0.18);
  --accent: #f8e686;
  --accent-soft: rgba(248, 230, 134, 0.35);
  --text-main: #f1f5ff;
  --text-muted: rgba(226, 232, 240, 0.78);
  --danger: #ff6b81;
  --success: #6be0a9;
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  color: var(--text-main);
  background: #05070d;
}

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 3rem);
}

.bg-image {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  filter: saturate(1.05) contrast(1.08);
  z-index: -2;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(248, 230, 134, 0.32), transparent 46%),
    linear-gradient(180deg, rgba(6, 10, 18, 0.68) 0%, rgba(6, 10, 18, 0.87) 100%);
  z-index: -1;
}

.shell {
  width: 100%;
  max-width: 1800px;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 2vw, 2.5rem);
  background: rgba(6, 8, 15, 0.62);
  border-radius: 28px;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid rgba(248, 230, 134, 0.18);
  box-shadow: 0 35px 70px rgba(2, 6, 14, 0.5);
  backdrop-filter: blur(26px);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.25rem, 4vw, 3rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 400;
}

.playground-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(1.5rem, 2vw, 2rem);
  align-items: start;
}

.config-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 46px rgba(7, 12, 22, 0.38);
  backdrop-filter: blur(20px);
}

.config-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-main);
}

.input-field {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 160ms ease, background 160ms ease;
  backdrop-filter: blur(16px);
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-soft);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(248, 230, 134, 0.25);
}

.input-field::placeholder {
  color: var(--text-muted);
}

.input-field select,
select.input-field {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f1f5ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.input-field select:focus,
select.input-field:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f8e686' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.experience-container {
  position: relative;
  width: 100%;
  min-height: 500px;
  aspect-ratio: 16 / 9;
}

.convai-embed-wrapper {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border-radius: 20px;
  background: rgba(12, 18, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: stretch;
}

/* Style the Convai iframe to fill the container */
.convai-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px;
  display: block;
}

.placeholder-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  text-align: center;
  padding: 2rem;
}

.placeholder-message p {
  margin: 0;
}

.controls-section,
.status-section {
  padding: 1.5rem;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 46px rgba(7, 12, 22, 0.38);
  backdrop-filter: blur(20px);
}

.controls-section h2,
.status-section h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.control-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.glass-button {
  position: relative;
  padding: 0.6rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
  backdrop-filter: blur(16px);
  cursor: pointer;
  font-family: inherit;
}

.glass-button::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.03));
  opacity: 0.35;
  pointer-events: none;
}

.glass-button:hover:not(:disabled),
.glass-button:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(248, 230, 134, 0.18);
  border-color: rgba(248, 230, 134, 0.42);
  outline: none;
}

.glass-button:focus-visible:not(:disabled) {
  box-shadow: 0 0 0 3px rgba(248, 230, 134, 0.25);
}

.glass-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.glass-button--secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.status-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.status-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-value {
  color: var(--text-main);
  font-size: 0.95rem;
}

@media (max-width: 1024px) {
  .playground-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  body {
    padding: 1.1rem;
  }

  .shell {
    padding: 1.6rem;
    gap: 1.6rem;
  }

  .config-panel,
  .controls-section,
  .status-section {
    padding: 1.2rem;
  }

  .experience-container {
    min-height: 400px;
    aspect-ratio: auto;
  }

  .convai-embed-wrapper {
    min-height: 400px;
  }
}


