@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Share+Tech+Mono&display=swap');

/* ---- Paint dark + hide footer immediately (reduces load flash) ---- */
html, body {
  background-color: #0a0e0a !important;
}
.site-footer { display: none !important; }


/* ---- Palette ---- */
:root {
  --accent-h: 140;
  --accent-s: 100%;
  --accent-l: 50%;

  --hk-bg:        #0a0e0a;
  --hk-bg-alt:    #0d130d;
  --hk-panel:     #0f1710;
  --hk-border:    #1d2a1d;
  --hk-green:     #00ff66;
  --hk-green-dim: #00b347;
  --hk-text:      #b8ffcc;
  --hk-text-dim:  #5f8f6f;
  --hk-amber:     #ffb000;
  --hk-cyan:      #00e5ff;
}

/* ---- Base ---- */
.theme-dark,
.theme-light {
  --background-primary:        var(--hk-bg);
  --background-primary-alt:    var(--hk-bg-alt);
  --background-secondary:      var(--hk-bg-alt);
  --background-secondary-alt:  var(--hk-panel);
  --background-modifier-border: var(--hk-border);
  --text-normal:   var(--hk-text);
  --text-muted:    var(--hk-text-dim);
  --text-faint:    var(--hk-text-dim);
  --text-accent:   var(--hk-green);
  --text-accent-hover: var(--hk-cyan);
  --interactive-accent: var(--hk-green-dim);
  --font-text: 'JetBrains Mono', monospace;
  --font-monospace: 'JetBrains Mono', monospace;
}

body {
  background-color: var(--hk-bg);
  color: var(--hk-text);
  font-family: 'JetBrains Mono', monospace;
}

/* Subtle scanline / grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    linear-gradient(rgba(0,255,102,0.025) 1px, transparent 1px) 0 0 / 100% 3px,
    radial-gradient(circle at 50% 0%, rgba(0,255,102,0.04), transparent 70%);
  mix-blend-mode: screen;
}

/* ---- Headings ---- */
.markdown-preview-view h1,
.markdown-preview-view h2,
.markdown-preview-view h3,
.markdown-preview-view h4,
.markdown-preview-view h5,
.markdown-preview-view h6 {
  font-family: 'Share Tech Mono', monospace;
  color: var(--hk-green);
  text-shadow: 0 0 8px rgba(0,255,102,0.4);
  letter-spacing: 0.5px;
}

.markdown-preview-view h1 {
  border-bottom: 1px solid var(--hk-border);
  padding-bottom: 0.3em;
}
.markdown-preview-view h1::before { content: "# "; color: var(--hk-text-dim); }
.markdown-preview-view h2::before { content: "## "; color: var(--hk-text-dim); }
.markdown-preview-view h3::before { content: "$ "; color: var(--hk-green-dim); }

/* ---- Links ---- */
.markdown-preview-view a,
a.internal-link {
  color: var(--hk-cyan);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,229,255,0.4);
  transition: all 0.15s ease;
}
.markdown-preview-view a:hover,
a.internal-link:hover {
  color: var(--hk-green);
  text-shadow: 0 0 6px rgba(0,255,102,0.6);
  border-bottom-color: var(--hk-green);
}

/* ---- Code ---- */
.markdown-preview-view code {
  background: #061206;
  color: var(--hk-amber);
  border: 1px solid var(--hk-border);
  border-radius: 3px;
  padding: 1px 5px;
}
.markdown-preview-view pre {
  background: #050a05;
  border: 1px solid var(--hk-border);
  border-left: 3px solid var(--hk-green);
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0,255,102,0.08) inset;
}

/* ---- Blockquotes / callouts ---- */
.markdown-preview-view blockquote {
  border-left: 3px solid var(--hk-green-dim);
  background: rgba(0,255,102,0.03);
  color: var(--hk-text);
}
.callout {
  background: var(--hk-panel);
  border: 1px solid var(--hk-border);
  border-radius: 4px;
}

/* ---- Sidebar / navigation ---- */
.nav-file-title,
.nav-folder-title {
  color: var(--hk-text-dim);
  font-size: 0.9em;
}
.nav-file-title:hover,
.nav-folder-title:hover {
  color: var(--hk-green);
  background: rgba(0,255,102,0.06);
}
.nav-file-title.is-active {
  color: var(--hk-green);
  background: rgba(0,255,102,0.1);
  box-shadow: -2px 0 0 var(--hk-green);
}

/* ---- Site title ---- */
.site-body-left-column .site-name,
.site-name {
  font-family: 'Share Tech Mono', monospace;
  color: var(--hk-green);
  text-shadow: 0 0 8px rgba(0,255,102,0.5);
}
.site-name::after {
  content: "_";
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---- Search ---- */
.search-input-container input {
  background: #061206;
  border: 1px solid var(--hk-border);
  color: var(--hk-green);
  font-family: 'JetBrains Mono', monospace;
}

/* ---- Tables ---- */
.markdown-preview-view table {
  border: 1px solid var(--hk-border);
}
.markdown-preview-view th {
  background: var(--hk-panel);
  color: var(--hk-green);
  border: 1px solid var(--hk-border);
}
.markdown-preview-view td {
  border: 1px solid var(--hk-border);
}

/* ---- Horizontal rule ---- */
.markdown-preview-view hr {
  border: none;
  border-top: 1px dashed var(--hk-border);
}

/* ---- Selection ---- */
::selection {
  background: rgba(0,255,102,0.3);
  color: #fff;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--hk-bg); }
::-webkit-scrollbar-thumb {
  background: var(--hk-border);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--hk-green-dim); }

/* ---- Hide the auto-generated page title on all pages ---- */
/* (write your own # heading at the top of each note instead) */
.page-header {
  display: none !important;
}

/* ---- Esconder ícone do Obsidian na barra ---- */
.site-name svg,
.site-name img,
.site-body-left-column .site-name svg,
[class*="site-name"] svg {
  display: none !important;
}

/* ---- Esconder "Powered by Obsidian Publish" (footer) ---- */
.site-footer {
  display: none !important;
}

/* ============================================
   Floating buttons: subscribe (top) + support (bottom)
   ============================================ */
.fab-icon { margin-right: 0.4rem; } /* space between icon and label */

#xmr-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 10000;
  padding: 0.6rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #00ff66;
  background: #0a0e0a;
  border: 1px solid #00ff66;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0,255,102,0.3);
  transition: all 0.15s ease;
}
#xmr-fab:hover {
  background: #0f1710;
  box-shadow: 0 0 22px rgba(0,255,102,0.55);
  transform: translateY(-1px);
}

#sub-fab {
  position: fixed;
  bottom: 70px;
  right: 22px;
  z-index: 10000;
  padding: 0.6rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #00ff66;
  background: #0a0e0a;
  border: 1px solid #00ff66;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0,255,102,0.3);
  transition: all 0.15s ease;
}
#sub-fab:hover {
  background: #0f1710;
  box-shadow: 0 0 22px rgba(0,255,102,0.55);
  transform: translateY(-1px);
}

#xmr-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0.75);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#xmr-popup {
  position: relative;
  max-width: 380px;
  width: 100%;
  padding: 1.6rem;
  background: #0a0e0a;
  border: 1px solid #00ff66;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0,255,102,0.25);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

#xmr-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #5f8f6f;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
#xmr-close:hover { color: #00ff66; }

#xmr-popup .xmr-title {
  color: #00ff66;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
  text-shadow: 0 0 8px rgba(0,255,102,0.3);
}

#xmr-popup .xmr-qr {
  width: 180px;
  height: 180px;
  border: 1px solid #1d2a1d;
  border-radius: 4px;
  image-rendering: pixelated;
}

#xmr-popup .xmr-addr {
  color: #b8ffcc;
  font-size: 0.68rem;
  word-break: break-all;
  margin: 1rem 0 0 0;
  padding: 0.6rem;
  background: #061206;
  border: 1px solid #1d2a1d;
  border-radius: 4px;
  line-height: 1.5;
}

#xmr-copy {
  margin-top: 0.8rem;
  padding: 0.45rem 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #00ff66;
  background: #0f1710;
  border: 1px solid #00ff66;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
#xmr-copy:hover { box-shadow: 0 0 12px rgba(0,255,102,0.4); }

#xmr-popup .xmr-note {
  color: #5f8f6f;
  font-size: 0.8rem;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ============================================
   Subscribe buttons (RSS + email) with hover
   ============================================ */
.sub-buttons {
  margin: 1rem 0;
}
.sub-buttons a.sub-btn {
  display: inline-block;
  margin: 0.3rem 0.4rem 0.3rem 0;
  padding: 0.6rem 1.1rem;
  border: 1px solid #00ff66;
  border-radius: 6px;
  color: #00ff66 !important;
  background: #0a0e0a;
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0,255,102,0.18);
  transition: all 0.18s ease;
}
.sub-buttons a.sub-btn:hover {
  color: #0a0e0a !important;
  background: #00ff66;
  box-shadow: 0 0 22px rgba(0,255,102,0.6);
  transform: translateY(-1px);
}

/* ---- Subscribe floating popup ---- */
#sub-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0.75);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#sub-popup {
  position: relative;
  max-width: 360px;
  width: 100%;
  padding: 1.6rem;
  background: #0a0e0a;
  border: 1px solid #00ff66;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0,255,102,0.25);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}
#sub-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #5f8f6f;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
#sub-close:hover { color: #00ff66; }
#sub-popup .sub-pop-title {
  color: #00ff66;
  font-size: 0.95rem;
  margin: 0 0 0.8rem 0;
  text-shadow: 0 0 8px rgba(0,255,102,0.3);
}
#sub-popup .sub-pop-note {
  color: #5f8f6f;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0.8rem 0;
}
#sub-popup a.sub-pop-btn {
  display: block;
  margin: 0.5rem 0;
  padding: 0.6rem 1rem;
  border: 1px solid #00ff66;
  border-radius: 6px;
  color: #00ff66 !important;
  background: #0a0e0a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.18s ease;
}
#sub-popup a.sub-pop-btn:hover {
  color: #0a0e0a !important;
  background: #00ff66;
  box-shadow: 0 0 18px rgba(0,255,102,0.5);
}

/* ============================================
   Mobile: dock both buttons in a fixed bottom bar
   ============================================ */
@media (max-width: 750px) {
  #sub-fab,
  #xmr-fab {
    position: fixed;
    bottom: 0;
    height: 52px;
    margin: 0;
    width: 50%;
    border-radius: 0;
    border: none;
    border-top: 1px solid #00ff66;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.5);
    background: #0a0e0a;
    z-index: 10000;
  }
  /* subscribe on the left half, support on the right half */
  #sub-fab {
    left: 0;
    right: auto;
    top: auto;
    border-right: 1px solid #1d2a1d;
  }
  #xmr-fab {
    left: auto;
    right: 0;
    top: auto;
  }

  /* keep both icon and label visible in the bar */
  .fab-text { display: inline; }
  .fab-icon { display: inline; }

  /* stop the bar from covering the last lines of content */
  .markdown-preview-view,
  .publish-renderer {
    padding-bottom: 64px;
  }
}
