body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  color: #333;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

/* Sticky Header */
.header {
  position: sticky;
  top: 0;
  background-color: #fff;
  padding: 10px 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 100;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header h1 {
  font-size: 28px;
  margin: 0;
}
.header a {
  font-size: 14px;
  color: #4B0082;
  text-decoration: none;
}
.header button {
  background-color: #4B0082;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}
.header button:hover {
  background-color: #6A0DAD;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #4B0082;
}

h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #4B0082;
}

p {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Card Styling */
.card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 20px;
  transition: background-color 0.3s;
}

/* Audio Player Section */
.audio-section {
  text-align: center;
}
audio {
  margin: 20px 0;
  width: 100%;
}
#todayAudioApp.loading::after {
  content: "Loading...";
  animation: blink 1s infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
  padding-top: 60px;
}
.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}
.close:hover,
.close:focus {
  color: black;
  cursor: pointer;
}

/* Progress Section */
.progress-section {
  text-align: center;
}
.progress-summary {
  font-size: 16px;
  color: #555;
  margin-bottom: 15px;
}
.toggle-progress {
  background-color: #4B0082;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
}
.toggle-progress:hover {
  background-color: #6A0DAD;
}

/* Streak Tracker Styles */
#streakTracker {
  padding: 15px;
  text-align: center;
}
#streakTracker p {
  font-size: 18px;
  margin: 10px 0;
}

/* Current Month Activity Tracker Styles */
#monthActivityTracker {
  padding: 20px;
  text-align: center;
}
.month-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}
.days-of-week {
  display: flex;
  width: 100%;
  justify-content: space-around;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}
.month-grid-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.week-row {
  display: flex;
  justify-content: space-around;
  width: 100%;
}
.month-day-box {
  width: 30px;
  height: 30px;
  margin: 2px;
  background-color: #ebedf0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  position: relative;
}

/* Existing listening states */
.month-day-box.listened {
  background-color: #9be9a8;
}
.month-day-box.listened-high {
  background-color: #40c463;
}
.month-day-box.empty {
  background-color: transparent;
}

/* NEW — Unified color system */
.month-day-box.viewed {
  background-color: #4caf50;
  color: white;
}

.month-day-box.past {
  background-color: #ff4d4d;
  color: white;
}

.month-day-box.current {
  background-color: #2196f3;
  color: white;
  animation: pulse 2s infinite;
}

.month-day-box.future {
  background-color: #e0e0e0;
  color: #666;
}

/* Tooltip */
.month-day-box:hover .tooltip {
  visibility: visible;
  opacity: 1;
}
.tooltip {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}
.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Pulse animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* CTA Button */
.cta-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4B0082;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
  margin: 10px 0;
}
.cta-button:hover {
  background-color: #6A0DAD;
}

/* Share Button */
.share-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
.share-button:hover {
  background-color: #45a049;
}

/* Footer */
footer {
  background-color: #e0e0e0;
  padding: 10px;
  text-align: center;
  margin-top: 20px;
  transition: background-color 0.3s;
}

/* Dark Mode */
.dark-mode {
  background-color: #333;
  color: #fff;
}
.dark-mode .card {
  background-color: #444;
}
.dark-mode .header {
  background-color: #222;
}
.dark-mode footer {
  background-color: #222;
}
.dark-mode .month-day-box {
  background-color: #555;
}
.dark-mode .month-day-box.listened {
  background-color: #7bb;
}
.dark-mode .month-day-box.listened-high {
  background-color: #5a9;
}
.dark-mode .days-of-week {
  color: #ccc;
}
.dark-mode .progress-summary {
  color: #ccc;
}

/* Responsive Design */
@media (max-width: 600px) {
  .month-day-box {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }
  .header h1 {
    font-size: 24px;
  }
  .header button {
    font-size: 12px;
    padding: 4px 8px;
  }
  .card {
    padding: 15px;
  }
}

#ytFrame::-webkit-scrollbar {
  display: none;
}
