/* ═══════════════════════════════════════════════════════════
   shared.css — Bitcoin Guide · btc.piccine.com.br
   Estilos comuns a todas as páginas
═══════════════════════════════════════════════════════════ */

/* ─── VARIÁVEIS ─── */
:root {
  --gold: #F7931A;
  --gold-light: #FFB347;
  --gold-dark: #C4700A;
  --black: #080808;
  --dark: #0F0F0F;
  --dark2: #161616;
  --dark3: #1E1E1E;
  --dark4: #262626;
  --gray: #888;
  --gray-light: #BBBABA;
  --white: #F5F2EE;
  --green: #22C55E;
  --red: #EF4444;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── NOISE OVERLAY ─── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: .4;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

/* ─── HEADER / NAV ─── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(247,147,26,0.15);
  transition: border-color .3s;
  gap: 1rem;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-symbol {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  font-weight: 800;
  color: var(--black);
}

nav { display: flex; gap: .25rem; align-items: center; overflow-x: auto; scrollbar-width: none; flex: 1; }
nav::-webkit-scrollbar { display: none; }

nav a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .78rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 6px;
  transition: color .2s, background .2s;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
nav a:hover { color: var(--white); background: rgba(255,255,255,.06); }
nav a.active { color: var(--gold); }
nav a.page-active {
  color: var(--gold);
  background: rgba(247,147,26,.1);
  border: 1px solid rgba(247,147,26,.2);
}

.nav-price {
  font-family: 'DM Mono', monospace;
  font-size: .82rem;
  color: var(--gold);
  background: rgba(247,147,26,.1);
  border: 1px solid rgba(247,147,26,.2);
  padding: .35rem .75rem;
  border-radius: 20px;
  display: flex; align-items: center; gap: .4rem;
  flex-shrink: 0;
}

.price-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

#nav-price-change { font-size: .7rem; font-weight: 600; opacity: .9; }

/* ─── PROGRESS BAR ─── */
#progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  z-index: 201;
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* ─── THEME TOGGLE ─── */
#theme-toggle {
  background: none;
  border: 1px solid rgba(247,147,26,.25);
  color: var(--gray-light);
  cursor: pointer;
  border-radius: 8px;
  padding: .35rem .6rem;
  font-size: .85rem;
  line-height: 1;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
#theme-toggle:hover { background: rgba(247,147,26,.1); color: var(--gold); }

/* ─── HAMBURGER ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  border: none;
  background: transparent;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--gray-light); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: rgba(8,8,8,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(247,147,26,.15);
  padding: 1rem 2rem 1.5rem;
  z-index: 99;
  flex-direction: column;
  gap: .25rem;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .95rem; font-weight: 500;
  color: var(--gray-light);
  text-decoration: none;
  padding: .65rem .75rem;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.mobile-menu a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.mobile-menu .mobile-section-label {
  font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
  padding: .75rem .75rem .25rem;
  font-weight: 600;
}

/* ─── PAGE HEADER (hero de subpáginas) ─── */
.page-hero {
  padding: 8rem 2rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.page-hero-tag {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
  display: flex; align-items: center; gap: .6rem;
}
.page-hero-tag::before { content: ''; width: 20px; height: 1px; background: var(--gold); }
.page-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, var(--white) 55%, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero p {
  color: var(--gray-light);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 600px;
}

/* ─── SECTIONS ─── */
section {
  padding: 3.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-tag {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
  display: flex; align-items: center; gap: .6rem;
}
.section-tag::before { content: ''; width: 20px; height: 1px; background: var(--gold); }

h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, var(--white) 45%, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-lead {
  color: var(--gray-light);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 640px;
  margin-bottom: 3rem;
}

/* ─── DIVIDER ─── */
.divider {
  max-width: 1100px; margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247,147,26,0.22), transparent);
}

/* ─── BACK TO TOP ─── */
#btt {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--gold); border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--black);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  z-index: 50;
}
#btt.show { opacity: 1; pointer-events: all; transform: translateY(0); }
#btt:hover { background: var(--gold-light); }

/* ─── FOOTER ─── */
footer {
  padding: 3rem 2rem;
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  color: var(--gray); font-size: .82rem;
}
footer a { color: var(--gray); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--gold); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--dark4);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ─── CARDS COMUNS ─── */
.stat-box {
  background: var(--dark2);
  padding: 2rem;
  display: flex; flex-direction: column; gap: .4rem;
}
.stat-box .s-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); }
.stat-box .s-value { font-family: 'DM Mono', monospace; font-size: 1.6rem; font-weight: 500; color: var(--gold); }
.stat-box .s-sub { font-size: .8rem; color: var(--gray); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px; background: var(--dark4);
  border-radius: 16px; overflow: hidden; margin: 3rem 0;
}

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--dark4); margin-top: 2rem; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--dark3); }
th {
  text-align: left; padding: 1rem 1.25rem;
  font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gray);
  font-weight: 500; border-bottom: 1px solid var(--dark4);
}
td {
  padding: 1rem 1.25rem;
  color: var(--gray-light);
  border-bottom: 1px solid var(--dark4);
  font-family: 'DM Mono', monospace; font-size: .85rem;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(247,147,26,.03); }
td:first-child { color: var(--white); font-family: 'Plus Jakarta Sans', sans-serif; font-size: .92rem; }

/* ─── BUTTONS ─── */
.btn-gold {
  background: var(--gold); color: var(--black);
  border: none; border-radius: 10px;
  padding: .75rem 2rem;
  font-family: 'Syne', sans-serif; font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: background .2s, transform .1s;
}
.btn-gold:hover { background: var(--gold-light); }
.btn-gold:active { transform: scale(.98); }

.btn-outline {
  background: none;
  border: 1px solid rgba(247,147,26,.3);
  color: var(--gold); border-radius: 8px;
  padding: .4rem .9rem; font-size: .82rem;
  cursor: pointer; transition: background .2s;
}
.btn-outline:hover { background: rgba(247,147,26,.1); }

/* ─── INPUTS ─── */
.field-label {
  font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gray);
  display: block; margin-bottom: .4rem;
}
.field-input {
  background: var(--dark3); border: 1px solid var(--dark4);
  border-radius: 10px; padding: .7rem 1rem;
  font-family: 'DM Mono', monospace; font-size: 1rem;
  color: var(--white); outline: none;
  transition: border-color .2s; width: 100%;
}
.field-input:focus { border-color: rgba(247,147,26,.5); }

/* ─── ALERT FAB ─── */
#alert-fab {
  position: fixed; bottom: 5.5rem; right: 1.5rem;
  z-index: 150; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem;
}
#alert-panel {
  background: var(--dark2); border: 1px solid rgba(247,147,26,.25);
  border-radius: 14px; padding: 1.25rem; width: 260px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  display: none; flex-direction: column; gap: .75rem;
}
#alert-panel.open { display: flex; }
#alert-toggle-btn {
  width: 44px; height: 44px;
  background: var(--dark2); border: 1px solid rgba(247,147,26,.3);
  border-radius: 50%; font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: background .2s; position: relative;
}
#alert-toggle-btn:hover { background: rgba(247,147,26,.15); }
#alert-dot {
  position: absolute; top: 2px; right: 2px;
  width: 10px; height: 10px;
  background: var(--green); border-radius: 50%;
  border: 2px solid var(--dark2); display: none;
}
.alert-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: .9rem; }
.alert-row { display: flex; gap: .5rem; align-items: center; }
.alert-select { background: var(--dark3); border: 1px solid var(--dark4); color: var(--white); border-radius: 8px; padding: .4rem .6rem; font-size: .82rem; flex-shrink: 0; }
.alert-input { flex: 1; background: var(--dark3); border: 1px solid var(--dark4); color: var(--white); border-radius: 8px; padding: .4rem .7rem; font-size: .82rem; font-family: 'DM Mono', monospace; min-width: 0; }
.alert-input:focus, .alert-select:focus { outline: none; border-color: rgba(247,147,26,.5); }
.alert-set-btn { width: 100%; background: var(--gold); color: var(--black); border: none; border-radius: 8px; padding: .55rem; font-family: 'Syne', sans-serif; font-weight: 700; font-size: .85rem; cursor: pointer; transition: background .2s; }
.alert-set-btn:hover { background: var(--gold-light); }
.alert-list { display: flex; flex-direction: column; gap: .4rem; max-height: 140px; overflow-y: auto; }
.alert-item { background: var(--dark3); border-radius: 8px; padding: .4rem .75rem; font-size: .78rem; display: flex; justify-content: space-between; align-items: center; font-family: 'DM Mono', monospace; }
.alert-item.triggered { color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.alert-remove { background: none; border: none; color: var(--gray); cursor: pointer; font-size: .9rem; padding: 0 .2rem; }
.alert-remove:hover { color: var(--red); }

/* ─── SHARE FAB ─── */
#share-fab { position: fixed; bottom: 9.5rem; right: 2rem; z-index: 50; }
#share-toggle {
  width: 44px; height: 44px;
  background: var(--dark3); border: 1px solid rgba(247,147,26,.3);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--gold);
  transition: background .2s, transform .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
#share-toggle:hover { background: rgba(247,147,26,.15); transform: scale(1.05); }
#share-menu {
  position: absolute; bottom: 52px; right: 0;
  background: var(--dark3); border: 1px solid rgba(247,147,26,.2);
  border-radius: 14px; padding: .5rem;
  display: flex; flex-direction: column; gap: .25rem;
  min-width: 170px; opacity: 0; pointer-events: none;
  transform: translateY(8px) scale(.97);
  transition: opacity .2s, transform .2s;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
#share-menu.open { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }
.share-btn {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .85rem; border-radius: 9px;
  border: none; background: transparent;
  color: var(--gray-light); font-size: .85rem;
  cursor: pointer; transition: background .15s, color .15s;
  text-align: left; font-family: inherit; text-decoration: none;
}
.share-btn:hover { background: rgba(255,255,255,.07); color: var(--white); }
.share-btn .si { font-size: 1rem; width: 18px; text-align: center; }

/* ─── LIGHT MODE ─── */
body.light-mode {
  --black: #F8F6F2; --dark: #EFEFEB; --dark2: #E8E6E1;
  --dark3: #DEDAD4; --dark4: #CECCCA; --gray: #666;
  --gray-light: #444; --white: #1A1A1A;
}
body.light-mode header { background: rgba(248,246,242,0.9); }
body.light-mode h2 {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  color: var(--white);
}

/* ─── ACESSIBILIDADE ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

