/* Estilos personalizados para o BrilhaVest - FUVEST & ENEM */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-sans);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.font-serif {
  font-family: var(--font-serif);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Scrollbar estilizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 3D Flip Card para os Flashcards */
.perspective-1000 {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card-inner.is-flipped {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1rem;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Efeito de brilho / gradiente sutil */
.gradient-vestibular {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e3a8a 100%);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Animações suaves de fade */
.fade-in,
.animate-fadeIn {
  animation: fadeIn 0.25s ease-out forwards;
}

/* Utilitário para ocultar barra de rolagem horizontal em menus mobile */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

/* Contador de linhas da Redação */
.line-counter {
  counter-reset: line;
}

.line-counter > div::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 2rem;
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: right;
  margin-right: 0.75rem;
  user-select: none;
}

/* Transição de cores */
.transition-card {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.transition-card:hover {
  transform: translateY(-2px);
}

/* ======================================================== */
/* MODO ESCURO (DARK MODE)                                  */
/* ======================================================== */
html.dark {
  color-scheme: dark;
}

html.dark body {
  background-color: #0b0f19;
  color: #e2e8f0;
}

html.dark .glass-nav {
  background: rgba(11, 15, 25, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark .bg-white {
  background-color: #151c2c !important;
}

html.dark .bg-slate-50 {
  background-color: #0f172a !important;
}

html.dark .bg-slate-100 {
  background-color: #1e293b !important;
}

html.dark .bg-slate-200\/80 {
  background-color: #1e293b !important;
}

html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-200\/80 {
  border-color: #242f44 !important;
}

html.dark .text-slate-900 {
  color: #f8fafc !important;
}

html.dark .text-slate-800 {
  color: #e2e8f0 !important;
}

html.dark .text-slate-700 {
  color: #cbd5e1 !important;
}

html.dark .text-slate-600 {
  color: #94a3b8 !important;
}

html.dark .text-slate-500 {
  color: #64748b !important;
}

html.dark input,
html.dark select,
html.dark textarea {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748b !important;
}

html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: #1e293b !important;
}

html.dark .bg-indigo-50 {
  background-color: rgba(99, 102, 241, 0.12) !important;
}

html.dark .bg-amber-50 {
  background-color: rgba(245, 158, 11, 0.12) !important;
}

html.dark .bg-emerald-50 {
  background-color: rgba(16, 185, 129, 0.12) !important;
}

html.dark .bg-rose-50 {
  background-color: rgba(244, 63, 94, 0.12) !important;
}

html.dark .bg-blue-50 {
  background-color: rgba(59, 130, 246, 0.12) !important;
}

html.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}
