/* ============================================================
   Simulado TI — estilos (convertido do tema Tailwind original)
   Tema "Tech Dark": roxo (primary) + ciano (accent), fundo escuro.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --radius: 0.75rem;

  --background: oklch(0.13 0.03 270);
  --foreground: oklch(0.97 0.01 250);
  --card: oklch(0.17 0.04 268);
  --card-foreground: oklch(0.97 0.01 250);
  --primary: oklch(0.62 0.22 275);
  --primary-foreground: oklch(0.99 0 0);
  --secondary: oklch(0.24 0.05 270);
  --secondary-foreground: oklch(0.97 0.01 250);
  --muted: oklch(0.22 0.04 270);
  --muted-foreground: oklch(0.68 0.04 260);
  --accent: oklch(0.72 0.18 195);
  --accent-foreground: oklch(0.13 0.03 270);
  --destructive: oklch(0.62 0.24 25);
  --destructive-foreground: oklch(0.99 0 0);
  --success: oklch(0.72 0.18 155);
  --success-foreground: oklch(0.13 0.03 270);
  --warning: oklch(0.78 0.16 75);
  --border: oklch(0.27 0.04 270);
  --input: oklch(0.22 0.04 270);
  --ring: oklch(0.62 0.22 275);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gradient-hero: radial-gradient(ellipse at top, oklch(0.32 0.18 278 / 0.5), transparent 60%),
    radial-gradient(ellipse at bottom right, oklch(0.4 0.16 200 / 0.25), transparent 55%),
    linear-gradient(180deg, oklch(0.13 0.03 270), oklch(0.1 0.02 270));
  --gradient-card: linear-gradient(135deg, oklch(0.2 0.05 275 / 0.8), oklch(0.16 0.04 270 / 0.8));
  --shadow-glow: 0 0 60px -10px oklch(0.62 0.22 275 / 0.55);
  --shadow-card: 0 10px 40px -15px oklch(0 0 0 / 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; border-color: var(--border); }

html, body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body {
  background-image:
    radial-gradient(circle at 20% 0%, oklch(0.62 0.22 275 / 0.08), transparent 50%),
    radial-gradient(circle at 80% 100%, oklch(0.72 0.18 195 / 0.06), transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; }
a { color: inherit; text-decoration: none; }

/* Layout */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 5rem 0; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }

/* Cores utilitárias */
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted-foreground); }
.text-success { color: var(--success); }
.text-destructive { color: var(--destructive); }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid oklch(0.27 0.04 270 / 0.6);
  background: oklch(0.13 0.03 270 / 0.8);
  backdrop-filter: blur(18px);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 1rem;
  height: 4rem; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; }
.logo-badge {
  display: grid; place-items: center; height: 2.25rem; width: 2.25rem;
  border-radius: 0.5rem; background: var(--primary); color: var(--primary-foreground);
  box-shadow: var(--shadow-glow);
}
.nav { display: none; align-items: center; gap: 0.25rem; }
.nav a { padding: 0.5rem 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); border-radius: 0.5rem; }
.nav a:hover { color: var(--foreground); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
@media (min-width: 768px) { .nav { display: flex; } }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 500; font-size: 0.9rem;
  padding: 0.6rem 1.1rem; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: all 0.15s ease; white-space: nowrap; line-height: 1;
}
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { filter: brightness(1.15); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--secondary); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--secondary); }
.btn-glow { box-shadow: var(--shadow-glow); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Cards */
.glow-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
}
.hero-bg { background: var(--gradient-hero); }

/* Badges / pills */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; border: 1px solid var(--border);
  background: oklch(0.17 0.04 268 / 0.6); padding: 0.375rem 1rem;
  font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground);
}
.dot { height: 0.5rem; width: 0.5rem; border-radius: 9999px; background: var(--success); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* Grids */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Ícone em bloco */
.icon-box {
  display: inline-flex; height: 2.75rem; width: 2.75rem; align-items: center; justify-content: center;
  border-radius: 0.5rem; background: oklch(0.62 0.22 275 / 0.15); color: var(--primary);
}
.icon-box.accent { background: oklch(0.72 0.18 195 / 0.15); color: var(--accent); }

/* Formulários */
.field { margin-bottom: 1rem; }
.label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.35rem; }
.input {
  width: 100%; padding: 0.6rem 0.8rem; font-size: 0.95rem;
  background: var(--input); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 0.6rem; font-family: inherit;
}
.input:focus { outline: 2px solid var(--ring); outline-offset: 1px; }

/* Flash / alertas */
.flash { padding: 0.8rem 1rem; border-radius: 0.6rem; margin-bottom: 1rem; font-size: 0.9rem; border: 1px solid; }
.flash-success { background: oklch(0.72 0.18 155 / 0.12); border-color: var(--success); color: var(--success); }
.flash-error   { background: oklch(0.62 0.24 25 / 0.12); border-color: var(--destructive); color: var(--destructive); }
.flash-info    { background: oklch(0.62 0.22 275 / 0.12); border-color: var(--primary); color: var(--foreground); }

/* Utilitários de espaçamento */
.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}
.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-10{margin-top:2.5rem}.mt-16{margin-top:4rem}
.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-12{margin-bottom:3rem}
.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}
.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}
.justify-between{justify-content:space-between}.flex-wrap{flex-wrap:wrap}.flex-col{flex-direction:column}

/* Tipos de texto */
.h1-hero { font-size: 2.5rem; font-weight: 700; }
.h2 { font-size: 1.875rem; font-weight: 700; }
.lead { font-size: 1.125rem; color: var(--muted-foreground); }
.small { font-size: 0.875rem; color: var(--muted-foreground); }
.text-gradient { background: linear-gradient(to right, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (min-width: 768px) { .h1-hero { font-size: 4rem; } .h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .h1-hero { font-size: 4.5rem; } }

/* Footer */
.footer { border-top: 1px solid oklch(0.27 0.04 270 / 0.6); padding: 2rem 0; text-align: center; }

/* Modo prova: bloqueio de seleção/print */
.exam-mode, .exam-mode * {
  -webkit-user-select: none !important; -moz-user-select: none !important;
  user-select: none !important; -webkit-touch-callout: none !important;
}
@media print {
  .exam-mode { display: none !important; }
  body::after { content: "Impressão bloqueada durante o simulado."; display: block; color: black; }
}

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* !important: garante que .hidden vença regras como .modal-overlay{display:flex},
   senão os modais nascem abertos e não fecham. */
.hidden { display: none !important; }
/* Padrão "escondido no celular, visível no desktop": usado como class="hidden sm-inline".
   Precisa de !important para vencer o .hidden !important acima. */
@media (min-width: 640px) { .sm-inline { display: inline !important; } }
