:root {
  /* Color Palette - Premium Dark Space Tech */
  --bg-base: #030712;
  --bg-surface: rgba(17, 24, 39, 0.65);
  --bg-surface-hover: rgba(31, 41, 55, 0.8);
  --bg-card: rgba(13, 17, 26, 0.5);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-highlight: rgba(200, 168, 75, 0.3);
  
  /* Accents */
  --gold: #c8a84b;
  --gold-glow: rgba(200, 168, 75, 0.4);
  --cyan: #00e5ff;
  --cyan-glow: rgba(0, 229, 255, 0.4);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  /* Faction Colors */
  --grineer: #ef4444;
  --corpus: #3b82f6;
  --infested: #10b981;
  --orokin: #fbbf24;
  --corrupted: #8b5cf6;
  --sentient: #ec4899;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.03), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(200, 168, 75, 0.03), transparent 25%);
  color: var(--text-main);
  font-family: 'Rajdhani', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: 0.05em;
}

.mono {
  font-family: 'Share Tech Mono', monospace;
}

/* --- Header --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand h1 {
  font-size: 1.75rem;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 0 15px var(--gold-glow);
  letter-spacing: 0.1em;
}

.brand p {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* --- Layout --- */
main {
  flex: 1;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.section-wide { grid-column: 1 / -1; }
.section-half { grid-column: span 2; }

@media (max-width: 800px) {
  .section-half { grid-column: span 1; }
  main { padding: 1rem; }
}

/* --- Glassmorphism Cards --- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-card:hover {
  border-color: var(--glass-border-highlight);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(200, 168, 75, 0.05);
  transform: translateY(-2px);
}

.card-header {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.card-body {
  padding: 1.25rem;
  max-height: 2000px;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 1;
}

.glass-card.collapsed .card-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
}

.chevron {
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.glass-card.collapsed .chevron {
  transform: rotate(-90deg);
}

/* --- Buttons & Controls --- */
.btn-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 4px;
  border: 1px solid var(--glass-border);
}

.btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn.active {
  color: var(--gold);
  background: rgba(200, 168, 75, 0.1);
  box-shadow: inset 0 0 10px rgba(200, 168, 75, 0.1);
}

.refresh-btn {
  border: 1px solid var(--cyan);
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.refresh-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.icon-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- List Items --- */
.list-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s;
}

.list-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

/* --- Timers & Badges --- */
.countdown {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
  font-weight: 600;
}

.countdown.urgent {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.05);
}

/* --- Progress Bars --- */
.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #fcd34d);
  box-shadow: 0 0 10px var(--gold-glow);
  transition: width 0.5s ease-out;
}

/* --- State Messages --- */
.empty-state, .error-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

.skeleton {
  height: 60px;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.02) 25%, 
    rgba(255,255,255,0.05) 50%, 
    rgba(255,255,255,0.02) 75%);
  background-size: 400% 100%;
  animation: loading 1.5s infinite ease-in-out;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
