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

:root {
  --bg: #FFFFFF;
  --bg-elevated: #F9F9F9;
  --bg-card: #F5F5F5;
  --fg: #1A1A1A;
  --fg-muted: #6B6B6B;
  --border: #E5E5E5;
  --accent: #1A1A1A;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
}

/* Nav */
.nav {
  height: 56px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.nav-logo {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--fg);
}

.nav-link-primary {
  color: var(--bg);
  background: var(--fg);
  padding: 8px 16px;
}

.nav-link-primary:hover {
  opacity: 0.9;
  color: var(--bg);
}

.wallet-btn {
  font-size: 13px;
  font-family: inherit;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 16px;
  cursor: pointer;
}

.wallet-btn:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}

.wallet-btn.connected {
  color: var(--fg);
  border-color: var(--fg);
}

.wallet-display {
  font-size: 12px;
  color: var(--fg-muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
}

/* ==================== */
/* LANDING PAGE         */
/* ==================== */

.page-landing {
  padding-top: 56px;
}

/* Hero */
.hero {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  padding: 80px 32px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 107, 107, 0.05), transparent),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(75, 192, 192, 0.05), transparent);
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-text h1 span {
  color: var(--fg-muted);
}

.hero-text p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 420px;
}

.hero-powered {
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 40px;
}

.hero-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.hero-btn:hover {
  opacity: 0.9;
}

/* Hero Preview */
.hero-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
}

.preview-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

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

.preview-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-msg {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.preview-msg-dot {
  width: 6px;
  height: 6px;
  margin-top: 6px;
  flex-shrink: 0;
}

.preview-msg-text {
  color: var(--fg-muted);
}

.preview-msg-name {
  color: var(--fg);
  font-weight: 500;
}

/* Coders Section */
.coders-section {
  padding: 120px 32px;
  border-bottom: 1px solid var(--border);
}

.coders-inner {
  max-width: 900px;
  margin: 0 auto;
}

.coders-header {
  margin-bottom: 64px;
}

.coders-header h2 {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.coders-header p {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  max-width: 600px;
}

.coder-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.coder-card {
  background: var(--bg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.coder-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coder-dot {
  width: 12px;
  height: 12px;
}

.coder-name {
  font-size: 14px;
  font-weight: 500;
}

.coder-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Context Section */
.context-section {
  padding: 120px 32px;
  border-bottom: 1px solid var(--border);
}

.context-inner {
  max-width: 700px;
  margin: 0 auto;
}

.context-inner h2 {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.context-lead {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 48px;
}

.context-examples {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.context-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.context-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.context-text {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.context-conclusion {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* About Section */
.about-section {
  padding: 120px 32px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.about-inner h2 {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.about-inner p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-link {
  display: inline-block;
  font-size: 13px;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  margin-top: 16px;
}

.about-link:hover {
  border-color: var(--fg);
}

/* CTA Section */
.cta-section {
  padding: 120px 32px;
  border-bottom: 1px solid var(--border);
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.cta-inner p {
  font-size: 24px;
  margin-bottom: 32px;
}

.cta-btn {
  display: inline-block;
  padding: 16px 40px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.cta-btn:hover {
  opacity: 0.9;
}

/* Footer */
.footer {
  padding: 40px 32px;
  text-align: center;
  font-size: 12px;
  color: var(--fg-muted);
}

.footer a {
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.footer a:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}

/* ==================== */
/* CHAT PAGE            */
/* ==================== */

.page-chat {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-chat .nav {
  position: relative;
}

.chat-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.panel-left {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.panel-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.message-count {
  font-size: 12px;
  color: var(--fg-muted);
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.start-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px;
}

.start-prompt p {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.prompt-input-wrapper {
  width: 100%;
  max-width: 400px;
}

.prompt-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  margin-bottom: 16px;
}

.prompt-input:focus {
  outline: none;
  border-color: var(--fg-muted);
}

.prompt-input::placeholder {
  color: var(--fg-muted);
}

.prompt-btn {
  width: 100%;
  padding: 14px;
  background: var(--fg);
  color: var(--bg);
  border: none;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.prompt-btn:hover {
  opacity: 0.9;
}

.prompt-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.message {
  margin-bottom: 20px;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.message-dot {
  width: 6px;
  height: 6px;
}

.message-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
}

.message-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
  padding-left: 16px;
}

.message-system {
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.session-status {
  padding: 12px 20px;
  font-size: 12px;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.panel-right {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  overflow: hidden;
}

.code-tabs {
  display: flex;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.code-tab {
  padding: 14px 16px;
  font-size: 12px;
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.code-tab:hover {
  color: var(--fg);
}

.code-tab.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.code-content {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.7;
  background: var(--bg);
  margin: 20px;
  border: 1px solid var(--border);
}

.code-empty {
  color: var(--fg-muted);
  font-size: 13px;
}

.code-line {
  display: flex;
}

.line-num {
  width: 32px;
  color: var(--fg-muted);
  text-align: right;
  padding-right: 16px;
  user-select: none;
  opacity: 0.5;
}

.line-code {
  flex: 1;
  white-space: pre-wrap;
}

.s-tag { color: #7EC699; }
.s-attr { color: #E0C589; }
.s-str { color: #98C379; }
.s-kw { color: #C678DD; }
.s-fn { color: #61AFEF; }
.s-prop { color: #E06C75; }

/* Responsive */
@media (max-width: 1000px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  
  .hero-preview {
    max-width: 500px;
  }
  
  .coder-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .coder-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .panel-right {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-text h1 {
    font-size: 32px;
  }
  
  .hero {
    padding: 60px 20px;
  }
  
  .coders-section, .about-section, .cta-section, .context-section {
    padding: 80px 20px;
  }
  
  .coder-grid {
    grid-template-columns: 1fr;
  }
  
  .coder-card:last-child {
    grid-column: span 1;
  }
  
  .nav {
    padding: 0 20px;
  }
}
