/* =========================================================
   Graal Ol'west Hub - SHARED STYLES (Header/Footer)
   - Shared across all tools (Craft calculator, Coins calculator, etc.)
   - Based on your existing Coins calculator UI
   ========================================================= */

/* =========================================================
   Shared Theme Tokens (Colors / Radius / Shadow / Font)
   - Keep this in base.css so all tools share the same palette
   ========================================================= */

:root{
  /* Theme (your palette) */
  --bg: #171827;
  --bg-2: #141526;

  /* Containers */
  --panel:   #22243a;
  --panel-2: #2b2f49;
  --panel-3: #33385a;

  /* Text */
  --text: #e8e9ff;
  --muted: #b7b9da;
  --faint: rgba(255,255,255,.08);

  /* Accents */
  --accent: #7c5cff;
  --accent-2: #35c6ff;
  --good: #2de38e;
  --warn: #ffcc66;

  --radius: 16px;
  --radius-2: 22px;

  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --border: 1px solid rgba(255,255,255,.07);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  /* Extra tokens (from other tools) */
  --input: rgba(255,255,255,.07);
  --input-hover: rgba(255,255,255,.10);
  --focus: rgba(255,211,105,.35);
  --shadow-soft: 0 8px 20px rgba(0,0,0,.25);
  --radius-sm: 12px;

  /* Alternate warm palette (opt-in per page) */
  --accent-warm: #a04b4b;
  --accent-warm-2: #ffd369;
  --text-soft: #f2f4ff;
  --muted-soft: rgba(242,244,255,.72);
}

*{ box-sizing:border-box; }
html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);

  background-color: var(--bg); /* fallback */

  background-image:
    radial-gradient(1200px 700px at 10% 0%, rgba(124,92,255,.18), transparent 55%),
    radial-gradient(900px 600px at 85% 10%, rgba(53,198,255,.12), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));

  background-repeat: no-repeat;
  background-attachment: fixed;   /* impede “quebrar em blocos” */
  background-size: cover;         /* cobre 100% da tela */
}


a{ color:inherit; }



.topbar{
  position: sticky;
  top:0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 16px;
  background: rgba(20,21,38,.85);
  backdrop-filter: blur(10px);
  border-bottom: var(--border, 1px solid rgba(255,255,255,.07));
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0;
}
.brandText{ min-width: 0; }

.brandTitle{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 14px;
}
.brandSub{
  font-size: 12px;
  color: var(--muted, rgba(255,255,255,.70));
  opacity: .95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbarActions{ display:flex; align-items:center; gap:10px; }

/* Shared button + chip */
.btn{
  border: var(--border, 1px solid rgba(255,255,255,.07));
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  color: var(--text, #fff);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight: 800;
  transition: transform .08s ease, border-color .2s ease, background .2s ease;
  user-select:none;
}
.btn:hover{
  border-color: rgba(255,255,255,.15);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
}
.btn:active{ transform: translateY(1px); }
.btn.ghost{ background: transparent; }

.chip{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: var(--border, 1px solid rgba(255,255,255,.07));
  background: rgba(124,92,255,.12);
}

/* Hub link */
.hubLink{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: inherit;
  font-weight: 900;
  white-space: nowrap;
}
.hubLink:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}
.hubDot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent, #7c5cff);
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}
.hubText{ line-height: 1; }

/* =========================================================
   Shared page shell width (footer host)
   - Prevents shared footer from stretching full viewport
   - Can be overridden per page with --page-shell-max
   ========================================================= */

body{
  --page-shell-max: 1120px; /* default for hub/legal pages */
  --page-shell-pad: 12px;
}

#appFooter{
  width: min(var(--page-shell-max), 100%);
  margin: 0 auto;
  padding-inline: var(--page-shell-pad);
  /* padding-bottom: 12px; */
  min-width: 0;
}

@media (min-width: 560px){
  body{
    --page-shell-pad: 14px;
  }
}

@media (min-width: 900px){
  body{
    --page-shell-pad: 18px;
  }
}

/* Shared footer */
.footer{
  margin-top: 14px;
  padding-top: 10px;
  border-top: var(--border, 1px solid rgba(255,255,255,.07));
}
.footerLine{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.link{
  font-weight: 950;
  text-decoration: none;
  border-bottom: 1px dashed rgba(124,92,255,.6);
  color: rgba(255,255,255,.92);
}
.link:hover{ color: white; border-bottom-color: rgba(124,92,255,1); }
.footerSmall{ margin-top: 8px; font-size: 12px; }

.footerMeta{
  display:flex;
  justify-content: space-between;
  gap:10px;
  flex-wrap: wrap;
}
/* Shared footer legal links */
.footerLinksWrap{
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footerLinksTitle{
  font-size: 11px;
  color: rgba(255,255,255,.66);
  letter-spacing: .25px;
  font-weight: 900;
  text-transform: uppercase;
}

.footerLinks{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.footerChipLink{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  color: rgba(255,255,255,.90);

  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.footerChipLink:hover{
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
}

@media (max-width: 520px){
  .footerLinks{
    display: grid;
    grid-template-columns: 1fr;
  }

  .footerChipLink{
    width: 100%;
    justify-content: center;
  }
}

.devCredit{
  opacity: .6;
  font-size: 11px;
  letter-spacing: .3px;
}

.devName{
  background: linear-gradient(
    90deg,
    rgba(255,255,255,.4),
    rgba(124,92,255,1),
    rgba(53,198,255,1),
    rgba(255,255,255,.4)
  );
  background-size: 300% 100%;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: devGlow 6s linear infinite;
  font-weight: 700;
}

@keyframes devGlow{
  0%{ background-position: 0% 50%; }
  100%{ background-position: 300% 50%; }
}

/* =========================================================
   Shared Footer - v2 (card style like Class Coins UI)
   Drop-in override for graal-shared/base.css
   ========================================================= */

.footer{
  margin-top: 16px;
  padding: 14px 14px 12px;

  /* card look */
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px 18px 0 0;
  background: rgba(34,36,58,.35); /* similar vibe to panels */
  box-shadow: 0 10px 26px rgba(0,0,0,.22);

  /* reset old border-top behavior */
  border-top: 1px solid rgba(255,255,255,.10);
}

.footerLine{
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content: space-between;
  flex-wrap: wrap;

  /* subtle divider like internal sections */
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 10px;

  min-width: 0; /* prevents overflow on long strings */
}

.footerSmall{
  margin-top: 0;
  font-size: 12px;
  color: rgba(255,255,255,.70);
}

.footerMeta{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;

  min-width: 0;
}

/* Link style closer to the UI (chip/button vibe) */
.link{
  font-weight: 900;
  text-decoration: none;

  padding: 10px 12px;
  border-radius: 14px;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);

  color: rgba(255,255,255,.92);
  white-space: nowrap;
}

.link:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}

/* Dev credit a bit more subtle (still keeps the animated name) */
.devCredit{
  opacity: .65;
  font-size: 11px;
  letter-spacing: .3px;
}

/* Mobile polish */
@media (max-width: 520px){
  .footer{
    padding: 12px;
    /* border-radius: 16px; */
  }
  .link{
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}


/* =========================================================
   Shared Header Menu (Mobile/Responsive)
   ========================================================= */

.menuBtn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.menuIcon{
  width: 18px;
  height: 14px;
  display: inline-grid;
  gap: 3px;
}
.menuIcon span{
  display:block;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.90);
  opacity: .9;
}

.menuOverlay{
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}

.menuPanel{
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 90;

  width: min(92vw, 360px);
  max-height: calc(100vh - 24px);
  overflow: auto;

  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(20,21,38,.92);
  backdrop-filter: blur(12px);

  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  padding: 12px;
}

.menuHeader{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 10px;
}
.menuHeaderTitle{
  font-weight: 950;
  letter-spacing: .2px;
}
.menuClose{
  padding: 8px 10px;
  border-radius: 12px;
}

.menuSection{
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.menuSection:last-of-type{
  border-bottom: 0;
}
.menuSectionTitle{
  font-size: 12px;
  opacity: .7;
  letter-spacing: .25px;
  font-weight: 900;
  margin-bottom: 8px;
}

.menuItem{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: rgba(255,255,255,.92);

  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.menuItem:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}

.menuItem.disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.menuDot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent, #7c5cff);
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
  flex: 0 0 auto;
}
.menuDot.soft{
  background: rgba(255,255,255,.22);
}

.menuTag{
  margin-left: auto;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  opacity: .9;
}

.menuFooter{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.menuHint{
  font-size: 11px;
  opacity: .6;
  max-width: 55ch;
}
.menuSignature{
  font-size: 11px;
  opacity: .75;
  letter-spacing: .2px;
}

/* Desktop: menu vira “drawer opcional”, mas botão continua ok */
@media (min-width: 820px){
  .menuPanel{
    right: 18px;
    top: 18px;
    width: 360px;
  }
}

/* Mobile polish: esconde "Menu" texto se ficar apertado */
@media (max-width: 420px){
  .menuLabel{ display:none; }
}

/* If you ever want to hide the menu button on large screens, do it here:
@media (min-width: 900px){ .menuBtn{ display:none; } }
*/


/* =========================================================
   Header text responsive fix (mobile)
   ========================================================= */

/* Permitir que o bloco de texto encolha corretamente */
.brand{
  min-width: 0;
}

.brandText{
  min-width: 0;
  overflow: hidden;
}

/* Título pode reduzir tamanho */
.brandTitle{
  font-size: 14px;
  line-height: 1.1;
}

/* Subtítulo pode quebrar linha se necessário */
.brandSub{
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile ajustes */
@media (max-width: 600px){

  /* Diminuir texto do hub */
  .hubText{
    font-size: 13px;
  }

  /* Título principal menor */
  .brandTitle{
    font-size: 13px;
  }

  /* Subtítulo menor e mais compacto */
  .brandSub{
    font-size: 11px;
  }

  /* Ajustar espaçamento interno do header */
  .topbar{
    padding: 12px 12px;
  }

  /* Diminuir padding do hubLink */
  .hubLink{
    padding: 6px 8px;
  }
}

/* Telas muito pequenas */
@media (max-width: 420px){

  /* Esconde subtítulo se apertar demais */
  .brandSub{
    display: none;
  }

  /* Hub mais compacto */
  .hubText{
    font-size: 12px;
  }

  .hubLink{
    gap: 6px;
  }

  .hubDot{
    width: 6px;
    height: 6px;
  }
}

/* =========================================================
   Menu active item
   ========================================================= */
.menuItem.active{
  border-color: rgba(255,255,255,.18);
  background: rgba(124,92,255,.14);
}

.menuItem.active .menuDot{
  box-shadow: 0 0 0 4px rgba(124,92,255,.18);
}

.menuCurrent{
  margin-left: auto;
  font-size: 11px;
  font-weight: 950;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  opacity: .95;
}

