/* assets/style.css - LLMs.txt Tools */

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb { background: #334155; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.dark ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ===== SELECTION ===== */
::selection { background: #bae6fd; color: #0c4a6e; }
.dark ::selection { background: #0369a1; color: #e0f2fe; }

/* ===== FOCUS ===== */
:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border-color: #0284c7;
  box-shadow: 0 1px 3px rgba(14,165,233,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 4px 12px rgba(14,165,233,0.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: #0ea5e9;
  border-color: #0ea5e9;
}
.btn-secondary:hover {
  background: #f0f9ff;
  box-shadow: 0 2px 8px rgba(14,165,233,0.15);
}
.dark .btn-secondary:hover { background: rgba(14,165,233,0.1); }

.btn-ghost {
  background: transparent;
  color: #64748b;
  border-color: #e2e8f0;
}
.btn-ghost:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}
.dark .btn-ghost {
  color: #94a3b8;
  border-color: #334155;
}
.dark .btn-ghost:hover {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #475569;
}

.btn-danger {
  background: transparent;
  color: #ef4444;
  border-color: #ef4444;
}
.btn-danger:hover {
  background: #fef2f2;
  box-shadow: 0 2px 8px rgba(239,68,68,0.15);
}
.dark .btn-danger:hover { background: rgba(239,68,68,0.1); }

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

/* ===== CARDS ===== */
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.dark .card {
  background: #0f172a;
  border-color: #1e293b;
}
.card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}
.dark .card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  border-color: #334155;
}

.card-elevated {
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.dark .card-elevated {
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* ===== INPUTS ===== */
.input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}
.input::placeholder { color: #94a3b8; }
.dark .input {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
.dark .input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
}
.dark .input::placeholder { color: #475569; }

.textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: vertical;
  min-height: 200px;
  line-height: 1.6;
}
.textarea:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}
.dark .textarea {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
.dark .textarea:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  gap: 1rem;
}

.bento-cell {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.dark .bento-cell {
  background: #0f172a;
  border-color: #1e293b;
}

.bento-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s;
}
.bento-cell:hover::before { opacity: 1; }

/* ===== MARKDOWN PREVIEW ===== */
.markdown-preview {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.7;
  color: #1e293b;
}
.dark .markdown-preview { color: #e2e8f0; }

.markdown-preview h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}
.dark .markdown-preview h1 {
  color: #f8fafc;
  border-bottom-color: #1e293b;
}

.markdown-preview h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.dark .markdown-preview h2 { color: #f1f5f9; }

.markdown-preview h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin-top: 1rem;
  margin-bottom: 0.375rem;
}
.dark .markdown-preview h3 { color: #cbd5e1; }

.markdown-preview blockquote {
  border-left: 3px solid #0ea5e9;
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: #f0f9ff;
  border-radius: 0 0.375rem 0.375rem 0;
  color: #0369a1;
  font-style: italic;
}
.dark .markdown-preview blockquote {
  background: rgba(14,165,233,0.1);
  color: #7dd3fc;
}

.markdown-preview ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}
.markdown-preview ul li {
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.875rem;
}
.markdown-preview ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #0ea5e9;
  font-weight: bold;
}

.markdown-preview a {
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 500;
}
.markdown-preview a:hover { text-decoration: underline; }

.markdown-preview code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
  background: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #0369a1;
}
.dark .markdown-preview code {
  background: #1e293b;
  color: #7dd3fc;
}

/* ===== CODE BLOCK ===== */
.code-block {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 1.25rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #e2e8f0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.dark .code-block {
  background: #020617;
  border-color: #0f172a;
}

/* ===== SCORE METER ===== */
.score-ring {
  transform: rotate(-90deg);
  transform-origin: center;
}

.score-ring-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 8;
}
.dark .score-ring-bg { stroke: #1e293b; }

.score-ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}
.dark .progress-bar { background: #1e293b; }

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.8s ease;
  background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-blue { background: #dbeafe; color: #1d4ed8; }
.dark .badge-blue { background: rgba(29,78,216,0.2); color: #93c5fd; }

.badge-green { background: #dcfce7; color: #15803d; }
.dark .badge-green { background: rgba(21,128,61,0.2); color: #86efac; }

.badge-yellow { background: #fef9c3; color: #a16207; }
.dark .badge-yellow { background: rgba(161,98,7,0.2); color: #fde047; }

.badge-red { background: #fee2e2; color: #b91c1c; }
.dark .badge-red { background: rgba(185,28,28,0.2); color: #fca5a5; }

.badge-purple { background: #ede9fe; color: #6d28d9; }
.dark .badge-purple { background: rgba(109,40,217,0.2); color: #c4b5fd; }

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(14,165,233,0.2);
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  font-size: 0.875rem;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.dark .toast { background: #1e293b; }

/* ===== HERO GRADIENT ===== */
.hero-gradient {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #ede9fe 100%);
}
.dark .hero-gradient {
  background: linear-gradient(135deg, #020617 0%, #0c1a2e 50%, #0f0a1e 100%);
}

/* ===== FEATURE ICON ===== */
.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== STEP INDICATOR ===== */
.step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
  margin: 2rem 0;
}
.dark .divider {
  background: linear-gradient(90deg, transparent, #1e293b, transparent);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== GLOW EFFECT ===== */
.glow-blue {
  box-shadow: 0 0 20px rgba(14,165,233,0.3);
}
.glow-purple {
  box-shadow: 0 0 20px rgba(139,92,246,0.3);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14,165,233,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(14,165,233,0); }
}

.animate-fade-in { animation: fadeIn 0.5s ease-in-out; }
.animate-slide-up { animation: slideUp 0.4s ease-out; }
.animate-slide-in { animation: slideIn 0.4s ease-out; }
.animate-pulse-glow { animation: pulse-glow 2s infinite; }

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 640px) {
  .btn { padding: 0.5rem 1rem; font-size: 0.8125rem; }
  .btn-lg { padding: 0.625rem 1.25rem; font-size: 0.9375rem; }
  .bento-cell { padding: 1rem; border-radius: 0.75rem; }
}

/* ===== PRINT ===== */
@media print {
  header, footer, .no-print { display: none !important; }
  body { background: white !important; color: black !important; }
  .card, .bento-cell { border: 1px solid #ccc !important; box-shadow: none !important; }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== CUSTOM CHECKBOX ===== */
.custom-checkbox {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.25rem;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.custom-checkbox:checked {
  background: #0ea5e9;
  border-color: #0ea5e9;
}
.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 1px; left: 4px;
  width: 5px; height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.dark .custom-checkbox {
  background: #0f172a;
  border-color: #334155;
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.75rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 50;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ===== SECTION STYLES ===== */
.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}
.dark .section-title { color: #f8fafc; }

.section-subtitle {
  font-size: 1.0625rem;
  color: #64748b;
  line-height: 1.6;
}
.dark .section-subtitle { color: #94a3b8; }

/* ===== FAQ ACCORDION ===== */
.faq-item { border-bottom: 1px solid #e2e8f0; }
.dark .faq-item { border-bottom-color: #1e293b; }

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 0;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0f172a;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.2s;
}
.dark .faq-question { color: #f1f5f9; }
.faq-question:hover { color: #0ea5e9; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.7;
}
.dark .faq-answer { color: #94a3b8; }
.faq-answer.open {
  max-height: 500px;
  padding-bottom: 1rem;
}

.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.3s;
  color: #0ea5e9;
}
.faq-icon.open { transform: rotate(180deg); }
