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

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

body {
  background: radial-gradient(circle at top, #0b0b0b 0%, #000 100%);
  color: #eaffff;
  font-family: 'Space Mono', monospace;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navigation */
.nav {
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid rgba(0,255,242,0.3);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.nav-brand {
  color: #00fff2;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.back-link {
  color: #7ffffe;
  text-decoration: none;
  transition: opacity 0.3s;
}

.back-link:hover {
  opacity: 0.7;
}

/* Header */
.biome-header {
  text-align: center;
  padding: 4rem 2rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.biome-header h1 {
  color: #00fff2;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(0,255,242,0.5);
}

.biome-header p {
  color: #bffefe;
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.stat-item {
  background: rgba(0,255,242,0.1);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(0,255,242,0.3);
  font-size: 0.9rem;
}

/* Tab Nav */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(0,255,242,0.2);
  flex-wrap: wrap;
}

.tab-button {
  background: rgba(0,255,242,0.05);
  border: 1px solid rgba(0,255,242,0.3);
  color: #7ffffe;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.tab-button:hover {
  background: rgba(0,255,242,0.1);
  border-color: rgba(0,255,242,0.5);
}

.tab-button.active {
  background: rgba(0,255,242,0.2);
  border-color: #00fff2;
  color: #00fff2;
  box-shadow: 0 0 20px rgba(0,255,242,0.3);
}

/* Tab Content */
.biome-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stacked Feed Layout */
.article-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  max-width: 850px;
  margin: 0 auto;
  padding: 2rem 1rem 5rem;
}

.article-card {
  width: 100%;
  background: rgba(0,255,242,0.03);
  border: 1px solid rgba(0,255,242,0.2);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 15px rgba(0,255,242,0.05);
}

.article-card:hover {
  background: rgba(0,255,242,0.08);
  border-color: rgba(0,255,242,0.4);
  transform: translateY(-6px);
  box-shadow: 0 10px 35px rgba(0,255,242,0.25);
}

.article-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,255,242,0.15);
}

.article-title {
  color: #00fff2;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.article-date {
  color: #7ffffe;
  font-size: 0.85rem;
  font-style: italic;
}

.article-excerpt {
  color: #bffefe;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.cross-pillars {
  color: #00fff2;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.article-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-primary {
  background: rgba(0,255,242,0.2);
  color: #00fff2;
  border: 1px solid rgba(0,255,242,0.4);
}

.btn-primary:hover {
  background: rgba(0,255,242,0.3);
  box-shadow: 0 0 15px rgba(0,255,242,0.3);
}

.btn-secondary {
  background: rgba(0,255,242,0.05);
  color: #7ffffe;
  border: 1px solid rgba(0,255,242,0.3);
}

.btn-secondary:hover {
  background: rgba(0,255,242,0.1);
}

/* Search Bar & Pagination */
.search-bar {
  display: flex;
  justify-content: center;
  margin: 2rem 0 3rem;
}

.search-bar input {
  background: rgba(0,255,242,0.05);
  border: 1px solid rgba(0,255,242,0.3);
  color: #00fff2;
  font-family: 'Space Mono', monospace;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  border-color: #00fff2;
  box-shadow: 0 0 15px rgba(0,255,242,0.3);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination button {
  background: rgba(0,255,242,0.1);
  border: 1px solid rgba(0,255,242,0.3);
  color: #00fff2;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover {
  background: rgba(0,255,242,0.2);
}

/* Code Viewer */
.code-viewer {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,242,0.2);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
}

.code-block {
  background: rgba(0,0,0,0.8);
  color: #7ffffe;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* States */
.loading-state, .empty-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  font-size: 1.2rem;
  color: #7ffffe;
  min-height: 50vh;
}

.error-state {
  color: #ff4d4d;
}

.error-state small {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #ff8888;
  font-family: monospace;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  overflow-y: auto;
}

.modal-content {
  background: #0b0b0b;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid rgba(0,255,242,0.3);
  border-radius: 12px;
  max-width: 900px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #00fff2;
  font-size: 2rem;
  cursor: pointer;
  transition: opacity 0.3s;
}

.modal-close:hover {
  opacity: 0.7;
}

#modal-body {
  color: #eaffff;
  line-height: 1.8;
}

#modal-body h1, #modal-body h2, #modal-body h3 {
  color: #00fff2;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

#modal-body h1 {
  font-size: 2rem;
  border-bottom: 2px solid rgba(0,255,242,0.3);
  padding-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .biome-header {
    padding: 3rem 1rem 1rem;
  }

  .tab-nav {
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }

  .tab-button {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .article-card {
    padding: 1.5rem;
  }

  .article-actions {
    flex-direction: column;
  }

  .btn-secondary {
    flex-grow: 1;
  }

  .search-bar input {
    max-width: 100%;
  }
}



.loading {
  color: cyan;
  font-style: italic;
  text-align: center;
  margin: 1rem 0;
}
.loaded-indicator {
  background: rgba(0,255,255,0.1);
  color: #0ff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 10px;
  animation: fadeIn 1s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.error {
  color: #f55;
  text-align: center;
}


/* Static Tabs */
.static-tabs .tab-button.static {
  cursor: default;
  pointer-events: none;
  background: rgba(0,255,242,0.12);
  border: 1px solid rgba(0,255,242,0.25);
  color: #00fff2;
  box-shadow: inset 0 0 12px rgba(0,255,242,0.25);
  transition: none;
}

.static-tabs .tab-button.static.active {
  background: rgba(0,255,242,0.25);
  border-color: #00fff2;
  color: #00fff2;
  box-shadow: 0 0 20px rgba(0,255,242,0.4);
}

.static-tabs .tab-button.static:hover {
  background: rgba(0,255,242,0.12);
  border-color: rgba(0,255,242,0.25);
  box-shadow: inset 0 0 12px rgba(0,255,242,0.25);
}
