/* Custom scrollbar for overflow */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(13, 148, 136, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(13, 148, 136, 0.8);
}

@media print {
  body * {
    visibility: hidden;
  }

  .printable-area,
  .printable-area * {
    visibility: visible;
  }

  .printable-area {
    position: absolute;
    left: 0;
    top: 0;
  }
}

/* Custom styles for the Gregorian calendar */
.calendar-container {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.month-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.month-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.month-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px 0 rgba(0, 0, 0, 0.1);
}

.month-card:hover::before {
  opacity: 1;
}

.month-header {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.8),
    rgba(13, 148, 136, 0.6)
  );
  color: white;
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.month-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.month-card:hover .month-header::after {
  left: 100%;
}

.day-name {
  font-weight: 600;
  color: rgba(13, 148, 136, 0.8);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.day-cell {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.day-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.1);
  transform: scale(0);
  transition: transform 0.2s ease;
  z-index: -1;
}

.day-cell:hover:not(.empty):not(.today)::before {
  transform: scale(1);
}

.day-cell:hover:not(.empty):not(.today) {
  color: rgba(13, 148, 136, 0.8);
  font-weight: 600;
}

.day-cell.today {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.8),
    rgba(13, 148, 136, 0.6)
  );
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(13, 148, 136, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 148, 136, 0);
  }
}

.day-cell.empty {
  visibility: hidden;
}

.year-navigation {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.05);
  padding: 1rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.year-navigation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.year-navigation:hover::before {
  opacity: 1;
}

.year-title {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.8),
    rgba(13, 148, 136, 0.6)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
}

.year-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(13, 148, 136, 0.6),
    transparent
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.year-navigation:hover .year-title::after {
  transform: scaleX(1);
}

.nav-button {
  background: rgba(13, 148, 136, 0.1);
  color: rgba(13, 148, 136, 0.8);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nav-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(13, 148, 136, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.nav-button:hover {
  background: rgba(13, 148, 136, 0.2);
  transform: translateY(-2px);
}

.nav-button:hover::before {
  left: 100%;
}

.print-button {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.8),
    rgba(13, 148, 136, 0.6)
  );
  color: white;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
  position: relative;
  overflow: hidden;
}

.print-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.print-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.3);
}

.print-button:hover::before {
  left: 100%;
}

.calendar-info {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

.calendar-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.calendar-info:hover::before {
  opacity: 1;
}

.info-title {
  color: rgba(13, 148, 136, 0.8);
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(13, 148, 136, 0.2);
  padding-bottom: 0.5rem;
  position: relative;
}

.info-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.8), transparent);
}

.info-text {
  color: #4a5568;
  line-height: 1.6;
}

.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.8),
    rgba(13, 148, 136, 0.6)
  );
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.4);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
}

.date-modal {
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content {
  position: relative;
  overflow: hidden;
}

.modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal-content:hover::before {
  opacity: 1;
}

.modal-title {
  position: relative;
  display: inline-block;
}

.modal-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(13, 148, 136, 0.6),
    transparent
  );
}

.modal-close {
  transition: all 0.2s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.dark-mode {
  background: linear-gradient(to bottom right, #1a202c, #2d3748);
  color: #f7fafc;
}

.dark-mode .month-card {
  background: rgba(26, 32, 44, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .month-header {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.9),
    rgba(13, 148, 136, 0.7)
  );
}

.dark-mode .day-name {
  color: rgba(13, 148, 136, 0.9);
}

.dark-mode .day-cell {
  color: #e2e8f0;
}

.dark-mode .day-cell:hover:not(.empty):not(.today) {
  color: #f7fafc;
}

.dark-mode .year-navigation {
  background: rgba(26, 32, 44, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .nav-button {
  background: rgba(13, 148, 136, 0.2);
  color: #f7fafc;
  border-color: rgba(13, 148, 136, 0.3);
}

.dark-mode .calendar-info {
  background: rgba(26, 32, 44, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .info-text {
  color: #e2e8f0;
}

.dark-mode .modal-content {
  background: rgba(26, 32, 44, 0.9);
  color: #f7fafc;
}

@media (max-width: 768px) {
  .month-card {
    margin-bottom: 1.5rem;
  }

  .day-cell {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }
}
