/* Main Stylesheet for Gaza Casualties Tracker - Original Design */

:root {
  --accent: #f03b3b;
  --glass: rgba(0,0,0,0.52);
  --glass-strong: rgba(0,0,0,0.7);
  --muted: rgba(255,255,255,0.92);
  --muted-weak: rgba(255,255,255,0.7);
  --radius: 12px;
  --max-width: 2400px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  background: #000;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-image: url('/images/background.png');
  background-size: cover;
  background-position: center;
  color: white;
}

/* Overlay */
.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.6));
  pointer-events: none;
  z-index: 0;
}

/* Main container */
.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 24px;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0,0,0,0.28), rgba(0,0,0,0.18));
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(1px) saturate(0.7);
  -webkit-backdrop-filter: blur(1px) saturate(0.7);
}

/* Card */
.card {
  padding: 28px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* Title */
.title {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-weak);
  letter-spacing: 0.02em;
  margin: 0;
}

/* Counter */
.counter {
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  color: var(--muted);
  text-shadow: 0 6px 20px rgba(0,0,0,0.6);
  margin: 0;
}

.counter.small {
  font-size: 44px;
}

/* Row layout */
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Timestamp */
.ts {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

/* Actions */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  color: var(--muted-weak);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(180deg, var(--accent), #c92a2a);
  color: white;
  border: none;
}

.btn.primary:hover {
  background: linear-gradient(180deg, #d32f2f, #b02525);
}

/* Stats grid */
.stats {
  margin-top: 20px;
  width: 100%;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
  border: 1px solid rgba(255,255,255,0.03);
  text-align: center;
}

.stat .num {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.stat .label {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Context text */
.context {
  max-width: 600px;
  margin: 20px auto 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
}

.context a {
  color: rgba(255,255,255,0.9);
  text-decoration: underline;
}

.context a:hover {
  color: var(--accent);
}

/* Credit */
.credit {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 12px;
  text-align: center;
}

.credit a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  margin: 0 5px;
}

.credit a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 520px) {
  .counter {
    font-size: 42px;
  }
  
  .container {
    padding: 18px;
  }
  
  .card {
    padding: 18px;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Loading animation */
.loading {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* Fade in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeIn 0.6s ease-out;
}

/* Hover effects */
.stat:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* Focus states for accessibility */
.btn:focus,
.stat:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .bg-overlay,
  .actions,
  .btn {
    display: none;
  }
  
  .container {
    background: white;
    color: black;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .counter {
    color: black;
    text-shadow: none;
  }
}
