body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f4f4f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  margin: 0;
}

.calendar-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 1200px;
}

.month-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  width: 300px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.month-header {
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 2px;
}

.day-name {
  font-size: 0.8em;
  color: #7f8c8d;
  font-weight: bold;
  padding-bottom: 5px;
}

/* Weekend headers (Sa, Su) are red */
.weekend-name {
  color: #e74c3c; 
}

.day-cell {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  border-radius: 4px;
}

/* Highlight for Today */
.today {
  background-color: #3498db;
  color: white;
  font-weight: bold;
  border-radius: 50%;
}

/* Highlight for Spreadsheet Matches */
.sheet-match {
  color: #8e44ad; /* Purple */
  font-weight: bold;
  cursor: pointer;
}

/* Ensure today is still readable if it conflicts with sheet-match */
.today.sheet-match {
  background-color: #8e44ad;
  color: white;
}

.empty {
  pointer-events: none;
}

#status-message {
    margin-bottom: 20px;
    color: #666;
    font-style: italic;
}

.hidden {
  display: none !important;
}

/* DETAILS toggle link */
.details-link {
  display: block;
  margin-top: 30px;
  margin-bottom: 10px;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.details-link:hover {
  color: #3498db;
}

/* Details view */
.details-container {
  width: 50vw;
  max-width: 800px;
  min-width: 0;
  box-sizing: border-box;
}

.details-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.details-nav .month-header {
  flex: 1;
  margin-bottom: 0;
}

.nav-btn {
  background: none;
  border: 2px solid #2c3e50;
  color: #2c3e50;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4em;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) {
  background-color: #2c3e50;
  color: white;
}

.nav-btn:disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: default;
}

.events-list {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 10px 0;
  width: 100%;
}

.event-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.event-item:last-child {
  border-bottom: none;
}

.event-date {
  font-size: 0.85em;
  font-weight: bold;
  color: #8e44ad;
  width: 90px;
  flex-shrink: 0;
}

.event-name {
  font-size: 0.95em;
  color: #2c3e50;
}

.events-empty {
  text-align: center;
  color: #7f8c8d;
  font-style: italic;
  padding: 20px;
  margin: 0;
}

.back-link {
  display: block;
  margin-top: 24px;
  margin-bottom: 10px;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.back-link:hover {
  color: #3498db;
}
