/* Liquid Glass, inspirado no app Tempo do iOS. Sempre escuro. */
:root {
  --bg: #0A0D18;
  --txt: #FFFFFF;
  --sec: rgba(235,235,245,.72);
  --ter: rgba(235,235,245,.5);
  --glass: rgba(255,255,255,.08);
  --glass-hi: rgba(255,255,255,.18);
  --edge: rgba(255,255,255,.16);
  --green: #34C759;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--txt);
  font: 17px/22px var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button { font-family: inherit; color: inherit; cursor: pointer; }

/* Céu de fundo: brilho difuso fixo atrás de tudo */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 60% at 15% -10%, rgba(88,86,214,.35), transparent 60%),
    radial-gradient(90% 50% at 100% 10%, rgba(229,52,43,.16), transparent 60%),
    radial-gradient(100% 60% at 50% 110%, rgba(10,107,224,.18), transparent 60%),
    var(--bg);
}

/* Material de vidro */
.glass {
  position: relative; background: var(--glass); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(255,255,255,.04), 0 10px 30px rgba(0,0,0,.35);
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 45%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(44,48,66,.94); }
}
.circle { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.circle:active { transform: scale(.94); }
#refresh.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cabeçalho compacto que aparece ao rolar */
.mini {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: calc(44px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600;
  background: rgba(10,13,24,.55); border-bottom: 1px solid rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.mini.on { opacity: 1; transform: none; }

.page { max-width: 640px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 18px calc(120px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 2px 18px; }
.large { margin: 0; font: 700 40px/46px var(--display); letter-spacing: .2px; }
.live { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 15px; line-height: 20px; color: var(--sec); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.dot.err { background: #FF453A; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,89,.55); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* Cartões atmosféricos */
.cards { display: grid; gap: 14px; }
.card {
  position: relative; overflow: hidden; border-radius: 24px; isolation: isolate;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 30px rgba(0,0,0,.3);
}
.card::before, .sheet-in::before { /* gradiente + brilho de cor do tipo */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(80% 90% at 100% 0%, var(--glow), transparent 65%), var(--base);
}
.card::after { /* poeira de estrelas sutil, como o céu noturno do Tempo */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 30%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 38% 78%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 64% 22%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 82% 66%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 92% 38%, rgba(255,255,255,.5), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.07), transparent 40%);
}
.k-darkweb { --base: linear-gradient(165deg, #3B2140 0%, #2A1832 55%, #1C1226 100%); --glow: rgba(229,52,43,.38); }
.k-vuln    { --base: linear-gradient(165deg, #4A3420 0%, #33261A 55%, #211A15 100%); --glow: rgba(255,159,10,.32); }
.k-breach  { --base: linear-gradient(165deg, #1F3A45 0%, #182B36 55%, #121D27 100%); --glow: rgba(48,200,200,.3); }
.k-news    { --base: linear-gradient(165deg, #34407A 0%, #283058 55%, #1C2142 100%); --glow: rgba(100,160,255,.3); }
.card.br   { border-color: rgba(52,199,89,.45); }
.card.br::before { background: radial-gradient(70% 80% at 0% 100%, rgba(52,199,89,.28), transparent 60%), radial-gradient(80% 90% at 100% 0%, var(--glow), transparent 65%), var(--base); }
.card.new { animation: arrive .9s cubic-bezier(.2,.8,.2,1); }
@keyframes arrive { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

.hit {
  display: flex; flex-direction: column; gap: 14px; width: 100%; min-height: 150px; padding: 18px 20px 16px;
  border: 0; background: transparent; color: inherit; font: inherit; text-align: left;
  transition: transform .15s, background .15s;
}
.hit:active { transform: scale(.985); background: rgba(255,255,255,.05); }
.hit:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 24px; }
.c-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
.c-head { display: block; min-width: 0; flex: 1; }
.c-title { display: block; margin: 0; font: 700 23px/28px var(--display); overflow-wrap: anywhere; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.k-news .c-title { font-size: 20px; line-height: 25px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: 16px; line-height: 21px; font-weight: 500; color: var(--sec); }
.c-big { flex: none; font: 200 50px/50px var(--display); letter-spacing: -1px; text-align: right; white-space: nowrap; margin-top: -2px; }
.c-big small { font-size: 22px; font-weight: 400; letter-spacing: 0; margin-left: 2px; color: var(--sec); }
.c-bot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: auto; width: 100%; }
.c-note { min-width: 0; flex: 1; font-size: 16px; line-height: 21px; color: var(--sec); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-note svg { vertical-align: -3px; margin-right: 4px; }
.c-stat { flex: none; font-size: 16px; line-height: 21px; font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: .3px; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); color: #fff; }
.pill.br { background: rgba(52,199,89,.25); border-color: rgba(52,199,89,.5); }
.pill.hot { background: rgba(255,69,58,.28); border-color: rgba(255,69,58,.55); }

.skel { min-height: 150px; border-radius: 24px; background: linear-gradient(100deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.05) 70%) 0 0/200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.acts { display: flex; gap: 10px; }
.fav-btn { color: var(--sec); }
.fav-btn[aria-pressed="true"] { background: rgba(255,214,10,.28); border-color: rgba(255,214,10,.6); color: #ffd60a; }
.star { color: #ffd60a; margin-right: 4px; }
.sec-h { margin: 6px 4px 12px; font: 700 20px/24px var(--display); }
.arch-toggle { display: block; width: 100%; margin: 14px 0 10px; padding: 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); color: var(--sec); font: inherit; font-size: 15px; }
.muted { color: var(--ter); }
.linkbtn { border: 0; background: none; padding: 0; margin-left: 6px; color: var(--sec); font: inherit; text-decoration: underline; cursor: pointer; }
.upd { position: fixed; z-index: 120; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 28px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.upd { background: rgba(22,26,44,.96); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.upd[hidden] { display: none; }
.upd button { height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid rgba(255,255,255,.3); background: rgba(10,132,255,.85); color: #fff; font: inherit; font-weight: 700; }
.empty { padding: 48px 16px; text-align: center; color: var(--sec); }
.foot { margin: 18px 4px 0; font-size: 13px; line-height: 18px; color: var(--ter); text-align: center; }

/* Doca flutuante de vidro */
.dock {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom)); width: min(608px, calc(100% - 28px));
  display: flex; gap: 10px; align-items: center;
}
.seg { flex: 1; display: flex; height: 56px; padding: 5px; border-radius: 28px; }
.seg button {
  position: relative; z-index: 1; flex: 1; border: 0; border-radius: 22px; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--sec); transition: background .2s, color .2s;
}
.seg button[aria-selected="true"] { background: var(--glass-hi); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.br-btn { width: 56px; height: 56px; border-radius: 28px; font-size: 15px; font-weight: 800; letter-spacing: .5px; color: var(--sec); }
.br-btn[aria-pressed="true"] { background: rgba(52,199,89,.32); border-color: rgba(52,199,89,.6); color: #fff; }

/* Folha de detalhes (sheet) de vidro */
body.lock { overflow: hidden; }
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; padding: 0; border: 0;
  width: min(640px, 100%); max-width: 100%; max-height: calc(100% - 44px - env(safe-area-inset-top));
  background: transparent; color: inherit; overflow: visible;
}
.sheet::backdrop { background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { animation: up .38s cubic-bezier(.2,.9,.25,1); }
.sheet[open]::backdrop { animation: fade .3s ease-out; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-in {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
  max-height: calc(100vh - 44px - env(safe-area-inset-top)); max-height: calc(100dvh - 44px - env(safe-area-inset-top));
  border-radius: 32px 32px 0 0; border: 1px solid rgba(255,255,255,.16); border-bottom: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 -20px 60px rgba(0,0,0,.5);
  transition: transform .25s cubic-bezier(.2,.9,.25,1);
}
.sheet-in.drag { transition: none; }
.grab { display: flex; justify-content: center; padding: 8px 0 4px; touch-action: none; cursor: grab; }
.grab span { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); }
.sm { width: 36px; height: 36px; }
.s-close { position: absolute; top: 14px; right: 16px; z-index: 2; color: var(--sec); }
.s-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 20px 8px; }
.s-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--sec); margin: 4px 56px 6px 0; }
.s-title { margin: 0 44px 4px 0; font: 700 28px/33px var(--display); overflow-wrap: anywhere; }
.s-sub { font-size: 17px; line-height: 22px; color: var(--sec); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.s-why { margin: 16px 0 0; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 15px; line-height: 21px; color: rgba(235,235,245,.85); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.tile { padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); min-width: 0; }
.tile.wide { grid-column: 1 / -1; }
.t-k { display: block; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--ter); }
.t-v { display: block; margin-top: 3px; font-size: 17px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.s-sec { margin-top: 22px; }
.s-h { margin: 0 0 8px; font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--ter); }
.s-p { margin: 0; font-size: 16px; line-height: 23px; color: rgba(235,235,245,.88); overflow-wrap: anywhere; white-space: pre-line; }
.s-lang { margin-top: 6px; font-size: 13px; color: var(--ter); }
.onion { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; margin-top: 8px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.onion-h { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--sec); }
.onion-h:empty { display: none; }
.onion-st { padding: 1px 8px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.1); color: var(--ter); }
.onion-st.up { background: rgba(48,209,88,.18); color: #30d158; }
.onion-u { font: 13px/18px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: rgba(235,235,245,.88); overflow-wrap: anywhere; user-select: all; }
.onion-cp { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.12); color: inherit; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.list { border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.list > * + * { border-top: 1px solid rgba(255,255,255,.08); }
.li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px;
  border: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; text-align: left; text-decoration: none;
}
.li:active { background: rgba(255,255,255,.08); }
.li .li-t { min-width: 0; overflow-wrap: anywhere; }
.li .li-t strong { display: block; font-weight: 600; }
.li .li-h { display: block; margin-top: 2px; font-size: 14px; line-height: 19px; color: var(--sec); }
.li .li-s { text-align: right; justify-content: flex-end; flex-wrap: wrap; max-width: 46%; }
.li .li-s { flex: none; font-size: 14px; color: var(--sec); display: flex; align-items: center; gap: 4px; }
.s-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.1); background: rgba(10,13,24,.35);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 27px;
  border: 1px solid rgba(255,255,255,.22); font-size: 17px; font-weight: 600; text-decoration: none; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.btn.primary { background: rgba(255,255,255,.2); flex: 1 1 0; min-width: 0; }
.btn.primary.quiet { background: rgba(255,255,255,.1); }
.btn.icon.on { background: rgba(255,214,10,.22); border-color: rgba(255,214,10,.55); color: #ffd60a; }
.btn.icon { background: rgba(255,255,255,.1); padding: 0; flex: none; width: 54px; }
.btn:active { transform: scale(.97); }
.s-out { flex: 1 0 100%; margin: -2px 0 0; text-align: center; font-size: 12px; line-height: 16px; color: var(--ter); }

.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 22px; font-size: 15px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 360px) { .seg button { font-size: 13px; } .c-big { font-size: 42px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }


.more { padding: 24px 16px; text-align: center; color: var(--ter); font-size: 14px; }
