/* ========= FONTE QUADRADA (ESTILO MINECRAFT / FUTURISTA) ========= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;800&family=Press+Start+2P&display=swap');

:root {
  --font-main: 'Orbitron', 'Press Start 2P', monospace;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-strong: 0 18px 50px rgba(0,0,0,0.18);
  --blur-glass: blur(20px);

  --bg: #0b1220;
  --bg-secondary: #111827;
  --panel: rgba(255,255,255,0.08);
  --panel-border: rgba(255,255,255,0.10);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-light: rgba(45, 212, 191, 0.14);
  --card-solid: rgba(15, 23, 42, 0.55);
  --cloud: rgba(255,255,255,0.55);
  --star: #ffffff;
}


/* ========= TEMA 1: ESCURO COM VÍDEO ========= */
html[data-theme="dark-video"] {
  --bg: #07111f;
  --bg-secondary: #0f172a;
  --panel: rgba(15, 23, 42, 0.50);
  --panel-border: rgba(255,255,255,0.12);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --accent: #2dd4bf;
  --accent-strong: #99f6e4;
  --accent-light: rgba(45, 212, 191, 0.16);
  --shadow-soft: 0 15px 40px rgba(0,0,0,0.25);
  --shadow-strong: 0 20px 60px rgba(0,0,0,0.35);
}

/* ========= TEMA 2: CLARO PAPER ========= */
html[data-theme="light-paper"] {
  --bg: #f8fbff;
  --bg-secondary: #edf4ff;
  --panel: rgba(255,255,255,0.92);
  --panel-border: rgba(15, 23, 42, 0.08);
  --text-main: #0f172a;
  --text-muted: #5b6b82;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.10);
  --shadow-soft: 0 10px 30px rgba(37, 99, 235, 0.08);
  --shadow-strong: 0 18px 50px rgba(37, 99, 235, 0.12);
}

/* ========= TEMA 3: ESCURO SÓLIDO ========= */
html[data-theme="dark-solid"] {
  --bg: #05070d;
  --bg-secondary: #0f1117;
  --panel: rgba(17, 24, 39, 0.88);
  --panel-border: rgba(255,255,255,0.08);
  --text-main: #eef2ff;
  --text-muted: #a1acc0;
  --accent: #14b8a6;
  --accent-strong: #2dd4bf;
  --accent-light: rgba(20, 184, 166, 0.12);
  --shadow-soft: 0 12px 35px rgba(0,0,0,0.35);
  --shadow-strong: 0 24px 70px rgba(0,0,0,0.45);
}
* {
  box-sizing: border-box;
  font-family: var(--font-main);
  letter-spacing: 0.03em;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0 0 60px 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background: var(--bg);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.35s ease, color 0.35s ease;
}

/* FUNDO LIGHT */
html[data-theme="light-paper"] body {
  background:
    linear-gradient(180deg, #fdfefe 0%, #f4f8ff 42%, #edf4ff 100%);
}

/* FUNDO DARK SOLID */
html[data-theme="dark-solid"] body {
  background:
    radial-gradient(circle at top, rgba(20,184,166,0.06), transparent 25%),
    linear-gradient(180deg, #06080f 0%, #0a0d14 100%);
}

[data-theme="dark"] #bg-video,
[data-theme="light"] #bg-video{
display:none;
}
/* CAMADAS DECORATIVAS */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

html[data-theme="dark-video"] body::before {
  background-image:
    radial-gradient(1px 1px at 20px 30px, var(--star), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--star), transparent),
    radial-gradient(1.5px 1.5px at 150px 120px, var(--star), transparent),
    radial-gradient(1px 1px at 220px 160px, var(--star), transparent);
  background-size: 280px 280px;
  opacity: 0.18;
  animation: moveStars 120s linear infinite;
}

html[data-theme="dark-video"] body::after {
  background: radial-gradient(circle at 50% 50%, rgba(45,212,191,0.10), transparent 65%);
  animation: pulseNebula 9s ease-in-out infinite alternate;
}

html[data-theme="light-paper"] body::before {
  background:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,0.05), transparent 20%),
    radial-gradient(circle at 80% 10%, rgba(37,99,235,0.04), transparent 25%),
    radial-gradient(circle at 50% 80%, rgba(37,99,235,0.06), transparent 30%);
  filter: blur(20px);
}

html[data-theme="dark-solid"] body::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(20,184,166,0.05), transparent 20%),
    radial-gradient(circle at 80% 15%, rgba(45,212,191,0.04), transparent 24%);
}

@keyframes moveStars {
  from { background-position: 0 0; }
  to { background-position: 1200px 1200px; }
}

@keyframes pulseNebula {
  from { opacity: 0.15; transform: scale(1); }
  to { opacity: 0.35; transform: scale(1.06); }
}

/* ========= VÍDEO APENAS NO TEMA dark-video ========= */
#bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease, filter 0.5s ease;
}

html[data-theme="dark-video"] #bg-video {
  opacity: 1;
  visibility: visible;
  filter: saturate(1.05) brightness(0.72) contrast(1.08);
}

html[data-theme="light-paper"] #bg-video,
html[data-theme="dark-solid"] #bg-video {
  opacity: 0;
  visibility: hidden;
}

/* ========= ELEMENTOS GLASS / CARDS ========= */
.header,
.card-panel,
.cat-card,
.side-info,
.search-input,
.tool-btn,
.theme-chip {
  transition:
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease,
    opacity 0.35s ease;
}

.header,
.card-panel,
.side-info,
.search-input,
.tool-btn,
.cat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
}

/* no tema claro, menos transparência */
html[data-theme="light-paper"] .header,
html[data-theme="light-paper"] .card-panel,
html[data-theme="light-paper"] .side-info,
html[data-theme="light-paper"] .search-input,
html[data-theme="light-paper"] .tool-btn,
html[data-theme="light-paper"] .cat-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ========= TIPOGRAFIA ========= */

h1, h2, h3, h4, h5 {
  margin: 0;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.brand h1 {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 800;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

.text-muted {
  color: var(--text-muted);
}

/* ========= HEADER ========= */
.header {
  width: min(92%, 1150px);
  margin-top: 24px;
  padding: 18px 22px;
  border-radius: var(--radius-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.8px solid var(--accent);
  box-shadow: 0 0 0 5px var(--accent-light);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--text-muted);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.tool-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* ========= THEME SWITCHER ========= */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-chip {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-chip:hover,
.theme-chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  box-shadow: 0 10px 30px var(--accent-light);
}

html[data-theme="light-paper"] .theme-chip:hover,
html[data-theme="light-paper"] .theme-chip.active {
  color: #fff;
}

/* ========= INFO BAR ========= */
.info-bar {
  width: min(92%, 1150px);
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.side-info {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-muted);
}

#clock {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
}

/* ========= HERO ========= */
.content-wrapper {
  width: min(92%, 900px);
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card-panel {
  padding: 36px;
  border-radius: 28px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
}

.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 24px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 12px 30px var(--accent-light);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn,
.theme-chip,
.tool-btn,
.btn-access {
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ========= SEARCH ========= */
.search-container {
  width: min(92%, 1150px);
  margin: 30px auto 10px auto;
  display: block;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 18px 20px 18px 54px;
  border-radius: 18px;
  color: var(--text-main);
  outline: none;
  font-size: 15px;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-light);
}

.search-icon {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  pointer-events: none;
}

/* ========= GRID / CATEGORIAS ========= */

.categories-wrapper {
  width: min(92%, 1150px);
  margin-top: 24px;
}

.categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.categories-title {
  font-size: 18px;
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 24px;
}

.top-hidden{
display:none;
}

.categories-section{
opacity:0;
transform:translateY(40px);
transition:.5s ease;
display:none;
}

.categories-section.open{
display:block;
opacity:1;
transform:translateY(0);
}

.cards-section.hide{
opacity:0;
transform:translateY(-20px);
pointer-events:none;
transition:.4s ease;
display:none;
}

.content-wrapper.hide{
opacity:0;
transform:translateY(-20px);
pointer-events:none;
transition:.4s ease;
}

.top-section.hide {
opacity: 0;
transform: translateY(-40px);
pointer-events: none;
transition: .4s ease;
}

#categoriesSection {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(18px);
  transition:
    max-height 0.8s ease,
    opacity 0.5s ease,
    transform 0.5s ease;
}

#categoriesSection.open {
  max-height: 2400px;
  opacity: 1;
  transform: translateY(0);
}

/* card externo */
.cat-card {
  text-decoration: none;
  color: var(--text-main);
  border-radius: 26px;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* card interno animado */
.cat-card-inner {
  padding: 28px 22px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  animation: cardFloat 6s ease-in-out infinite;
}

.cat-card:nth-child(2n) .cat-card-inner {
  animation-duration: 7.2s;
  animation-delay: 0.4s;
}

.cat-card:nth-child(3n) .cat-card-inner {
  animation-duration: 5.8s;
  animation-delay: 0.8s;
}

.cat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-strong);
}

.cat-card:hover .cat-card-inner {
  transform: translateY(-8px) scale(1.015);
  animation-play-state: paused;
}

.cat-icon {
  width: 46px;
  height: 46px;
  stroke: var(--accent);
  stroke-width: 1.7;
  fill: none;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.card-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.btn-access {
  background: var(--accent-light);
  color: var(--accent);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.cat-card:hover .btn-access {
  background: var(--accent);
  color: #fff;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ========= ANIMAÇÕES DE ENTRADA ========= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

body.loaded .reveal {
  animation: revealUp 0.9s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.985);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

#backBtn {
  margin-bottom: 10px;
}

.btn-download {
  background: linear-gradient(135deg,var(--accent),var(--accent-strong));
  color: white;
  font-weight: 800;
  letter-spacing: .05em;
  box-shadow: 0 10px 25px var(--accent-light);
}

.btn-download:hover {
  transform: translateY(-2px);
}

.key-wrapper{
display:flex;
flex-direction:column;
gap:14px;
}

.key-input-group{
display:flex;
align-items:center;
gap:10px;
background:transparent;
border:none;
padding:0;
}

.key-input{
flex:1;
background:var(--panel);
border:1px solid var(--panel-border);
border-radius:14px;
padding:12px 14px;
font-size:13px;
}
.key-input-group:focus-within{
border-color:var(--accent);
box-shadow:0 0 0 2px var(--accent-light);
}

.key-icon{
color:var(--text-muted);
min-width:18px;
}

.key-btn{
padding:10px 18px;
border-radius:14px;
font-weight:700;
letter-spacing:.03em;
}

.key-result{
margin-top:6px;
}

/* ========= TOAST ========= */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
}

.shizuku-toast {
  background: var(--panel);
  color: var(--text-main);
  border: 1px solid var(--accent);
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-strong);
  backdrop-filter: var(--blur-glass);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInDown 0.5s ease forwards, fadeOut 0.5s ease 4s forwards;
  pointer-events: auto;
}

.shizuku-toast i {
  color: var(--accent);
  font-size: 18px;
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

.spin {
animation: spin 1s linear infinite;
}

@keyframes spin {
to {
transform: rotate(360deg);
}
}

.cases-card {
cursor: pointer;
transition: 0.25s ease;
}

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

.cases-btn{
min-width:110px;
justify-content:center;
}

/* ========= STATUS ========= */
.status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  margin-left: 5px;
}

.status-ativa {
  background: rgba(0, 255, 100, 0.10);
  color: #00d26a;
  border: 1px solid #00d26a;
}

.status-erro {
  background: rgba(255, 0, 50, 0.10);
  color: #ff4d73;
  border: 1px solid #ff4d73;
}

#pageLoader{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.55);
backdrop-filter:blur(8px);
display:flex;
align-items:center;
justify-content:center;
z-index:9999;
opacity:0;
pointer-events:none;
transition:.3s;
}

#pageLoader.show{
opacity:1;
pointer-events:all;
}

.loader{
width:45px;
height:45px;
border:3px solid transparent;
border-top:3px solid var(--accent);
border-radius:50%;
animation:spin 1s linear infinite;
}

@keyframes spin{
to{
transform:rotate(360deg)
}
}

/* ========= RESPONSIVO ========= */
@media (max-width: 768px) {
  .header,
  .info-bar,
  .content-wrapper,
  .search-container,
  .categories-wrapper {
    width: 94%;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
  }

  .brand,
  .nav-tools,
  .theme-switcher {
    justify-content: center;
  }
  .card-panel {
  margin-bottom: 18px;
  padding: 26px 20px;
  }
  .section-title {
    font-size: 30px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

.reveal,
.cat-card,
.card-panel,
.btn,
.theme-chip {
will-change: transform, opacity;
}
