/* ===================================================
   ====== GLOBAL =====================================
=================================================== */

body {
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: #e5e7eb;
  margin: 0;
}


/* ===================================================
   ====== HEADER =====================================
=================================================== */

header {
  position: relative; /* Needed for theme toggle positioning */
  text-align: center;
  padding: 16px 30px 12px;
  background: linear-gradient(180deg, #020617, #020617cc);
}

.logo {
  width: 90px;
  margin-bottom: 6px;
}

header h1 {
  margin: 6px 0 4px 0;
}

header p {
 margin: 0;
 opacity: 0.85;
}

header {
    position: relative;
}

/* Container for astronaut + moon */
.space-toggle {
    position: absolute;
    top: 16px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10; /* prevents overlap issues */
}

/* Astronaut styling */
.astronaut {
    font-size: 20px;
    cursor: default;
    animation: float 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

/* Optional subtle hover interaction */
.astronaut:hover {
    transform: scale(1.15);
}

/* Theme toggle moon button */
.theme-btn {
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-btn:hover {
    transform: rotate(15deg) scale(1.1);
}

/* ===== Smooth floating animation ===== */
@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}


/* Theme Toggle Button */
.theme-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* ===================================================
   ====== MAIN =======================================
=================================================== */

main {
  padding: 24px 20px;
  text-align: center;
}

main h2 {
  margin: 10px 0 16px 0;
}

/* Refresh Info */
#refresh-info {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 16px;
}

/* ===================================================
   ====== STATUS GRID (LOCKED) =======================
=================================================== */

#status-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 12px auto 0 auto;
  transition: opacity 0.3s ease;
}

/* Smooth refresh fade */
#status-board.refreshing {
  opacity: 0.4;
}

/* ===================================================
   ====== CARDS ======================================
=================================================== */

.card {
  background: #020617;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.card p {
  margin: 6px 0;
  font-size: 0.95rem;
}

/* Updated text */
.updated {
  margin-top: 8px;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Reason hover */
.reason {
  cursor: help;
}

/* ===================================================
   ====== STATUS COLORS ===============================
=================================================== */

.card.operational {
  border-left: 6px solid #00c853;
  color: #00c853;
}

.card.degraded {
  border-left: 6px solid #ffab00;
  color: #ffab00;
}

.card.down {
  border-left: 6px solid #ff1744;
  color: #ff1744;
}

.card.unknown {
  border-left: 6px solid #9e9e9e;
  color: #9e9e9e;
}

/* ===================================================
   ====== GLOBAL STATUS BANNER =======================
=================================================== */

.status-banner {
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
  transition: all 0.4s ease;
}

.status-banner.operational {
  background: #e6f9f0;
  color: #0f9d58;
}

.status-banner.degraded {
  background: #fff4e5;
  color: #f29900;
}

.status-banner.outage {
  background: #fdecea;
  color: #d93025;
}

/* ===================================================
   ====== INCIDENT PANEL ==============================
=================================================== */

.incident-panel {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #1f2937;
}

.incident-panel h3 {
  margin-bottom: 15px;
}

.incident-empty {
  background: #111827;
  padding: 16px;
  border-radius: 10px;
  color: #9ca3af;
}

/* ===================================================
   ====== FOOTER =====================================
=================================================== */

.footer {
  text-align: center;
  padding: 25px;
  color: #9ca3af;
  font-size: 0.9rem;
  margin-top: 40px;
}

.tech-stack {
  margin-top: 8px;
  opacity: 0.8;
}

/* ===================================================
   ====== DARK MODE ==================================
=================================================== */

.dark-mode {
  background: #0f172a;
  color: #e5e7eb;
}

.dark-mode .card {
  background: #1e293b;
}

.dark-mode .incident-empty {
  background: #1e293b;
}

/* ===================================================
   ====== SUBTLE REFRESH PULSE =======================
=================================================== */

@keyframes softPulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.refresh-active {
  animation: softPulse 1s ease-in-out;
}
