/* Custom CSS for sb.aiadm.net */

/* Glassmorphism & Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.8);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 1);
}

/* Tab active style */
.nav-tab.active {
  background-color: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-left: 3px solid #22c55e;
}

.nav-tab:hover:not(.active) {
  background-color: rgba(31, 41, 55, 0.6);
  color: #f1f5f9;
}

/* Markdown typography in dark mode */
.prose-dark {
  color: #cbd5e1;
}

.prose-dark h1, .prose-dark h2, .prose-dark h3, .prose-dark h4 {
  color: #f8fafc;
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.prose-dark h1 { font-size: 1.25rem; }
.prose-dark h2 { font-size: 1.1rem; }
.prose-dark h3 { font-size: 0.95rem; }

.prose-dark p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.prose-dark ul, .prose-dark ol {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.prose-dark ul { list-style-type: disc; }
.prose-dark ol { list-style-type: decimal; }

.prose-dark code:not(pre code) {
  background-color: #1e293b;
  color: #38bdf8;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
}

.prose-dark pre {
  background-color: #0f172a !important;
  border: 1px solid #1e293b;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  overflow-x: auto;
}

.prose-dark pre code {
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.prose-dark blockquote {
  border-left: 3px solid #10b981;
  padding-left: 0.75rem;
  margin: 0.75rem 0;
  color: #94a3b8;
  font-style: italic;
}

.prose-dark table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.85rem;
}

.prose-dark th, .prose-dark td {
  border: 1px solid #1e293b;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.prose-dark th {
  background-color: #1e293b;
  color: #f1f5f9;
}

/* Blinking cursor for typewriter effect */
.typing-cursor::after {
  content: '▋';
  display: inline-block;
  vertical-align: middle;
  color: #22c55e;
  animation: blink 0.9s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in {
  animation: fadeIn 0.15s ease-out forwards;
}

/* Light mode overrides when class 'dark' is removed */
html:not(.dark) body {
  background-color: #f8fafc;
  color: #1e293b;
}

html:not(.dark) .bg-dark-bg {
  background-color: #f1f5f9;
}

html:not(.dark) .bg-dark-card {
  background-color: #ffffff;
}

html:not(.dark) .bg-dark-input {
  background-color: #f8fafc;
}

html:not(.dark) .border-dark-border {
  border-color: #e2e8f0;
}

html:not(.dark) .text-white {
  color: #0f172a;
}

html:not(.dark) .text-slate-200, html:not(.dark) .text-slate-300 {
  color: #334155;
}

html:not(.dark) .prose-dark {
  color: #334155;
}

html:not(.dark) .prose-dark h1, html:not(.dark) .prose-dark h2, html:not(.dark) .prose-dark h3 {
  color: #0f172a;
}

html:not(.dark) .prose-dark pre {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1;
}

html:not(.dark) .prose-dark pre code {
  color: #0f172a;
}
