@charset "UTF-8";

/* ==========================================================================
   Nordic Minimalist Slate & Brainly Academic Dashboard — Styles
   ========================================================================== */

:root {
  --bg-obsidian: #0b0f17;
  --bg-slate-dark: #111722;
  --bg-slate-card: #151c28;
  --bg-slate-hover: #1a2333;
  --border-subtle: #1e293b;
  --border-medium: #253346;
  --border-focus: #38bdf8;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-sky: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;
  --accent-purple: #c084fc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-obsidian);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.font-serif {
  font-family: 'Playfair Display', 'Newsreader', Georgia, serif !important;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace !important;
}

/* Sidebar Navigation Buttons */
.sidebar-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  text-align: left;
}

.sidebar-nav-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-slate-card);
  border-color: var(--border-subtle);
}

.sidebar-nav-btn.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.08));
  border-color: rgba(56, 189, 248, 0.35);
}

/* Subject Chips */
.chip {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background-color: var(--bg-obsidian);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all 0.15s ease;
  cursor: pointer;
}

.chip:hover {
  color: var(--text-main);
  border-color: var(--border-medium);
}

.chip.active {
  background-color: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
  color: var(--accent-amber);
  font-weight: 600;
}

/* Modal Overlays & Centering */
#login-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(7, 10, 16, 0.94);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
}

#login-modal.hidden,
.hidden {
  display: none !important;
}

#login-modal > div {
  width: 100%;
  max-width: 440px;
  background: var(--bg-slate-dark);
  border: 1px solid var(--border-medium);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.05);
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

#cmd-palette-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding-top: 6rem;
  background: rgba(7, 10, 16, 0.85);
  backdrop-filter: blur(8px);
}

#cmd-palette-modal.hidden {
  display: none !important;
}

#pdf-modal, #note-modal, #folder-modal, #quiz-gen-modal, #card-gen-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(7, 10, 16, 0.9);
  backdrop-filter: blur(8px);
}

#pdf-modal.hidden, #note-modal.hidden, #folder-modal.hidden, #quiz-gen-modal.hidden, #card-gen-modal.hidden {
  display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-obsidian);
}
::-webkit-scrollbar-thumb {
  background: #222f3e;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #33445b;
}

/* Inputs & Form Elements */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  background-color: var(--bg-obsidian);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-sky);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

/* Button Classes */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #ffffff;
  background-color: #0284c7;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}
.btn-primary:hover {
  background-color: #0369a1;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-slate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-slate-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}
.btn-slate:hover {
  background-color: var(--bg-slate-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

/* Kahoot Game Buttons */
.kahoot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border-radius: 1rem;
  color: #ffffff;
  font-weight: 600;
  border-bottom-width: 4px;
  cursor: pointer;
  transition: all 0.1s ease-in-out;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.kahoot-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.kahoot-btn:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
}

/* 3D Flashcard Flip Effect */
.flashcard-card {
  perspective: 1000px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.flashcard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  border-color: var(--border-focus);
}

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Math KaTeX typography overrides */
.katex-display {
  margin: 0.85em 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35em 0;
}
.katex {
  font-size: 1.05em;
  color: #e2e8f0;
}

/* Markdown prose rendering */
.prose {
  color: #cbd5e1;
  line-height: 1.7;
}
.prose h1, .prose h2, .prose h3 {
  color: #f8fafc;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
}
.prose h1 { font-size: 1.35rem; }
.prose h2 { font-size: 1.15rem; }
.prose h3 { font-size: 1.0rem; }
.prose p { margin-bottom: 0.75em; }
.prose code {
  background: #090d14;
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  border: 1px solid #1e293b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: #38bdf8;
}
.prose pre {
  background: #070a10;
  border: 1px solid #1e293b;
  padding: 0.85rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 0.75em 0;
}
.prose blockquote {
  border-left: 3px solid var(--accent-sky);
  padding-left: 0.75em;
  margin: 0.75em 0;
  color: #94a3b8;
  font-style: italic;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0;
  font-size: 0.85rem;
}
.prose th, .prose td {
  border: 1px solid #1e293b;
  padding: 0.4rem 0.6rem;
}
.prose th {
  background: #111722;
  color: #f1f5f9;
  font-weight: 600;
}

/* Brainly Community Feed & UI Enhancements */
.feed-filter-btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background-color: #0b0f17;
  border: 1px solid #1e293b;
  color: #94a3b8;
  white-space: nowrap;
  transition: all 0.15s ease;
  cursor: pointer;
}
.feed-filter-btn:hover {
  color: #f1f5f9;
  border-color: #38bdf8;
}
.feed-filter-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}

.brainly-q-card {
  background: #111726;
  border: 1px solid #1e293b;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.brainly-q-card:hover {
  border-color: #2b3952;
}

.verified-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 78, 59, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 0.875rem;
  padding: 1.25rem;
}
