/* ==========================================================================
   MyChat Startup Theme — Clean, Flashy, Modern Dark Design
   ========================================================================== */

:root {
  --bg-main: #07090e;
  --bg-surface: #0e131f;
  --bg-glass: rgba(16, 22, 36, 0.72);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-focus: #6366f1;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-primary: #6366f1;
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --accent-gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
  --orange-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
  --orange-glow: rgba(249, 115, 22, 0.38);
  --orange-glow-hover: rgba(249, 115, 22, 0.58);
  --success: #10b981;
  --error: #ef4444;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glow */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.glow-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(99, 102, 241, 0) 70%);
  top: -100px;
  left: 10%;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(6, 182, 212, 0) 70%);
  top: 300px;
  right: 5%;
}

/* Container */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.6);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 180px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
}

.badge-accent {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Hero Section */
.hero-section {
  padding: 30px 0 100px;
}

.hero-badge-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 32px;
}

.hero-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 10px 24px;
  border-radius: 9999px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-secondary);
  box-shadow: 0 0 10px var(--accent-secondary);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(0.8rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
  max-width: 920px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-title .gradient-text {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  display: block;
  margin-top: 10px;
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 780px;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.pillar-card {
  background: rgba(14, 19, 31, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pillar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.3);
}

.pillar-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.pillar-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.pillar-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Main Interaction Grid */
.interaction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

/* Glass Card */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Signup Card */
.signup-card {
  padding: 36px;
  display: flex;
  flex-direction: column;
}

.card-header {
  margin-bottom: 28px;
}

.card-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 10px 0 6px;
  letter-spacing: -0.02em;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.req {
  color: #f43f5e;
}

.optional {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
}

input, textarea {
  width: 100%;
  background: rgba(7, 9, 14, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #fff;
  transition: all 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: rgba(14, 19, 31, 0.9);
}

input::placeholder, textarea::placeholder {
  color: #475569;
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: -8px;
  margin-bottom: 16px;
}

.field-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 18px;
}

.form-disclaimer {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 14px;
}

/* Feedback Box */
.form-feedback {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.4;
}

.form-feedback.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.form-feedback.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-orange {
  background: var(--orange-gradient);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 20px var(--orange-glow);
}

.btn-orange:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 26px var(--orange-glow-hover);
}

.btn-orange:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Preview / Demo Card */
.preview-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(14, 19, 31, 0.85);
}

.window-controls {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.preview-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.chat-viewport {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  max-height: 340px;
  background: rgba(7, 9, 14, 0.4);
}

.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 90%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bot-msg {
  align-self: flex-start;
}

.user-msg {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
}

.bot-msg .msg-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: #f1f5f9;
}

.user-msg .msg-bubble {
  background: var(--accent-gradient);
  color: #fff;
  border-bottom-right-radius: 2px;
}

/* Sample Prompts */
.sample-prompts {
  padding: 12px 20px;
  background: rgba(14, 19, 31, 0.5);
  border-top: 1px solid var(--border-glass);
}

.prompts-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

/* Chat Input Mock */
.chat-input-mock {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: rgba(14, 19, 31, 0.85);
  border-top: 1px solid var(--border-glass);
}

.chat-input-mock input {
  flex: 1;
  background: rgba(7, 9, 14, 0.8);
  border-radius: 9999px;
  padding: 10px 16px;
  font-size: 0.88rem;
}

.btn-send {
  background: var(--accent-primary);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.btn-send:hover {
  background: #4f46e5;
}

.tech-spec-bar {
  display: flex;
  justify-content: space-around;
  padding: 10px 16px;
  background: rgba(7, 9, 14, 0.6);
  border-top: 1px solid var(--border-glass);
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

/* Privacy Policy Popup */
.privacy-popup-wrapper {
  position: relative;
  display: inline-block;
}

.privacy-popup {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: rgba(14, 19, 31, 0.96);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(20px);
  z-index: 200;
  animation: popupFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.privacy-popup[hidden] {
  display: none !important;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.privacy-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.privacy-popup-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.privacy-popup-title svg {
  color: var(--accent-secondary);
}

.privacy-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.privacy-close-btn:hover {
  color: #fff;
}

.privacy-popup-text {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.privacy-popup-text strong {
  color: #fff;
}

.privacy-popup-arrow {
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: rgba(14, 19, 31, 0.96);
  border-right: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  transform: rotate(45deg);
}

/* Responsive */
@media (max-width: 900px) {
  .interaction-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 20px 0 60px;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .signup-card {
    padding: 24px;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }
}
