:root {
  --freshness: 1.0;
  --decay-rate: 0.95;
  --aging-speed: 0.001;
  --fade-start: 0.8;
  --decay-color: #999;
  --fresh-color: #333;
}

.decay-container {
  transition: all 2s ease-in-out;
  opacity: var(--freshness);
  color: color-mix(in srgb, var(--fresh-color) calc(var(--freshness) * 100%), var(--decay-color));
}

.decay-text {
  position: relative;
  transition: all 3s ease-in-out;
}

.decay-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
    transparent 0%,
    transparent calc(var(--freshness) * 100%),
    rgba(255,255,255,0.3) calc((var(--freshness) * 100%) + 10%),
    rgba(255,255,255,0.8) 100%
  );
  pointer-events: none;
  opacity: calc(1 - var(--freshness));
  z-index: 1;
}

.memory-gauge {
  width: 100%;
  height: 20px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid #ccc;
}

.memory-level {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50 0%, #FFC107 50%, #F44336 100%);
  width: calc(var(--freshness) * 100%);
  transition: width 2s ease-in-out;
  border-radius: 10px;
}

.decay-controls {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #f9f9f9;
}

.decay-button {
  margin: 5px;
  padding: 8px 16px;
  border: none;
  border-radius: 3px;
  background: #007acc;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.decay-button:hover {
  background: #005a99;
}

.visit-log {
  font-family: monospace;
  background: #f0f0f0;
  padding: 10px;
  border-radius: 3px;
  font-size: 12px;
  margin: 10px 0;
  max-height: 100px;
  overflow-y: auto;
}

.decay-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 15px 0;
  font-size: 14px;
}

.stat-item {
  text-align: center;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: white;
}

@media (max-width: 768px) {
  .decay-controls {
    text-align: center;
  }
  
  .decay-button {
    display: block;
    width: 100%;
    margin: 5px 0;
  }
}
