@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-base: #060913;
    --surface: #0b101f;
    --surface-hover: #131a31;
    --border: #1e2640;
    --border-glow: #2563eb;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.menu-icon-img { width: 18px !important; height: 18px !important; filter: invert(0.6); object-fit: contain; }
.menu-item.active .menu-icon-img { filter: invert(0.7) sepia(1) saturate(5) hue-rotate(185deg); }
.dash-title-img { width: 22px !important; height: 22px !important; vertical-align: middle; filter: invert(1); object-fit: contain; }

.sidebar {
    width: 270px;
    background: rgba(11, 16, 31, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 16px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 8px 24px 8px;
    border-bottom: 1px solid var(--border);
}
.sidebar-brand img { width: 34px; height: 34px; filter: invert(1); object-fit: contain; }
.sidebar-brand h1 { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.3px; line-height: 1.2; }
.sidebar-brand .sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.sidebar-menu { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}
.menu-item:hover { background: rgba(37, 99, 235, 0.08); color: #fff; border-color: rgba(37, 99, 235, 0.2); }
.menu-item.active { background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.05)); color: #60a5fa; border-color: rgba(37, 99, 235, 0.4); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15); }

.sidebar-footer { padding-top: 18px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted); text-align: center; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.7);
    z-index: 150;
    backdrop-filter: blur(6px);
}

.main-wrapper {
    margin-left: 270px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 270px);
}

.topbar {
    background: rgba(6, 9, 19, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu-btn {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
}

.topbar-title { font-size: 14px; font-weight: 600; color: var(--text-muted); letter-spacing: -0.2px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.timer {
    font-variant-numeric: tabular-nums;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.timer img { width: 18px; height: 18px; filter: invert(1); object-fit: contain; }
.timer.warn { color: var(--danger); border-color: rgba(239, 68, 68, 0.4); animation: pulse 1s infinite; }

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.container { max-width: 1100px; margin: 0 auto; padding: 40px 36px; width: 100%; flex: 1; }

.card, .dash-card, .subject-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    position: relative;
    width: 100%;
    transition: all 0.25s ease;
}

.login-wrapper { max-width: 440px; margin: 40px auto; overflow: hidden; }
.login-wrapper::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.login-header { text-align: center; margin-bottom: 28px; }
.login-badge {
    display: inline-block; background: rgba(37, 99, 235, 0.1); color: #60a5fa;
    border: 1px solid rgba(37, 99, 235, 0.25); padding: 5px 12px; border-radius: 20px;
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 12px;
}
.login-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; color: #fff; letter-spacing: -0.5px; }
.login-header p { font-size: 13.5px; color: var(--text-muted); }

.input-group { margin-bottom: 18px; width: 100%; }
.input-group label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.input-group input {
    width: 100%; padding: 14px 16px; background: #04060e; border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-main); font-size: 14.5px; font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.input-group input[type="file"] { padding: 10px; cursor: pointer; color: var(--text-muted); font-size: 13px; }
.input-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.password-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }

.btn {
    border: 0; border-radius: var(--radius-sm); padding: 14px 22px; font-weight: 600; cursor: pointer;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: white; font-size: 14px; font-family: inherit;
    transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35); letter-spacing: -0.2px;
}
.btn img { width: 16px; height: 16px; filter: invert(1); object-fit: contain; }
.btn:hover { background: linear-gradient(135deg, #2563eb, #1e40af); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5); }
.btn:disabled { background: var(--surface-hover); color: var(--text-muted); cursor: not-allowed; box-shadow: none; transform: none; border: 1px solid var(--border); }
.btn.secondary { background: var(--surface-hover); border: 1px solid var(--border); color: var(--text-main); box-shadow: none; }
.btn.secondary:hover:not(:disabled) { background: #1a2744; border-color: var(--border-glow); }
.btn.success { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); }
.btn.success:hover:not(:disabled) { background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5); }
.btn.danger { background: var(--danger); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }

.pay-link { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: #60a5fa; text-decoration: none; font-weight: 600; cursor: pointer; }
.pay-link:hover { text-decoration: underline; }

.payment-wrapper { max-width: 760px; margin: 20px auto; width: 100%; }
.price-tag { font-size: 36px; font-weight: 900; color: #fff; margin: 10px 0; letter-spacing: -1px; }
.price-tag span { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.plan-features { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.plan-features li { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }

.pix-box { background: #04060e; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 22px; text-align: center; margin: 24px 0; width: 100%; }
.pix-code { font-family: monospace; font-size: 11.5px; color: var(--accent); background: #0b101f; padding: 12px; border-radius: 8px; margin-top: 12px; word-break: break-all; border: 1px solid var(--border); width: 100%; }

.welcome-box { margin-bottom: 24px; }
.welcome-box h2 { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.6px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; width: 100%; }
.dash-card { background: linear-gradient(145deg, #0b101f, #04060e); padding: 18px; text-align: center; }
.dash-card b { display: block; font-size: 24px; font-weight: 800; margin-bottom: 4px; color: #fff; }
.dash-card span { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }

#pause-overlay {
    display: none; position: fixed; inset: 0; background: rgba(3, 7, 18, 0.92); z-index: 300;
    backdrop-filter: blur(12px); align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 24px;
}
#pause-overlay h2 { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 12px; }
#pause-overlay p { color: var(--text-muted); font-size: 15px; margin-bottom: 28px; }

.hero { padding: 48px !important; }
.hero h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; color: #fff; display: flex; align-items: center; gap: 12px; letter-spacing: -0.5px; }
.hero p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0; width: 100%; }
.stat { background: #04060e; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); text-align: center; }
.stat b { display: block; font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.stat span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }

.prova-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; width: 100%; }

.nav-panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; position: sticky; top: 96px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); width: 100%;
}
.nav-panel h3 { font-size: 12.5px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; font-weight: 700; }

.grid-numeros { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-height: 380px; overflow-y: auto; padding-right: 4px; margin-top: 14px; width: 100%; }
.grid-numeros::-webkit-scrollbar { width: 6px; }
.grid-numeros::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.num-btn { background: #04060e; border: 1px solid var(--border); color: var(--text-main); padding: 9px 0; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 700; text-align: center; width: 100%; }
.num-btn:hover { border-color: var(--primary); background: var(--surface-hover); }
.num-btn.answered { background: rgba(37, 99, 235, 0.15); border-color: rgba(37, 99, 235, 0.4); color: #93c5fd; }
.num-btn.review { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); color: #fcd34d; }
.num-btn.current { border: 2px solid #60a5fa !important; box-shadow: 0 0 10px rgba(96, 165, 250, 0.2); }

.qhead { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

/* Destaque máximo nas questões */
.qtitle {
    font-size: 18.5px; font-weight: 700; line-height: 1.65; margin-bottom: 28px; color: #ffffff;
    background: rgba(59, 130, 246, 0.06); padding: 22px; border-radius: var(--radius-sm);
    border-left: 5px solid var(--primary); border: 1px solid rgba(59, 130, 246, 0.25); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.option {
    width: 100%; text-align: left; background: #04060e; color: var(--text-main);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px;
    margin: 12px 0; cursor: pointer; transition: all 0.2s ease; font-size: 15px; font-family: inherit;
    display: flex; gap: 16px; align-items: center; font-weight: 500;
}
.option:hover { border-color: var(--primary); background: var(--surface-hover); transform: translateX(4px); }
.option.selected { border-color: var(--primary); background: rgba(37, 99, 235, 0.15); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3); }

.option-letter {
    background: #1e293b; color: #94a3b8; width: 34px; height: 34px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; border: 1px solid var(--border);
}
.option.selected .option-letter { background: var(--primary); color: #fff; border-color: var(--primary); }

.action-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; gap: 14px; width: 100%; }
.btn-group { display: flex; gap: 12px; }

.bigscore { font-size: 64px; font-weight: 900; line-height: 1; margin: 16px 0; color: #fff; letter-spacing: -2px; }
.grid-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; width: 100%; }
.subject-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #04060e; width: 100%; }
.progress-bar { height: 6px; background: #04060e; border-radius: 99px; overflow: hidden; margin-top: 10px; width: 100%; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 99px; }

.err-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #04060e; margin-bottom: 16px; width: 100%; }

@media(max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .main-wrapper { margin-left: 0; width: 100%; }
    .prova-layout { grid-template-columns: 1fr; }
    .rules, .grid-results, .dashboard-grid { grid-template-columns: 1fr; }
    .nav-panel { position: relative; top: 0; }
    .action-bar { flex-direction: column; align-items: stretch; }
    .btn-group { display: grid; grid-template-columns: 1fr 1fr; }
    
}
/* Correção de centralização dos planos no celular */
@media (max-width: 768px) {
  .planos-container, .pricing-grid, div[style*="grid"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }
  
  .card-plano, .pricing-card {
    width: 100% !important;
    max-width: 320px !important;
    margin-bottom: 20px !important;
  }
}
/* Estilo do Rodapé */
footer {
  background-color: var(--surface, #0b0f19);
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
}
/* Padronização de imagens/ícones dentro de botões */
.btn img {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    object-fit: contain;
}
/* Padronização universal dos ícones do menu lateral */
.sidebar-menu .menu-icon-img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
}