/* Full height layout for footer pinning */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  /*background: black;*/
  overflow-y: auto;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Matrix rain stays fixed behind everything */
#matrix {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: #000;
  display: block;
}

.content {
  background: transparent;
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 960px;
  margin: 0 auto;
  flex: 1 0 auto;
}

/* Transparent upper section for vivid Matrix rain */
header, nav {
  background: rgba(0,0,0,0.15); /* Super transparent so Matrix is visible */
  border-radius: 10px;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 2.5rem;
  text-align: center;
}

header h1 {
  margin: 0;
}

.tagline {
  font-size: 1.5rem;
  color: #68f668;
  margin-top: 0.2rem;
}

nav {
  margin-top: 1rem;
}

nav button.open-overlay-btn {
  background: transparent;
  border: 1px solid #0F0;
  color: #0F0;
  padding: 0.5rem 1rem;
  margin: 0 0.3rem;
  cursor: pointer;
  border-radius: 5px;
  font-family: monospace;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav button.open-overlay-btn:hover,
nav button.open-overlay-btn:focus {
  background-color: #0F0;
  color: #000;
  outline: none;
}

footer {
  width: 100vw;
  position: fixed;
  left: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
  border-top: 1px solid #222;
  padding: 1rem 0;
  z-index: 2;
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  color: #0F0;
  font-family: monospace;
  font-size: 1.5rem;
}

.spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.globe {
  width: 80px;
  height: 80px;
  border: 6px solid #0F0;
  border-top: 6px solid transparent;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  margin-bottom: 1rem;
  position: relative;
}

.loading-text .dots::after {
  content: '';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}
@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60% { content: '...'; }
  80%, 100% { content: ''; }
}

/* Content Overlay */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  color: #0F0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.overlay-content {
  position: relative;
  background: #000;
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  font-family: monospace;
  box-shadow: 0 0 10px #0F0;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: #0F0;
  cursor: pointer;
  font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
  color: #68f668;
  outline: none;
}
