:root {
  --font-main: 'Courier New', Courier, monospace;
  --bg-color: #ffffff;
  --text-color: #000000;
  --link-color: #0000ee;
  --visited-color: #551a8b;
  --urgent-color: #cc0000;
  --max-width: 1100px;
}

/* RESET & BASE */
* { box-sizing: border-box; }
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  margin: 0;
  padding: 10px;
  font-size: 14px;
  line-height: 1.2;
}

a { text-decoration: none; color: var(--text-color); cursor: pointer; }
a:hover { text-decoration: underline; }
a:visited { color: var(--text-color); }

/* LAYOUT CONTAINER */
#container {
  max-width: var(--max-width);
  margin: 0 auto;
  background: white;
  padding-bottom: 50px;
}

/* HEADER */
header {
  text-align: center;
  border-bottom: 2px solid black;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

h1.site-title {
  font-size: 3rem;
  margin: 0;
  letter-spacing: -2px;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-bar {
  margin-top: 5px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* MAIN HEADLINE STORY (The "Splash") */
.splash-story {
  text-align: center;
  margin-bottom: 40px;
}

.splash-headline {
  font-size: 2.5rem;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 10px;
}

.splash-headline a {
  color: darkred;
}

.splash-headline a:hover {
  color: blue;
  background-color: yellow;
}

.splash-meta {
  font-size: 0.8rem;
  color: #555;
  margin-top: 5px;
}

.splash-excerpt {
  font-size: 1rem;
  margin: 15px auto;
  max-width: 800px;
  line-height: 1.4;
}

/* COLUMNS LAYOUT */
.columns-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* COLUMN HEADERS */
.col-header {
  background: black;
  color: white;
  padding: 5px;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
}

/* STORY ITEMS */
.story-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 8px;
}

.story-link {
  font-weight: bold;
  font-size: 0.85rem;
  line-height: 1.15;
}

.story-link:hover {
  color: blue;
  background-color: yellow;
}

.story-meta {
  font-size: 0.75rem;
  color: #666;
  margin-top: 2px;
}

.source-tag {
  text-transform: uppercase;
  font-weight: bold;
}

.category-tags {
  font-size: 0.7rem;
  color: #999;
  margin-top: 2px;
}

/* DEVELOPING / URGENT STYLES */
.developing .story-link {
  color: var(--urgent-color) !important;
  font-style: italic;
}

.developing::after {
  content: " [DEVELOPING]";
  font-size: 0.7rem;
  color: red;
  animation: blink 1s infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

/* BACK TO TOP BUTTON */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #000;
  color: white;
  border: 2px solid black;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.3s;
  font-family: var(--font-main);
}

.back-to-top:hover {
  background-color: #333;
  transform: translateY(-2px);
}

.back-to-top.visible {
  display: block;
}

/* FOOTER */
footer {
  margin-top: 50px;
  text-align: center;
  font-size: 0.8rem;
  border-top: 1px solid #ccc;
  padding-top: 10px;
}

footer a {
  font-weight: bold;
  margin: 0 10px;
}

/* LOADING STATE */
.loading {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-weight: bold;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
  font-weight: bold;
}

.pagination button {
  padding: 8px 16px;
  border: 2px solid black;
  background: white;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: bold;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background-color: black;
  color: white;
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination button.active {
  background-color: black;
  color: white;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .columns-wrapper {
    flex-direction: column;
  }
  
  .splash-headline {
    font-size: 1.8rem;
  }
  
  .column {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
  }
  
  h1.site-title {
    font-size: 2rem;
  }
}

/* NEW SECTIONS */
.footer-search { margin: 15px 0; text-align: center; }
#footer-search-input { padding: 8px; width: 60%; max-width: 300px; border: 1px solid #000; font-family: var(--font-main); text-align: center; }
.splash-sublinks { margin-top: 10px; font-size: 0.9rem; }
