/* Base layout */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #020617 0, #020617 45%, #000 100%);
  color: #e5e7eb;
}

/* Outer frame */

.page {
  width: 100%;
  max-width: 1100px;
  background: rgba(6, 9, 20, 0.96);
  border-radius: 32px;
  padding: 32px 32px 24px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.9);
}

/* Header */

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.app-title {
  margin: 0 0 4px;
  font-size: 2.2rem;
  letter-spacing: 0.06em;
}

.hero-tagline {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.82);
}

/* Main layout – single centered column now */

.layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Panels */

.panel {
  background: #171717; /* charcoal panels */
  border-radius: 24px;
  padding: 20px 18px 18px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.9);
}

.panel-header {
  text-align: center;
  margin-bottom: 14px;
}

/* Warm white text for key bits */

.section-title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: #c0af9c;
}

.section-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #c0af9c;
}

.section-subtitle strong {
  font-weight: 600;
}

/* Mode pills */

.mode-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 18px 0 16px;
}

.mode-pill {
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.9); /* white outline */
  background: rgba(248, 250, 252, 0.96);
  color: #020617;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  outline: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    background 0.12s ease, color 0.12s ease;
}

.mode-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.33);
}

.mode-pill.active {
  background: #020617;
  color: #f9fafb;
}

/* Textareas */

.textarea-wrapper {
  margin-top: 4px;
}

textarea {
  width: 100%;
  min-height: 150px;
  max-height: 360px;
  padding: 14px 14px 14px;
  border-radius: 20px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.98rem;
  resize: vertical;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.15);
}

textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

textarea:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.7),
    inset 0 1px 0 rgba(148, 163, 184, 0.15);
}

/* Controls + buttons */

.controls {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.primary-button,
.secondary-button {
  min-width: 230px;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  outline: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.12s ease;
}

/* Primary = Polish */

.primary-button {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #0b1120;
  box-shadow: 0 16px 40px rgba(248, 113, 113, 0.35);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 50px rgba(248, 113, 113, 0.45);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

/* Secondary = Copy */

.secondary-button {
  background: #020617;
  color: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.7);
}

.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
}

.secondary-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
}

/* Status text – also warm white */

.status-text {
  margin: 4px 0 0;
  font-size: 0.85rem;
  min-height: 1.2em;
  color: #c0af9c;
  text-align: center;
}

/* Footer */

.footer {
  margin-top: 18px;
  text-align: center;
}

.footer-text {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.8);
}

/* Responsive tweaks */

@media (max-width: 768px) {
  .page {
    padding: 20px 14px 16px;
    border-radius: 24px;
  }

  .panel {
    padding: 18px 12px 16px;
  }

  .mode-pills {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
