body {
  margin: 0;
  padding: 0;
  background-color: #f4f6f8;
  color: #333;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

header {
  text-align: center;
  padding: 10px 20px; /* Reduced padding */
  background-color: #1e355f;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding-right: 400px;
  position: relative; /* Ensure the feedback link is positioned correctly */
}

.feedback-link {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.feedback-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.mode-buttons {
  margin: 10px 0;
}

.mode-buttons button {
  background-color: #fff;
  color: #333;
  border: 2px solid #1e355f;
  border-radius: 8px;
  padding: 8px 16px;
  margin: 0 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mode-buttons button:hover {
  background-color: #ecf9ec;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
  font-size: 0.9rem; /* Slightly smaller font */
}

.holiday-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

main {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
  max-width: 1120px;
  padding: 10px;
  background-color: #f4f6f8;
  padding-right: 400px; /* Remove padding on the right */
  position: relative;
}

/* Right ad panel with same gray background, no border, no shadow */
#rightAd {
  background-color: #f5f6f8; /* Same gray as page */
  color: #333;
  text-align: center;
  border-radius: 12px;
  box-shadow: none;
  font-size: 1rem;
  padding: 10px;
  width: 320px;
  min-height: 200px;
  margin: 10px;
  position: absolute; /* Changed from fixed to absolute */
  top: 400px; /* Adjusted to position it below the header */
  right: 15px; /* Position it on the right side */
  z-index: 1000; /* Ensure it stays on top of other elements */
}

/* Calendar View */
#calendarView {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.calendar-month {
  border: none;
  margin: 10px;
  border-radius: 12px;
  background-color: #ffffff;
  width: 480px;
  padding: 15px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}

.calendar-month h3 {
  text-align: center;
  margin: 10px 0;
  color: #1a73e8;
  font-size: 1.25rem;
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px; /* Reduced gap for a tighter layout */
}

.day {
  text-align: center;
  padding: 10px; /* Reduced padding */
  border-radius: 6px; /* Slightly smaller radius */
  background-color: #ffffff; /* White background */
  border: 1px solid #e0e0e0; /* Light border */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.day.header {
  font-size: 0.85rem;
  font-weight: bold;
  color: #666; /* Darker text for headers */
  background-color: #f9fafc; /* Light gray background for headers */
  border: none; /* No border for headers */
}

.day:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow on hover */
  cursor: pointer;
}

.day.holiday {
  background-color: #fff3e0; /* Light orange background for holidays */
  color: #e65100; /* Darker orange text for holidays */
  font-weight: bold;
  border: 1px solid #ffcc80; /* Orange border for holidays */
}

.day.holiday .holiday-name {
  font-size: 0.75rem;
  margin-top: 4px;
  color: #e65100; /* Orange text for holiday names */
}

.hidden {
  display: none !important;
}

/* Print mode: simpler layout, hide ads, no splitting months */
@media print {
  /* Hide the right ad container */
  #rightAd, .feedback-link, #bottomAd, .emoji-list {
    display: none !important;
  }

  h5 {
    display: none !important;
  }

  /* Hide selection options at the top (mode buttons + controls) */
  .mode-buttons,
  .controls {
    display: none !important;
  }

  /* Prevent months from splitting across pages */
  .calendar-month,
  .list-month {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  body {
    background-color: #fff !important;
    color: #000 !important;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  header {
    background-color: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    padding: 20px !important;
  }

  .calendar-month,
  #listView {
    box-shadow: none !important;
    border: none !important;
    width: auto !important;
    margin: 0 auto 20px auto !important;
  }

  main {
    display: block !important;
    max-width: 100% !important;
    background-color: #fff !important;
    box-shadow: none !important;
    margin-right: 0 !important;
  }

  .day {
    box-shadow: none !important;
    transition: none !important;
  }

  .holiday-item {
    box-shadow: none !important;
  }
  .qa-alignment {
    display: none;
  }
}

/* List Mode */
#listView {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
  width: 480px;
  padding: 15px;
  margin: 10px;
}

.list-month {
  margin-bottom: 20px;
}

.list-month h3 {
  margin: 10px 0;
  color: #1a73e8;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: left;
}

.holiday-item {
  margin: 6px 0;
  padding: 8px 12px;
  background-color: #f9fafc;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Emoji List */
.emoji-list {
  position: absolute;
  top: 150px;
  right: 25px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 8px;
  width: 320px;
}

.emoji-list ul {
  list-style-type: none; /* Remove bullets */
  padding: 0; /* Remove default padding */
  margin: 0; /* Remove default margin */
}

.emoji-list li {
  margin: 10px 0;
  font-size: 0.9rem;
  color: white;
  text-align: left; /* Align text to the left */
  padding-left: 0; /* Remove any left padding */
}

.emoji-list li::before {
  content: ""; /* Remove the bullet point */
  margin-right: 0; /* Remove the margin for the bullet */
}

.emoji-list a {
  color: #f2ff36; /* Blue color for the link */
  text-decoration: none; /* Remove underline */
  font-weight: bold; /* Make the link bold */
}

.emoji-list a:hover {
  text-decoration: underline; /* Add underline on hover */
}

/* Bottom Ad Section */
#bottomAd {
  width: 960px;
  margin: 20px auto;
  text-align: center;
  background-color: #f5f6f8;
  padding: 10px;
  border-radius: 12px;
}

/* Q&A Section */
.qa-section {
  width: 100%; /* Make it full width within the main container */
  max-width: 960px; /* Match the width of the calendar/list view */
  margin: 20px auto; /* Center the Q&A section */
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
}
.qa-section h2 {
  text-align: center;
  color: #1a73e8;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.qa-alignment {
  padding-right: 400px;
}

.qa-item {
  margin-bottom: 10px;
}

.qa-question {
  position: relative; /* Ensure the arrow is positioned relative to the question */
  padding-left: 30px; /* Add space for the arrow */
}

.qa-question::before {
  content: "▶"; /* Right-pointing arrow (closed state) */
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: #1a73e8;
  transition: transform 0.2s ease; /* Smooth rotation animation */
}

.qa-item.active .qa-question::before {
  content: "▼"; /* Down-pointing arrow (open state) */
}

.qa-question:hover {
  background-color: #ecf9ec;
}

.qa-answer {
  padding: 10px;
  background-color: #f4f6f8;
  border-radius: 8px;
  margin-top: 5px;
  display: none;
}

.qa-item.active .qa-answer {
  display: block;
}

