/* Keep It Krispy - Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #0f0f23 100%);
  color: #e0e0e0;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Navigation */
nav {
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

nav .nav-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .nav-brand {
  color: #00d4aa;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
}

nav .nav-links {
  display: flex;
  gap: 25px;
  list-style: none;
}

nav .nav-links a {
  color: #a0a0b0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: #00d4aa;
}

/* Mobile nav */
@media (max-width: 600px) {
  nav .nav-container {
    flex-direction: column;
    gap: 15px;
  }
  nav .nav-links {
    gap: 15px;
  }
}

/* Header */
header {
  text-align: center;
  margin-bottom: 60px;
}

.logo {
  max-width: 400px;
  width: 100%;
  margin-bottom: 20px;
}

.tagline {
  font-size: 1.3rem;
  color: #a0a0b0;
  margin-bottom: 30px;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: background 0.2s;
}

.github-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Sections */
section {
  margin-bottom: 50px;
}

h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 20px;
}

h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h3 {
  color: #a78bfa;
  font-size: 1.1rem;
  margin: 25px 0 12px 0;
}

p {
  margin-bottom: 15px;
  color: #b0b0c0;
}

strong {
  color: #fff;
}

/* Install box */
.install-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 50px;
}

.install-box h2 {
  color: #00d4aa;
  margin-bottom: 15px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: none;
  padding-bottom: 0;
}

.curl-command {
  background: #0d0d1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px 20px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.95rem;
  color: #00d4aa;
  overflow-x: auto;
  position: relative;
}

.curl-command::before {
  content: '$ ';
  color: #666;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.feature {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 20px;
}

.feature strong {
  color: #00d4aa;
  display: block;
  margin-bottom: 8px;
}

/* Info boxes */
.info-box {
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 8px;
  padding: 15px 20px;
  margin: 15px 0;
}

.warning-box {
  background: rgba(250, 200, 100, 0.1);
  border: 1px solid rgba(250, 200, 100, 0.3);
  border-radius: 8px;
  padding: 15px 20px;
  margin: 15px 0;
}

.warning-box strong {
  color: #fac864;
}

/* Conversation/chat bubbles */
.conversation {
  margin: 20px 0;
}

.chat-bubble {
  padding: 15px 20px;
  border-radius: 12px;
  margin: 10px 0;
  position: relative;
}

.chat-bubble.user {
  background: rgba(100, 150, 255, 0.15);
  border: 1px solid rgba(100, 150, 255, 0.3);
  margin-left: 20px;
}

.chat-bubble.claude {
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.3);
  margin-right: 20px;
}

.chat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.chat-bubble.user .chat-label { color: #6496ff; }
.chat-bubble.claude .chat-label { color: #00d4aa; }

/* Code blocks */
pre.architecture {
  background: #0d0d1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #a0a0b0;
}

code {
  background: rgba(0, 212, 170, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.9em;
  color: #00d4aa;
}

/* Tables */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.cost-table th, .cost-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cost-table th {
  color: #a78bfa;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #00d4aa;
  color: #000;
}

.btn-primary:hover {
  background: #00e6b8;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(167, 139, 250, 0.2);
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 8px;
  color: #a78bfa;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.preview-btn:hover {
  background: rgba(167, 139, 250, 0.3);
}

/* Step lists */
.step-list {
  list-style: none;
  counter-reset: step;
}

.step-list li {
  counter-increment: step;
  padding: 15px 0 15px 50px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  width: 30px;
  height: 30px;
  background: rgba(0, 212, 170, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00d4aa;
  font-weight: 600;
}

/* Prereq grid */
.prereq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.prereq {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.prereq-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

/* Setup steps */
.setup-step {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 20px;
  margin: 15px 0;
}

.setup-step h3 {
  margin-top: 0;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: #a0a0b0;
  cursor: pointer;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.tab:hover {
  color: #fff;
}

.tab.active {
  color: #00d4aa;
  border-bottom-color: #00d4aa;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Highlight */
.highlight {
  background: rgba(0, 212, 170, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  color: #00d4aa;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #666;
  font-size: 0.85rem;
}

footer a {
  color: #00d4aa;
  text-decoration: none;
}

/* Card grid for examples */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 25px;
}

.card h3 {
  margin-top: 0;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal-overlay.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.modal {
  background: #0d0d1a;
  border: 1px solid #333;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #333;
  background: #0a0a12;
}

.modal-header h3 {
  color: #fff;
  font-size: 1.1rem;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Terminal preview */
.terminal {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.terminal-header {
  background: #1a1a1a;
  padding: 8px 12px;
  display: flex;
  gap: 6px;
}

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

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-content {
  padding: 16px;
  color: #ccc;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-step {
  margin-bottom: 24px;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.terminal-step.active {
  opacity: 1;
}

.terminal-step.completed {
  opacity: 0.7;
}

.step-label {
  display: inline-block;
  background: #333;
  color: #888;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-label.auto {
  background: rgba(0, 212, 170, 0.2);
  color: #00d4aa;
}

.step-label.input {
  background: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.step-label.output {
  background: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
}

.user-input {
  display: inline-block;
  background: rgba(251, 191, 36, 0.2);
  border: 2px solid #fbbf24;
  border-radius: 4px;
  padding: 2px 8px;
  color: #fbbf24;
  font-weight: bold;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: #fbbf24; }
  50% { border-color: rgba(251, 191, 36, 0.4); }
}

.success { color: #00d4aa; }
.warning { color: #fbbf24; }
.muted { color: #666; }
.highlight-url { color: #a78bfa; }

.step-nav {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

.step-nav button {
  flex: 1;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.step-nav .prev-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  color: #888;
}

.step-nav .prev-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.step-nav .next-btn {
  background: rgba(0, 212, 170, 0.2);
  border: 1px solid #00d4aa;
  color: #00d4aa;
}

.step-nav .next-btn:hover:not(:disabled) {
  background: rgba(0, 212, 170, 0.3);
}

.step-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  transition: all 0.3s;
}

.step-dot.active {
  background: #00d4aa;
  transform: scale(1.3);
}

.step-dot.completed {
  background: #00d4aa;
}

/* ===========================================
   MOBILE RESPONSIVE STYLES
   =========================================== */

@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .logo {
    max-width: 280px;
  }

  /* Install box */
  .install-box {
    padding: 20px;
  }

  .curl-command {
    font-size: 0.8rem;
    padding: 12px 15px;
  }

  /* Feature grid */
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    padding: 15px;
  }

  /* Chat bubbles */
  .chat-bubble {
    padding: 12px 15px;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Code blocks */
  pre.architecture {
    font-size: 0.75rem;
    padding: 15px;
  }

  code {
    font-size: 0.8em;
    word-break: break-all;
  }

  /* Tables - horizontal scroll */
  .cost-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .cost-table th, .cost-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  /* Buttons */
  .btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }

  /* Step lists */
  .step-list li {
    padding: 12px 0 12px 45px;
  }

  /* Prereq grid */
  .prereq-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .prereq {
    padding: 10px;
    font-size: 0.85rem;
  }

  .prereq-icon {
    font-size: 1.2rem;
  }

  /* Setup steps */
  .setup-step {
    padding: 15px;
  }

  /* Tabs */
  .tabs {
    flex-wrap: wrap;
  }

  .tab {
    padding: 10px 15px;
    font-size: 0.85rem;
  }

  /* Card grid */
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }

  /* Modal */
  .modal-overlay {
    padding: 20px 10px;
  }

  .modal {
    max-height: none;
  }

  .modal-header {
    padding: 15px 18px;
  }

  .modal-body {
    padding: 18px;
  }

  /* Terminal */
  .terminal {
    font-size: 0.75rem;
  }

  .terminal-content {
    padding: 12px;
  }

  .step-nav {
    flex-direction: column;
  }

  .step-nav button {
    width: 100%;
  }

  /* Footer */
  footer {
    padding: 30px 15px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .logo {
    max-width: 220px;
  }

  .tagline {
    font-size: 1rem;
  }

  .prereq-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .curl-command {
    font-size: 0.7rem;
  }

  pre.architecture {
    font-size: 0.65rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  /* Stack buttons on small screens */
  section[style*="text-align: center"] .btn {
    display: block;
    margin: 10px auto;
  }
}
