:root {
  --bg-body: #1a1a1a;
  --metal-light: linear-gradient(145deg, #e6e6e6, #cfcfcf);
  --metal-dark: linear-gradient(145deg, #2b2b2b, #1f1f1f);
  --metal-accent: linear-gradient(145deg, #4a5568, #2d3748);
  
  --text-main: #e2e8f0;
  --text-dim: #94a3b8;
  --text-metal: #cbd5e1;
  
  --led-green: #10b981;
  --led-amber: #f59e0b;
  --led-blue: #3b82f6;
  --led-red: #ef4444;
  
  --brushed-border: 1px solid rgba(255, 255, 255, 0.1);
  --inner-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.6);
  --outer-glow: 0 0 15px rgba(0, 0, 0, 0.5);
  --radius: 6px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: #121212;
  background-image: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000 100%);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--metal-dark);
  border-bottom: 2px solid #444;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0,0,0,0.8);
  gap: 1rem;
}

.brand {
  font-weight: 800;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: -0.5px;
}

.brand i {
  font-size: 2.2rem;
  color: var(--led-green);
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.6));
}

.search-bar-prominent {
  flex: 1;
  max-width: 600px;
  position: relative;
  display: flex;
  align-items: center;
  background: #111;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}

.search-bar-prominent:focus-within {
  border-color: var(--led-blue);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3), inset 0 2px 4px rgba(0,0,0,0.8);
}

.search-bar-prominent i {
  padding-left: 12px;
  color: var(--text-dim);
  font-size: 1.2rem;
}

.search-bar-prominent input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  outline: none;
}

.search-bar-prominent .search-btn {
  background: linear-gradient(to bottom, #4a5568, #2d3748);
  color: #fff;
  border: 1px solid #555;
  padding: 0 16px;
  height: 40px;
  border-radius: 3px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.search-bar-prominent .search-btn:hover {
  background: linear-gradient(to bottom, #5a6578, #3d4758);
  border-color: #777;
}

.tagline-bar {
  background: #1a1a1a;
  padding: 0.5rem 2rem;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
}

.tagline-item {
  position: relative;
  color: var(--led-amber);
}

.tagline-item:not(:last-child)::after {
  content: "•";
  position: absolute;
  right: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #444;
}

.status-pill {
  background: #000;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #444;
  min-width: 220px;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--led-green);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.9);
  text-shadow: 0 0 5px rgba(16, 185, 129, 0.4);
}

.status-pill i {
  font-size: 1.4rem;
  color: var(--led-green);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.card {
  background: var(--metal-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid #444;
  box-shadow: var(--outer-glow), inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 8px; left: 8px;
  width: 6px; height: 6px;
  background: #333;
  border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.8);
}
.card::after {
  content: "";
  position: absolute;
  top: 8px; right: 8px;
  width: 6px; height: 6px;
  background: #333;
  border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.8);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-metal);
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.card-header i {
  font-size: 1.2rem;
  color: var(--led-amber);
}

.news-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.news-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-left: 2px solid #333;
  cursor: pointer;
  transition: all 0.2s;
}

.news-item:hover {
  background: rgba(255,255,255,0.05);
  border-left-color: var(--led-amber);
}

.news-thumb {
  width: 80px;
  height: 60px;
  border-radius: 2px;
  object-fit: cover;
  background: #222;
  border: 1px solid #444;
  flex-shrink: 0;
}

.news-content h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
  font-family: 'Courier New', monospace;
}

.news-content p {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.mastodon-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mastodon-item {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 8px;
  background: #111;
  border: 1px solid #333;
  border-left: 2px solid var(--led-blue);
  font-family: 'Courier New', monospace;
  cursor: pointer;
}

.mastodon-item:hover {
  background: #1a1a1a;
  color: #fff;
  border-left-color: var(--led-green);
}

.action-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid #555;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(to bottom, #4a5568, #2d3748);
  color: #fff;
  box-shadow: 0 2px 0 #1a1a1a, inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.1s;
}

button:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #1a1a1a, inset 0 1px 0 rgba(0,0,0,0.5);
}

.btn-primary {
  background: linear-gradient(to bottom, #10b981, #059669);
  border-color: #047857;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #34d399, #10b981);
}

.divider {
  margin: 1.5rem 0 1rem;
  text-align: center;
  position: relative;
  color: #555;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

.divider::before, .divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: #333;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.grid-display {
  background: #000;
  padding: 1.5rem;
  border-radius: 4px;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  color: var(--led-green);
  border: 2px solid #333;
  box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.1);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
}

.grid-display::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

.grid-display .val {
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 0 0 10px currentColor;
}

.grid-footer {
  margin-top: 1rem;
  text-align: center;
  color: #555;
  font-size: 0.7rem;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #555;
  font-size: 0.8rem;
  border-top: 1px solid #333;
  margin-top: auto;
  background: #0a0a0a;
  font-family: 'Courier New', monospace;
}

.footer-content {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-content span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #777;
}

.loading-state {
  color: var(--led-amber);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 20px;
  font-family: 'Courier New', monospace;
}

/* --- Sovereign Stack Buttons --- */
.btn-sovereign {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #444;
  border-radius: 4px;
  background: linear-gradient(to right, #2d3748, #1a202c);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  transition: all 0.2s;
  text-align: left;
  white-space: nowrap;
}

.btn-sovereign i {
  color: var(--led-green);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.btn-sovereign:hover {
  background: linear-gradient(to right, #3d4758, #2d3748);
  border-color: var(--led-green);
  transform: translateX(2px);
  color: #fff;
}

/* --- Belfast Run Styles --- */
.card[style*="border-color: #3b82f6"] {
  border: 1px solid #3b82f6 !important;
  background: linear-gradient(145deg, #1e293b, #0f172a);
}
.card[style*="border-color: #3b82f6"] .card-header {
  border-bottom: 1px solid #3b82f6;
}
.btn-primary {
  background: linear-gradient(to right, #3b82f6, #2563eb) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}
.btn-primary:hover {
  background: linear-gradient(to right, #2563eb, #1d4ed8) !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .search-bar-prominent {
    width: 100%;
    max-width: none;
  }
  .tagline-bar {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  .tagline-item:not(:last-child)::after {
    display: none;
  }
  main {
    padding: 1rem;
  }
  .status-pill {
    font-size: 1.2rem;
    min-width: 100%;
  }
  /* Force stack for Sovereign Grid on mobile */
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-column: span 2"] {
    grid-column: 1 / -1 !important;
  }
}
