/* =============================================
   DOSSIÊ CRIMINAL — app.css v2.0
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Crimson+Pro:ital,wght@0,400;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg:       #09090d;
  --c-bg2:      #111118;
  --c-bg3:      #18181f;
  --c-bg4:      #1f1f28;
  --c-border:   rgba(255,255,255,.07);
  --c-border2:  rgba(255,255,255,.12);
  --c-text:     #e8e8f0;
  --c-muted:    #77778a;
  --c-muted2:   #55556a;
  --c-accent:   #d63031;
  --c-accent2:  #ff4757;
  --c-gold:     #e5a830;
  --c-gold2:    #f9ca24;
  --c-success:  #00b894;
  --c-info:     #0984e3;
  --c-purple:   #6c5ce7;
  --font-body:  'Inter', sans-serif;
  --font-serif: 'Crimson Pro', Georgia, serif;
  --font-mono:  'JetBrains Mono', monospace;
  --radius:     8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --shadow:     0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:  0 8px 48px rgba(0,0,0,.6);
  --glow-red:   0 0 20px rgba(214,48,49,.25);
  --glow-gold:  0 0 20px rgba(229,168,48,.2);
}

html { scroll-behavior: smooth; }
body { background: var(--c-bg); color: var(--c-text); font-family: var(--font-body); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--c-text); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .78; }
img { max-width: 100%; display: block; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg2); }
::-webkit-scrollbar-thumb { background: var(--c-bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-muted2); }

/* ---- NAVBAR ---- */
.navbar {
  background: rgba(9,9,13,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.75rem; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-icon { font-size: 22px; filter: drop-shadow(var(--glow-red)); }
.brand-name { background: linear-gradient(135deg, #fff 0%, #aaa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; font-size: 14px; }
.nav-links a { color: var(--c-muted); font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--c-text); opacity: 1; }
.nav-user { display: flex; align-items: center; gap: 8px; color: var(--c-text) !important; }
.user-badge { background: var(--c-accent); color: #fff; font-size: 10px; padding: 2px 9px; border-radius: 20px; font-weight: 600; letter-spacing: .02em; }
.nav-coins { color: var(--c-gold); font-weight: 600; font-size: 13px; }
.nav-admin { background: rgba(214,48,49,.12); color: #f87171 !important; border: 1px solid rgba(214,48,49,.25); border-radius: 7px; padding: 5px 13px; font-size: 13px; font-weight: 600; transition: background .15s !important; }
.nav-admin:hover { background: rgba(214,48,49,.22) !important; opacity: 1 !important; }

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--c-accent); color: #fff; border: none;
  padding: 9px 20px; border-radius: var(--radius); cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: var(--font-body);
  transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: .01em;
}
.btn-primary:hover { background: var(--c-accent2); transform: translateY(-1px); box-shadow: var(--glow-red); opacity: 1; }
.btn-ghost {
  border: 1px solid var(--c-border2); background: transparent; color: var(--c-text);
  padding: 8px 18px; border-radius: var(--radius); cursor: pointer; font-size: 14px;
  font-family: var(--font-body); transition: all .15s;
}
.btn-ghost:hover { background: var(--c-bg3); border-color: var(--c-muted2); }

/* ---- ALERTS ---- */
.alert { padding: 13px 1.75rem; font-size: 14px; font-weight: 500; }
.alert-error   { background: rgba(214,48,49,.12); border-left: 3px solid var(--c-accent); color: #ff7675; }
.alert-success { background: rgba(0,184,148,.1);  border-left: 3px solid var(--c-success); color: #55efc4; }

/* ---- FOOTER ---- */
.footer { border-top: 1px solid var(--c-border); padding: 2rem 1.75rem; margin-top: 4rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; font-size: 13px; color: var(--c-muted2); }

/* ---- AUTH ---- */
.auth-wrap { max-width: 420px; margin: 5rem auto; padding: 2.25rem; background: var(--c-bg2); border-radius: var(--radius-xl); border: 1px solid var(--c-border); box-shadow: var(--shadow-lg); }
.auth-title { font-family: var(--font-serif); font-size: 28px; margin-bottom: 1.5rem; text-align: center; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--c-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: var(--c-bg3); border: 1px solid var(--c-border2);
  border-radius: var(--radius); padding: 10px 13px; color: var(--c-text);
  font-size: 14px; font-family: var(--font-body); transition: border-color .15s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(214,48,49,.1);
}
.form-submit { width: 100%; margin-top: .5rem; padding: 11px; font-size: 15px; }
.auth-alt { text-align: center; margin-top: 1.25rem; font-size: 13px; color: var(--c-muted); }
.auth-alt a { color: var(--c-accent); font-weight: 600; }

/* ---- HOME ---- */
.home-hero {
  min-height: 88vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(214,48,49,.18) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(108,92,231,.08) 0%, transparent 60%);
}
.home-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,.015) 39px, rgba(255,255,255,.015) 40px),
                    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,.015) 39px, rgba(255,255,255,.015) 40px);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 3rem 1.75rem; max-width: 780px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(214,48,49,.1); border: 1px solid rgba(214,48,49,.25); border-radius: 30px; padding: 6px 16px; font-size: 12px; font-weight: 600; color: #ff7675; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.75rem; }
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.7)} }
.hero-title { font-family: var(--font-serif); font-size: clamp(40px, 7vw, 76px); font-weight: 700; line-height: 1.08; margin-bottom: 1.25rem; letter-spacing: -.02em; }
.hero-title span { color: var(--c-accent); }
.hero-sub { font-size: 18px; color: var(--c-muted); line-height: 1.65; margin-bottom: 2.25rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: .875rem; justify-content: center; flex-wrap: wrap; }
.btn-hero { padding: 13px 28px; font-size: 16px; border-radius: 10px; }
.btn-hero-ghost { padding: 12px 27px; font-size: 15px; border-radius: 10px; }
.hero-stats { display: flex; gap: 2.5rem; justify-content: center; margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--c-border); flex-wrap: wrap; }
.hero-stat-val { font-size: 32px; font-weight: 700; font-family: var(--font-serif); }
.hero-stat-lbl { font-size: 12px; color: var(--c-muted); margin-top: 2px; }

.home-section { max-width: 1280px; margin: 0 auto; padding: 0 1.75rem 5rem; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
.section-title { font-family: var(--font-serif); font-size: 26px; font-weight: 600; }
.section-link { font-size: 13px; color: var(--c-accent); font-weight: 600; }

/* CASO DESTAQUE */
.featured-case {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin-bottom: 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.featured-case::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
}
.featured-case:hover { border-color: rgba(214,48,49,.3); box-shadow: var(--glow-red); }
.featured-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--c-accent); margin-bottom: .75rem; }
.featured-title { font-family: var(--font-serif); font-size: 30px; margin-bottom: .75rem; line-height: 1.2; }
.featured-desc { font-size: 14px; color: var(--c-muted); line-height: 1.7; margin-bottom: 1.5rem; max-width: 560px; }
.featured-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 12px; color: var(--c-muted); margin-bottom: 1.5rem; }
.featured-icon { font-size: 80px; line-height: 1; opacity: .85; }

/* HOME CARDS GRID */
.home-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.home-card { background: var(--c-bg2); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 1.25rem; transition: border-color .2s; }
.home-card:hover { border-color: var(--c-border2); }
.home-card-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin-bottom: .875rem; }
.player-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.player-row:last-child { border-bottom: none; }
.player-pos-1 { color: var(--c-gold); font-weight: 700; }
.activity-row { padding: 8px 0; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.activity-row:last-child { border-bottom: none; }

/* ---- CASOS LIST ---- */
.casos-page { max-width: 1280px; margin: 0 auto; padding: 2.5rem 1.75rem 4rem; }
.casos-page-header { margin-bottom: 2rem; }
.casos-page-header h1 { font-family: var(--font-serif); font-size: 36px; margin-bottom: .4rem; }
.casos-page-header p { color: var(--c-muted); font-size: 15px; }

.casos-filters { display: flex; gap: .75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-btn { background: var(--c-bg2); border: 1px solid var(--c-border); color: var(--c-muted); padding: 6px 16px; border-radius: 30px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; font-family: var(--font-body); }
.filter-btn:hover, .filter-btn.active { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }

.casos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.caso-card {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.caso-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.01) 0%, transparent 50%);
  pointer-events: none;
}
.caso-card:hover { border-color: rgba(214,48,49,.3); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.caso-card.done { border-color: rgba(0,184,148,.2); }
.caso-card.done:hover { border-color: rgba(0,184,148,.4); }
.caso-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.caso-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 20px; letter-spacing: .03em; }
.caso-title { font-family: var(--font-serif); font-size: 19px; line-height: 1.3; margin-bottom: .625rem; font-weight: 600; }
.caso-synopsis { font-size: 13px; color: var(--c-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: auto; }
.caso-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--c-border); font-size: 12px; color: var(--c-muted); }
.diff-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: .03em; }
.diff-facil    { background: rgba(0,184,148,.15);  color: #55efc4; }
.diff-medio    { background: rgba(229,168,48,.15); color: #fdcb6e; }
.diff-dificil  { background: rgba(214,48,49,.15);  color: #ff7675; }
.diff-lendario { background: rgba(108,92,231,.15); color: #a29bfe; }
.caso-status-done   { background: rgba(0,184,148,.15); color: #55efc4; font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.caso-status-failed { background: rgba(214,48,49,.15); color: #ff7675; font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.caso-status-wip    { background: rgba(229,168,48,.15); color: #fdcb6e; font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }

/* ---- INVESTIGAR ---- */
.investigar-body { background: var(--c-bg); }
.case-header {
  background: rgba(9,9,13,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  padding: 1rem 1.75rem;
  position: sticky; top: 0; z-index: 90;
}
.case-header-inner { max-width: 1500px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.case-info h1 { font-family: var(--font-serif); font-size: 20px; margin: .2rem 0; }
.category-tag { font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; margin-bottom: .2rem; letter-spacing: .03em; }
.case-location { font-size: 12px; color: var(--c-muted); }
.case-timer-wrap { text-align: right; }
.timer-label { font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }
.timer { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--c-gold); font-family: var(--font-mono); letter-spacing: 2px; filter: drop-shadow(var(--glow-gold)); }
.timer.urgent { color: var(--c-accent); filter: drop-shadow(var(--glow-red)); animation: pulse-timer 1s infinite; }
.timer.expired { color: var(--c-muted); filter: none; }
.timer-coins { font-size: 12px; color: var(--c-muted); margin-top: .25rem; }
@keyframes pulse-timer { 0%,100%{opacity:1} 50%{opacity:.55} }

.inv-layout { max-width: 1500px; margin: 0 auto; padding: 1.25rem 1rem; display: grid; grid-template-columns: 300px 1fr 280px; gap: 1rem; align-items: start; }
.inv-col { background: var(--c-bg2); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 1.1rem; }
.col-title { font-size: 11px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .875rem; display: flex; align-items: center; gap: 6px; }

/* PISTAS */
.clue-card { background: var(--c-bg3); border: 1px solid var(--c-border); border-radius: var(--radius); padding: .875rem; margin-bottom: .75rem; transition: border-color .15s; }
.clue-card.clue-new { animation: slideIn .4s ease; border-color: var(--c-accent); box-shadow: 0 0 12px rgba(214,48,49,.15); }
.clue-card.clue-locked { opacity: .5; }
.clue-card:not(.clue-locked):hover { border-color: var(--c-border2); }
.clue-type-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted2); margin-bottom: .35rem; }
.clue-title { font-size: 13px; font-weight: 600; margin-bottom: .4rem; color: var(--c-text); }
.locked-title { color: var(--c-muted); }
.clue-body { font-size: 12px; color: var(--c-muted); line-height: 1.6; }
.red-herring-label { font-size: 11px; color: #fdcb6e; margin-top: .5rem; padding: 3px 8px; background: rgba(229,168,48,.1); border-radius: 4px; display: inline-block; }
.btn-unlock { background: var(--c-gold); color: #000; border: none; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 6px; cursor: pointer; margin-top: .5rem; transition: opacity .15s; }
.btn-unlock:hover { opacity: .85; }
.unlock-hint { font-size: 11px; color: var(--c-muted); margin-top: .5rem; font-style: italic; }
@keyframes slideIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

/* SINOPSE */
.synopsis-box { background: var(--c-bg3); border-left: 3px solid var(--c-accent); border-radius: var(--radius); padding: 1.1rem; font-family: var(--font-serif); font-size: 15px; line-height: 1.8; color: #c8c8d8; margin-bottom: 1.25rem; }
.synopsis-label { font-family: var(--font-body); font-size: 10px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }

/* SUSPEITOS */
.suspects-grid { display: grid; gap: 1rem; }
.suspect-card { background: var(--c-bg3); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 1.1rem; transition: border-color .15s; }
.suspect-card:hover { border-color: var(--c-border2); }
.suspect-avatar { width: 46px; height: 46px; background: linear-gradient(135deg, var(--c-accent), #a00); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; float: left; margin-right: .875rem; flex-shrink: 0; box-shadow: 0 2px 10px rgba(214,48,49,.3); }
.suspect-name { font-size: 15px; font-weight: 600; }
.suspect-role { font-size: 12px; color: var(--c-muted); }
.suspect-age  { font-size: 12px; color: var(--c-muted); }
.alibi-badge { display: inline-block; margin-top: .4rem; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.alibi-badge.ok   { background: rgba(0,184,148,.15); color: #55efc4; }
.alibi-badge.none { background: rgba(119,119,138,.1); color: var(--c-muted); }
.suspect-bio { clear: both; margin-top: .75rem; font-size: 13px; color: var(--c-muted); cursor: pointer; }
.suspect-bio summary { color: var(--c-info); font-size: 12px; font-weight: 500; }
.interrogation-panel { clear: both; margin-top: .875rem; padding-top: .875rem; border-top: 1px solid var(--c-border); }
.int-title { font-size: 10px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.int-question { margin-bottom: .5rem; }
.btn-interrogate { background: transparent; border: 1px solid var(--c-border2); color: var(--c-text); font-size: 13px; padding: 8px 12px; border-radius: var(--radius); cursor: pointer; text-align: left; width: 100%; transition: all .15s; font-family: var(--font-body); }
.btn-interrogate:hover { border-color: var(--c-accent); background: rgba(214,48,49,.05); }
.q-text.answered-q { font-size: 12px; color: var(--c-muted); margin-bottom: .3rem; }
.a-text { font-size: 13px; background: var(--c-bg2); border-radius: var(--radius); padding: .7rem; line-height: 1.6; border-left: 2px solid var(--c-accent); }
.btn-accuse { display: block; width: 100%; margin-top: .875rem; background: var(--c-accent); color: #fff; border: none; padding: 10px; border-radius: var(--radius); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s; font-family: var(--font-body); letter-spacing: .02em; }
.btn-accuse:hover { background: var(--c-accent2); box-shadow: var(--glow-red); transform: translateY(-1px); }

/* CHAT */
.inv-chat { display: flex; flex-direction: column; height: calc(100vh - 170px); position: sticky; top: 78px; }
.chat-messages { flex: 1; overflow-y: auto; margin-bottom: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.chat-msg { background: var(--c-bg3); border-radius: var(--radius); padding: .5rem .75rem; font-size: 13px; }
.chat-mine { border-left: 2px solid var(--c-accent); }
.chat-user { font-weight: 600; font-size: 11px; margin-right: 5px; color: var(--c-text); }
.chat-time { font-size: 10px; color: var(--c-muted2); }
.chat-text { margin-top: 2px; color: #c0c0d0; line-height: 1.5; }
.chat-input-wrap { display: flex; gap: .5rem; }
.chat-input-wrap input { flex: 1; background: var(--c-bg3); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 9px 12px; color: var(--c-text); font-size: 13px; font-family: var(--font-body); transition: border-color .15s; }
.chat-input-wrap input:focus { outline: none; border-color: var(--c-accent); }
.chat-input-wrap button { background: var(--c-accent); color: #fff; border: none; padding: 9px 14px; border-radius: var(--radius); cursor: pointer; font-size: 15px; transition: opacity .15s; }
.chat-input-wrap button:hover { opacity: .85; }
.chat-warning { font-size: 11px; color: var(--c-muted2); margin-top: .5rem; font-style: italic; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(4px); }
.modal { background: var(--c-bg2); border: 1px solid var(--c-border2); border-radius: var(--radius-xl); padding: 2rem; max-width: 500px; width: 90%; box-shadow: var(--shadow-lg); }
.modal-title { font-family: var(--font-serif); font-size: 24px; margin-bottom: 1rem; }
.modal-warning { color: #fdcb6e; font-size: 13px; margin: .5rem 0 1rem; background: rgba(229,168,48,.08); padding: .625rem .875rem; border-radius: 6px; }
.modal textarea { width: 100%; background: var(--c-bg3); border: 1px solid var(--c-border2); border-radius: var(--radius); padding: 10px; color: var(--c-text); font-size: 13px; font-family: var(--font-body); margin-top: .5rem; resize: vertical; }
.modal textarea:focus { outline: none; border-color: var(--c-accent); }
.modal label { font-size: 12px; color: var(--c-muted); margin-top: 1rem; display: block; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }
.btn-accuse-confirm { background: var(--c-accent); color: #fff; border: none; padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; transition: all .2s; font-family: var(--font-body); }
.btn-accuse-confirm:hover { background: var(--c-accent2); }

/* RESULTADO */
.resultado-wrap { max-width: 800px; margin: 3rem auto; padding: 0 1.75rem; }
.resultado-verdict { text-align: center; padding: 3rem; background: var(--c-bg2); border-radius: var(--radius-xl); border: 1px solid var(--c-border); margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.resultado-verdict::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.resultado-verdict.correct::before { background: linear-gradient(90deg, var(--c-success), transparent); }
.resultado-verdict.failed::before  { background: linear-gradient(90deg, var(--c-accent), transparent); }
.verdict-icon { font-size: 68px; margin-bottom: 1rem; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }
.verdict-title { font-family: var(--font-serif); font-size: 34px; margin-bottom: .5rem; font-weight: 700; }
.verdict-correct { color: #55efc4; }
.verdict-wrong   { color: #ff7675; }
.verdict-xp { font-size: 24px; color: var(--c-gold); font-weight: 700; margin-top: .75rem; font-family: var(--font-mono); }
.culpado-box { background: var(--c-bg2); border-radius: var(--radius-lg); border: 1px solid var(--c-border); padding: 1.5rem; margin-bottom: 1.5rem; }
.culpado-title { font-size: 11px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.culpado-name { font-family: var(--font-serif); font-size: 24px; color: var(--c-accent); margin-bottom: .5rem; font-weight: 700; }
.ranking-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ranking-table th { font-size: 11px; color: var(--c-muted); text-transform: uppercase; padding: .5rem; text-align: left; border-bottom: 1px solid var(--c-border); letter-spacing: .05em; }
.ranking-table td { padding: .7rem .5rem; border-bottom: 1px solid var(--c-border); }
.rank-pos-1 { color: var(--c-gold); font-weight: 700; }

/* RANKING */
.ranking-page { max-width: 960px; margin: 2.5rem auto; padding: 0 1.75rem 4rem; }

/* PERFIL */
.perfil-page { max-width: 880px; margin: 2.5rem auto; padding: 0 1.75rem 4rem; }

/* LOJA */
.loja-page { max-width: 900px; margin: 0 auto; padding: 2.5rem 1.75rem 4rem; }

/* RESPONSIVO */
@media (max-width: 1024px) {
  .inv-layout { grid-template-columns: 260px 1fr; }
  .inv-chat { display: none; }
}
@media (max-width: 768px) {
  .inv-layout { grid-template-columns: 1fr; }
  .home-grid-2 { grid-template-columns: 1fr; }
  .featured-case { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; }
  .casos-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 1rem; }
}
@media (max-width: 520px) {
  .nav-links a:not(.nav-admin):not(.btn-primary):not(.btn-ghost) { display: none; }
  .hero-stats { gap: 1.5rem; }
}

/* ============================================================
   MOBILE OTIMIZADO — v2.0
   ============================================================ */

/* Bottom nav para mobile */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(17,17,24,.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-border);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-inner {
  display: flex; justify-content: space-around; align-items: center;
  height: 60px;
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--c-muted); font-size: 10px; font-weight: 600;
  text-decoration: none; padding: 6px 12px; border-radius: 8px;
  transition: color .15s;
  letter-spacing: .03em; text-transform: uppercase;
}
.mobile-nav-item .nav-icon { font-size: 20px; line-height: 1; }
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--c-text); opacity: 1; }
.mobile-nav-item.active .nav-icon { filter: drop-shadow(0 0 6px var(--c-accent)); }

/* Instalar PWA banner */
.pwa-banner {
  position: fixed; bottom: 72px; left: 1rem; right: 1rem;
  background: var(--c-bg2); border: 1px solid var(--c-border2);
  border-radius: var(--radius-lg); padding: 1rem; z-index: 150;
  display: flex; align-items: center; gap: .875rem;
  box-shadow: var(--shadow-lg); animation: slideUp .3s ease;
}
.pwa-banner-icon { font-size: 36px; flex-shrink: 0; }
.pwa-banner-text { flex: 1; }
.pwa-banner-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.pwa-banner-sub   { font-size: 12px; color: var(--c-muted); }
.pwa-banner-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.pwa-banner-actions button { font-size: 12px; padding: 7px 14px; border-radius: 7px; border: none; cursor: pointer; font-family: var(--font-body); font-weight: 600; }
.btn-install { background: var(--c-accent); color: #fff; }
.btn-dismiss { background: var(--c-bg3); color: var(--c-muted); }
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

/* Notificação in-game (toast) */
.toast-container { position: fixed; top: 70px; right: 1rem; z-index: 300; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast {
  background: var(--c-bg2); border: 1px solid var(--c-border2);
  border-radius: var(--radius-lg); padding: .875rem 1rem;
  font-size: 13px; max-width: 320px; pointer-events: all;
  animation: toastIn .3s ease; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .75rem;
}
.toast.toast-success { border-left: 3px solid var(--c-success); }
.toast.toast-error   { border-left: 3px solid var(--c-accent); }
.toast.toast-info    { border-left: 3px solid var(--c-info); }
.toast.toast-gold    { border-left: 3px solid var(--c-gold); }
.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 2px; }
.toast-msg   { color: var(--c-muted); font-size: 12px; }
.toast-close { background: none; border: none; color: var(--c-muted); cursor: pointer; font-size: 16px; padding: 0; flex-shrink: 0; }
@keyframes toastIn { from{transform:translateX(20px);opacity:0} to{transform:translateX(0);opacity:1} }

/* Push notification permission banner */
.push-banner {
  background: linear-gradient(135deg, rgba(214,48,49,.12) 0%, rgba(108,92,231,.08) 100%);
  border: 1px solid rgba(214,48,49,.2); border-radius: var(--radius-lg);
  padding: 1rem 1.25rem; margin: 1rem 0;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.push-banner-text { flex: 1; min-width: 200px; }
.push-banner-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.push-banner-sub   { font-size: 12px; color: var(--c-muted); }

/* Mobile: investigar layout */
@media (max-width: 768px) {
  .mobile-nav { display: flex; }
  main { padding-bottom: 72px; }

  /* Tabs na tela de investigação */
  .inv-layout { grid-template-columns: 1fr; padding: .75rem .75rem; gap: .75rem; }
  .inv-tabs { display: flex; gap: .5rem; margin-bottom: .75rem; overflow-x: auto; padding-bottom: .25rem; }
  .inv-tab-btn { background: var(--c-bg3); border: 1px solid var(--c-border); border-radius: 30px; padding: 7px 16px; font-size: 12px; font-weight: 600; color: var(--c-muted); cursor: pointer; white-space: nowrap; font-family: var(--font-body); transition: all .15s; flex-shrink: 0; }
  .inv-tab-btn.active { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
  .inv-panel { display: none; }
  .inv-panel.active { display: block; }

  /* Header do caso menor */
  .case-header { padding: .75rem 1rem; }
  .case-header-inner { flex-wrap: wrap; gap: .5rem; }
  .case-info h1 { font-size: 16px; }
  .timer { font-size: 22px; }

  /* Cards de suspeitos full width */
  .suspects-grid { grid-template-columns: 1fr; }

  /* Hero menor */
  .home-hero { min-height: 70vh; }
  .hero-inner { padding: 2rem 1rem; }

  /* Navbar oculta links extras */
  .navbar .nav-links > a:not(.nav-admin):not(.btn-primary):not(.btn-ghost):not(.nav-user) { display: none; }
  .navbar .nav-coins { display: none; }

  /* Caso card full width */
  .casos-grid { grid-template-columns: 1fr; }

  /* Resultado centralizado */
  .resultado-wrap { padding: 0 1rem; }
  .resultado-verdict { padding: 2rem 1.25rem; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 30px; }
  .hero-actions { flex-direction: column; }
  .btn-hero, .btn-hero-ghost { width: 100%; text-align: center; justify-content: center; }
  .modal { padding: 1.25rem; }
}

/* Safe area para iPhones com notch */
@supports (padding: max(0px)) {
  .mobile-nav { padding-bottom: max(env(safe-area-inset-bottom), 8px); }
  .case-header { padding-top: max(env(safe-area-inset-top), 1rem); }
}

/* Dark mode nativo (já é escuro, mas garante) */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
}

/* Reduz animações para quem prefere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
