/* ===== Global ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #000;
  color: #fff;
  font-family: 'Courier New', 'Liberation Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  font-weight: bold;
}

a { color: #eee; text-decoration: none; transition: all 0.3s; }
a:hover { color: #0f0; text-shadow: 0 0 10px #0f0; }

/* ===== Matrix Canvas ===== */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
}

/* ===== Top Nav ===== */
.top-nav {
  position: fixed;
  top: 25px;
  left: 30px;
  z-index: 10;
}
.top-nav a {
  font-size: 1rem;
  font-weight: bold;
  color: #ccc;
  letter-spacing: 3px;
  transition: color 0.3s, text-shadow 0.3s;
}
.top-nav a:hover { color: #0f0; text-shadow: 0 0 8px rgba(0,255,0,0.5); }
.top-nav span { color: #666; margin: 0 8px; }

/* ===== Back Button (top-right) ===== */
.back-btn {
  position: fixed;
  top: 22px;
  right: 30px;
  z-index: 10;
  font-size: 0.85rem;
  color: #aaa;
  letter-spacing: 3px;
  transition: color 0.3s, text-shadow 0.3s;
}
.back-btn:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* ===== Language Switcher ===== */
.lang-switcher {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 10;
  display: flex;
  gap: 4px;
}
.lang-switcher button {
  font-size: 1rem;
  font-weight: bold;
  padding: 6px 14px;
  border: 1px solid #555;
  border-radius: 3px;
  color: #aaa;
  background: rgba(0,0,0,0.85);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}
.lang-switcher button:hover {
  color: #fff;
  border-color: #fff;
}
.lang-switcher button.active {
  color: #0f0;
  border-color: #0f0;
  box-shadow: 0 0 12px rgba(0,255,0,0.4);
  background: rgba(0,20,0,0.9);
}

/* ===== Back Button ===== */
.back-btn {
  position: fixed;
  top: 22px;
  right: 30px;
  z-index: 10;
  font-size: 0.85rem;
  color: #999;
  letter-spacing: 3px;
  transition: color 0.3s, text-shadow 0.3s;
}
.back-btn:hover {
  color: #0f0;
  text-shadow: 0 0 8px rgba(0,255,0,0.5);
}

/* ===== Language Switcher ===== */
.lang-switcher {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 10;
  display: flex;
  gap: 6px;
}
.lang-switcher a {
  font-size: 0.75rem;
  padding: 4px 10px;
  border: 1px solid #444;
  border-radius: 3px;
  color: #777;
  background: rgba(0,0,0,0.7);
  transition: all 0.3s;
}
.lang-switcher a:hover,
.lang-switcher a.active {
  color: #0f0;
  border-color: #0f0;
  box-shadow: 0 0 8px rgba(0,255,0,0.3);
}

/* ===== Hero / Index ===== */
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.hero-title {
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 2rem;
  text-shadow: 0 0 12px rgba(255,255,255,0.3);
}

.typewriter-container {
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.typewriter {
  font-size: 1.8rem;
  font-weight: bold;
  max-width: 800px;
  color: #0f0;
  text-shadow: 0 0 10px #0f0, 0 0 20px #0f0, 0 0 40px #0f0, 0 0 80px rgba(0,255,0,0.5);
  filter: brightness(1.4);
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { text-shadow: 0 0 10px #0f0, 0 0 20px #0f0, 0 0 40px #0f0, 0 0 80px rgba(0,255,0,0.4); filter: brightness(1.3); }
  50% { text-shadow: 0 0 15px #0f0, 0 0 30px #0f0, 0 0 60px #0f0, 0 0 120px rgba(0,255,0,0.7); filter: brightness(1.6); }
}

.typewriter .cursor {
  display: inline-block;
  width: 12px;
  color: #0f0;
  animation: blink 0.6s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.lang-badge {
  display: inline-block;
  font-size: 1.2rem;
  margin-right: 0.5rem;
  color: #0f0;
}

.hero-footer {
  margin-top: 4rem;
  font-size: 1rem;
  font-weight: bold;
  color: #ccc;
  letter-spacing: 2px;
}
.hero-footer a { color: #fff; font-weight: bold; }
.hero-footer a:hover { color: #0f0; }

/* ===== Help Button ===== */
.help-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10;
  width: 48px;
  height: 48px;
  border: 2px solid #555;
  border-radius: 50%;
  background: rgba(0,0,0,0.8);
  color: #999;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s;
}
.help-btn:hover {
  border-color: #0f0;
  color: #0f0;
  box-shadow: 0 0 20px rgba(0,255,0,0.4);
  transform: scale(1.1);
}

/* ===== Search Page ===== */
.search-page {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.search-header {
  text-align: center;
  margin-bottom: 3rem;
}

.search-header h1 {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.search-header p {
  font-size: 0.85rem;
  color: #888;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
}

.search-box input {
  flex: 1;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.search-box input::placeholder { color: #555; }
.search-box input:focus {
  border-color: #0f0;
  box-shadow: 0 0 20px rgba(0,255,0,0.15);
}

.search-box button {
  padding: 14px 28px;
  background: transparent;
  border: 1px solid #666;
  border-radius: 4px;
  color: #ccc;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}
.search-box button:hover {
  border-color: #0f0;
  color: #0f0;
  background: rgba(0,255,0,0.05);
  box-shadow: 0 0 15px rgba(0,255,0,0.2);
}

.search-stats {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1.5rem;
}

/* ===== Results ===== */
.result-card {
  border: 1px solid #333;
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s, background 0.3s;
}
.result-card:hover {
  border-color: #0f0;
  background: rgba(0,255,0,0.03);
}

.result-card h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.result-meta {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 0.6rem;
}
.result-meta span { margin-right: 1rem; }

.result-snippet {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.6;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-size: 0.9rem;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #0f0;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ===== Help Page ===== */
.help-page {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.help-page h1 {
  text-align: center;
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 3rem;
}

.help-section {
  margin-bottom: 2.5rem;
}
.help-section h2 {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #333;
}
.help-section p {
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 0.8rem;
}
.help-section h3 {
  font-size: 1rem;
  color: #ddd;
  margin: 1.5rem 0 0.8rem;
}
.help-section strong { color: #fff; }

.code-block {
  background: rgba(0,0,0,0.6);
  border: 1px solid #333;
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #0f0;
}

.code-block .comment { color: #050; }
.code-block .key { color: #0ff; }
.code-block .str { color: #f0f; }

.endpoint {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid #444;
  border-radius: 3px;
  font-size: 0.82rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  color: #ccc;
}

.method {
  color: #ff0;
  font-weight: bold;
  margin-right: 0.5rem;
}

/* ===== Nav ===== */
.nav {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  border-bottom: 1px solid #222;
}
.nav a {
  font-size: 0.85rem;
  color: #666;
  transition: color 0.3s;
}
.nav a:hover, .nav a.active { color: #0f0; text-shadow: 0 0 8px rgba(0,255,0,0.3); }
