/* style.css */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #10b981;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --error: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Auth Page */
.auth-card {
  max-width: 400px;
  margin: 10vh auto;
  padding: 3rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  text-align: center;
}

.logo {
  height: 40px;
  margin-bottom: 1.5rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.auth-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.input-group button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.input-group button:hover {
  background: var(--primary-dark);
}

.error {
  color: var(--error);
  margin-top: 1rem;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.help-text {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.help-text a {
  color: var(--primary);
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.logo-small {
  height: 30px;
}

#logout {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
}

/* Main Input Section */
.input-section {
  margin: 3rem 0;
}

.input-section h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.input-section > p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 150px;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.primary-btn {
  margin-top: 1rem;
  padding: 1rem 2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.primary-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

/* Results */
.results-container {
  margin-top: 2rem;
}

.summary-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  margin-bottom: 2rem;
}

.summary-card h2 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Prompts */
.prompts-section {
  margin-bottom: 3rem;
}

.prompts-section h2 {
  margin-bottom: 0.5rem;
}

.prompt-category {
  margin-bottom: 2rem;
}

.prompt-category h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.prompt-card {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.prompt-title {
  font-weight: 600;
}

.copy-btn {
  padding: 0.25rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--border);
}

/* Decomposed prompt */
.prompt-decomposed {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.875rem;
}

.pd-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.pd-row:last-child {
  border-bottom: none;
}

.pd-label {
  width: 120px;
  flex-shrink: 0;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
}

.pd-value {
  padding: 0.6rem 0.75rem;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}

.pd-steps {
  white-space: pre-line;
}

.pd-output-row .pd-label {
  color: var(--primary);
}

.pd-output-row .pd-value {
  font-weight: 500;
  color: var(--primary);
}

.prompt-text {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.prompt-why {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Agents */
.agents-section h2 {
  margin-bottom: 0.5rem;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.agent-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.agent-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.agent-does {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.agent-metrics {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric {
  flex: 1;
  background: var(--bg);
  padding: 0.75rem;
  border-radius: 6px;
  text-align: center;
}

.metric-value {
  display: block;
  font-weight: 700;
  color: var(--secondary);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.agent-why {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ROI Summary */
.roi-summary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
}

.roi-summary h3 {
  margin-bottom: 0.5rem;
}

/* Deep Dive Section */
.deep-dive-section {
  margin-bottom: 2rem;
}

.deep-dive-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.deep-dive-cards {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.deep-dive-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  flex: 1;
  min-width: 240px;
}

.deep-dive-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37,99,235,0.1);
}

.dd-icon {
  font-size: 1.1rem;
}

.dd-label {
  flex: 1;
  font-weight: 500;
}

.dd-arrow {
  color: var(--primary);
  font-weight: 700;
}

/* CTA */
.cta-section {
  text-align: center;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 2px solid var(--primary);
}

.cta-section h3 {
  margin-bottom: 1rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cta-primary {
  padding: 1rem 2rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

.cta-primary:hover {
  background: var(--primary-dark);
}

.cta-secondary {
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
}

.cta-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cta-contact {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cta-contact a {
  color: var(--primary);
  text-decoration: none;
}

.cta-contact a:hover {
  text-decoration: underline;
}

/* Deep Dive Link */
.deep-dive-link {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.deep-dive-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.deep-dive-link a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem;
  }

  .input-group {
    flex-direction: column;
  }

  .cta-buttons {
    flex-direction: column;
  }
}
