/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0a0f1e;
  --bg-card:      #111827;
  --bg-card2:     #1a2235;
  --border:       #1e2d45;
  --accent:       #f59e0b;
  --accent-hover: #d97706;
  --accent-soft:  rgba(245, 158, 11, 0.12);
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --green:        #10b981;
  --radius:       14px;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   HEADER
============================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon { width: 32px; height: 32px; }

.logo-text {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.logo-text strong {
  color: var(--text);
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

.btn-nav {
  background: var(--accent);
  color: #000 !important;
  font-weight: 600;
  font-size: 0.85rem !important;
  padding: 8px 18px;
  border-radius: 8px;
  transition: background 0.2s !important;
}

.btn-nav:hover { background: var(--accent-hover) !important; }

/* =============================================
   HERO
============================================= */
.hero {
  padding: 80px 0 72px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245,158,11,0.1) 0%, transparent 70%);
}

.hero-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(245,158,11,0.25);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #fff;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 10px;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 0 30px rgba(245,158,11,0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary svg { width: 18px; height: 18px; }

.hero-note {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* =============================================
   HOW IT WORKS
============================================= */
.how-it-works {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: #fff;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 48px;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  text-align: center;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.step:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.75rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 16px;
}

.step-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.step p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
  padding-top: 60px;
  flex-shrink: 0;
}

/* =============================================
   CHAT SECTION
============================================= */
.chat-section {
  padding: 72px 0 80px;
  border-top: 1px solid var(--border);
}

.chat-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}

/* Upload zone */
.upload-zone {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--green);
  cursor: default;
}

.upload-content {
  text-align: center;
  padding: 32px 24px;
  pointer-events: none;
}

.upload-icon {
  width: 40px;
  height: 40px;
  stroke: var(--text-dim);
  margin: 0 auto 12px;
  display: block;
}

.upload-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}

.upload-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.upload-formats {
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--bg-card2);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  width: 100%;
}

.file-icon {
  width: 32px;
  height: 32px;
  stroke: var(--green);
  flex-shrink: 0;
}

.file-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}

.btn-remove:hover { border-color: #ef4444; color: #ef4444; }

/* Chat window */
.chat-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: 460px;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Messages */
.message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 85%;
}

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

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.message.user .message-avatar {
  background: var(--bg-card2);
  border-color: var(--border);
  color: var(--text-muted);
}

.message-bubble {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
}

.message.user .message-bubble {
  background: var(--accent-soft);
  border-color: rgba(245,158,11,0.25);
  border-radius: 12px 12px 4px 12px;
  color: var(--text);
}

/* Typing indicator */
.typing .message-bubble {
  padding: 14px 16px;
}

.typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  height: 18px;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Chat input area */
.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
}

.btn-send-file {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  width: 100%;
}

.btn-send-file svg { width: 16px; height: 16px; }

.btn-send-file:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-send-file:not(:disabled):hover { background: var(--accent-hover); }

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input::placeholder { color: var(--text-dim); }
.chat-input:focus { border-color: var(--accent); }
.chat-input:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-send {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #000;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-send svg { width: 16px; height: 16px; }
.btn-send:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-send:not(:disabled):hover { background: var(--accent-hover); }

/* =============================================
   FOOTER
============================================= */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer .logo { justify-content: center; margin-bottom: 12px; }

.footer-note {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 640px) {
  .hero { padding: 56px 0 48px; }
  .step-arrow { display: none; }
  .steps { gap: 24px; }
  .step { max-width: 100%; }
  .chat-window { height: 400px; }
  .nav a:not(.btn-nav) { display: none; }
  .message { max-width: 95%; }
}
