/* Custom Styling for NotebookLM AI Tutor (ChatGPT-like UI + Google Auth & PDF) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-main: #0d1117;
  --bg-sidebar: #161b22;
  --bg-card: #21262d;
  --bg-card-hover: #30363d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border-color: #30363d;
  --accent-blue: #2f81f7;
  --accent-purple: #8957e5;
  --accent-emerald: #238636;
  --accent-rose: #da3633;
  --gemini-gradient: linear-gradient(135deg, #4285f4, #9b51e0, #ea4335);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
}

/* Enable text selection everywhere in chat, code, and content */
.prose-custom,
.prose-custom *,
pre,
code,
.question-block,
.explanation-box,
#messagesList,
.user-msg-bubble,
.assistant-msg-bubble {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Code fonts */
code, pre {
  font-family: 'JetBrains Mono', monospace;
}

/* Markdown prose in AI messages */
.prose-custom {
  color: #e6edf3;
  line-height: 1.65;
  user-select: text;
}
.prose-custom p {
  margin-bottom: 0.85rem;
}
.prose-custom h1, .prose-custom h2, .prose-custom h3, .prose-custom h4 {
  color: #ffffff;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.prose-custom h1 { font-size: 1.4rem; }
.prose-custom h2 { font-size: 1.2rem; }
.prose-custom h3 { font-size: 1.05rem; }
.prose-custom ul, .prose-custom ol {
  margin-left: 1.25rem;
  margin-bottom: 0.85rem;
}
.prose-custom ul { list-style-type: disc; }
.prose-custom ol { list-style-type: decimal; }
.prose-custom li {
  margin-bottom: 0.35rem;
}
.prose-custom strong {
  color: #ffffff;
  font-weight: 600;
}
.prose-custom blockquote {
  border-left: 3px solid #8957e5;
  padding-left: 0.85rem;
  color: #8b949e;
  margin: 0.75rem 0;
  font-style: italic;
}
.prose-custom table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.prose-custom th, .prose-custom td {
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.prose-custom th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

/* Citation Badges */
.citation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(137, 87, 229, 0.18);
  border: 1px solid rgba(137, 87, 229, 0.4);
  color: #d2a8ff;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.citation-badge:hover {
  background: rgba(137, 87, 229, 0.35);
  border-color: #bc8cff;
  transform: translateY(-1px);
}

/* Pulse animation for thinking */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}
.thinking-glow {
  animation: pulseGlow 1.8s infinite ease-in-out;
}

/* Quiz Option Card Animations */
.quiz-option-card {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.quiz-option-card:hover:not(.locked) {
  transform: translateY(-2px);
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.08);
}
.quiz-option-card.selected:not(.locked) {
  border-color: #2f81f7;
  background: rgba(47, 129, 247, 0.15);
  box-shadow: 0 0 0 1px #2f81f7;
}
.quiz-option-card.correct {
  border-color: #238636 !important;
  background: rgba(35, 134, 54, 0.2) !important;
  color: #7ee787 !important;
}
.quiz-option-card.incorrect {
  border-color: #da3633 !important;
  background: rgba(218, 54, 51, 0.2) !important;
  color: #ffa198 !important;
}

/* Tab Navigation Active Indicator */
.tab-btn.active {
  color: #58a6ff;
  border-bottom: 2px solid #58a6ff;
  background: rgba(88, 166, 255, 0.08);
}

/* Drag and Drop Zone */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}
.dropzone.dragover {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
  transform: scale(1.01);
}

/* Recent Chat Items */
.chat-session-item {
  transition: all 0.15s ease;
}
.chat-session-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.chat-session-item.active {
  background: rgba(47, 129, 247, 0.15);
  border-color: rgba(47, 129, 247, 0.4);
}

/* Difficulty Option Buttons */
.difficulty-btn {
  transition: all 0.2s ease;
}
.difficulty-btn.active {
  box-shadow: 0 0 0 2px currentColor;
}
