/* opnBase Palette */
:root {
  --opnbase-font: "Comic Neue", cursive;
  --opnbase-primary: #6432b4;
  --opnbase-secondary: #ba83e7;
  --opnbase-dark: #2a3140;
  --opnbase-darker: #1c212c;
}

/* PicoCSS Overrides */
:root {
  --pico-font-family: var(--opnbase-font) !important;
  --pico-primary: var(--opnbase-primary) !important; 
  --pico-primary-background: var(--opnbase-primary) !important; 
  --pico-primary-underline: transparent !important; 
  --pico-primary-hover: var(--opnbase-secondary) !important;  
  --pico-primary-hover-background: var(--opnbase-secondary) !important; 
  --pico-primary-focus: var(--opnbase-secondary) !important; 
  --pico-secondary: var(--opnbase-secondary) !important; 
  --pico-secondary-background: var(--opnbase-secondary) !important; 
}

/* Sticky Footer */
html, body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

header.container {
  padding-top: 1em;
  padding-bottom: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.flex-grow {
  flex: 1;
}

footer.container {
  margin-top: auto;
  display: flex;
  justify-content: center;
  text-align: center;
  padding-bottom: 0.5em;
}


/* Google PSE Overrides */
.gsc-control-cse * {
  font-family: var(--opnbase-font) !important;
}
.gcsc-find-more-on-google, .gsc-refinementsArea, .gsc-above-wrapper-area {
  display: none !important;
}
.gsc-cursor-box {
  text-align: center !important;
}

.gsc-control-cse {
  background-color: var(--pico-background-color) !important;
  border: none !important;
}

.gsc-cursor-page, .gsc-cursor-current-page {
  background-color: var(--pico-background-color) !important;
  color: var(--pico-color) !important;
}

.gsc-webResult .gsc-result, .gs-spelling, .gs-spelling * {
  background-color: var(--pico-background-color) !important;
  color: var(--pico-color) !important;
  border: none !important;
}

article div{
  font-size: 1.5em;
}

article footer {
  font-size: 1.1em;
}

article header {
  font-size: 2em;
}

.gsc-cursor-box {
  font-size: 2em;
}

.gsc-results .gsc-cursor-box .gsc-cursor-page {
  margin: 1em;
}

/* Loading Screen */
#loading-overlay {
    font-size: 5em;
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--pico-background-color);
    align-items: center;
    justify-content: center;
    z-index: 1000; /* Ensure it's above other content */
}

#loading-overlay[aria-busy="true"] {
    display: flex;
}

/* Document Spacing */
main > [role="document"] section {
  margin-bottom: calc(var(--pico-spacing) * 3);
}



#ascii-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Place it behind other content */
  overflow: hidden;
  pointer-events: none; /* Prevent interaction with the background */
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: pre; /* Preserve whitespace formatting */
  font-family: 'Courier New', Courier, monospace; /* Set a monospace font for better ASCII art rendering */
}
