/* Import Inter Font (if not already loaded globally) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;700;900&display=swap');

:root {
  /* Inherited Palette */
  --bg-deep: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);

  /* Tile Specific */
  --heart-red: #e11d48;
  --heart-glow: rgba(225, 29, 72, 0.6);
  --wealth-gold: #fbbf24;
  --safe-green: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --radius-lg: 24px;
}

.charity-view {
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  background-image: radial-gradient(circle at 50% 100%, rgba(225, 29, 72, 0.1) 0%, transparent 50%);
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Background Blobs */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  z-index: 0;
  animation: float 10s infinite ease-in-out;
}
.glow-red { width: 300px; height: 300px; background: var(--heart-red); top: -50px; left: 20%; }
.glow-gold { width: 400px; height: 400px; background: var(--wealth-gold); bottom: -100px; right: 20%; animation-delay: -5s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 30px); }
}

/* Header */
.charity-header { text-align: center; z-index: 2; margin-bottom: 2rem; }
.header-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--heart-red);
  background: rgba(225, 29, 72, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(225, 29, 72, 0.2);
  margin-bottom: 0.5rem;
}
.charity-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Stage */
.charity-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

/* Main Card */
.status-card {
  width: 150%;
  max-width: 620px;
  position: relative;
}
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--glass-highlight);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.5s ease;
}

/* Reactor / Icon */
.reactor-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.heart-core {
  font-size: 4rem;
  z-index: 2;
  filter: drop-shadow(0 0 20px var(--heart-glow));
  transition: transform 0.3s ease;
}
.orbital-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--heart-red);
  border-radius: 50%;
  animation: spin 3s linear infinite;
}
.orbital-ring.small { width: 70%; height: 70%; animation-direction: reverse; border-top-color: var(--wealth-gold); animation-duration: 2s; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Reactor States */
.heart-core.pulse-green { animation: heartbeat-green 1s infinite; filter: drop-shadow(0 0 20px var(--safe-green)); }
.heart-core.pulse-red { animation: heartbeat-red 0.8s infinite; filter: drop-shadow(0 0 20px var(--heart-red)); }
.heart-core.pump-fast { animation: heartbeat-red 0.3s infinite; }
.heart-core.settled { transform: scale(1); filter: grayscale(0.5) opacity(0.8); }

@keyframes heartbeat-green { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes heartbeat-red { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Info */
.status-info { text-align: center; }
.player-label { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; }
.bracket-badge {
  font-size: 2rem;
  font-weight: 900;
  margin: 4px 0;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.coin-display { font-size: 1.1rem; color: var(--wealth-gold); font-weight: 600; }

/* Transaction Zone */
.transaction-zone {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.05);
}
.tx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tx-row.pop { transform: scale(1.05); }
.value.neg { color: var(--heart-red); }
.value.pos { color: var(--safe-green); }

/* Footer */
.hud-footer { margin-top: 2rem; z-index: 2; display: flex; justify-content: center; }
.message-glass {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  text-align: center;
  min-width: 300px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.message-glass.warning { border-color: var(--heart-red); color: var(--heart-red); }
.message-glass.success { border-color: var(--safe-green); color: var(--safe-green); }
.message-glass.highlight { border-color: var(--wealth-gold); color: var(--wealth-gold); }
.message-glass.final { background: var(--glass-highlight); color: #fff; font-weight: 700; }

.blink { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }