* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #F6F9FF;
  background: linear-gradient(135deg, #07121F, #0B1C30, #A7D8FF, #FFE89C);
  background-size: 300% 300%;
  animation: lmsyGradient 18s ease-in-out infinite;
}

@keyframes lmsyGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem 1rem 1.5rem;
  border-radius: 1.5rem;
  background: rgba(7, 18, 31, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(167, 216, 255, 0.45);
}

.avatar-circle {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  padding: 3px;
  background: conic-gradient(from 140deg, #FFE89C, #A7D8FF, #FFE89C);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: block;
  object-fit: cover;
}

h1 {
  margin: 0.2rem 0;
  font-size: 2rem;
}

h2 {
  margin: 0.2rem 0 0.6rem;
  font-weight: 500;
  font-size: 1.1rem;
  color: #A7D8FF;
}

.header-subtitle .nowrap {
  white-space: nowrap;
}

.description {
  margin: 0.3rem 0;
  color: #DCEBFF;
  font-size: 0.96rem;
}

.note {
  margin: 0.2rem 0 0.8rem;
  font-size: 0.8rem;
  color: #FFE89C;
}

.lang-toggle {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(11, 28, 48, 0.9);
  border: 1px solid rgba(167, 216, 255, 0.5);
}

.lang-toggle button {
  border: none;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  color: #DCEBFF;
  font-size: 0.8rem;
  cursor: pointer;
}

.lang-toggle button.active {
  background: linear-gradient(135deg, #A7D8FF, #FFE89C);
  color: #07121F;
  font-weight: 600;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.5rem 0;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(7, 18, 31, 0.8);
  border: 1px solid rgba(167, 216, 255, 0.5);
  backdrop-filter: blur(10px);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filters label {
  font-size: 0.85rem;
  color: #A7D8FF;
}

.filters select {
  background: rgba(11, 28, 48, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(167, 216, 255, 0.7);
  padding: 0.25rem 0.9rem;
  color: #F6F9FF;
  font-size: 0.85rem;
  min-width: 80px;
}

#filter-type {
  min-width: 130px;
}

.month-group {
  margin-bottom: 1.8rem;
}

.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.month-label-box {
  border-radius: 999px;
  border: 1px solid rgba(214, 219, 235, 0.8);
  padding: 0.2rem 0.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #DCEBFF;
}

.month-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.event-card {
  background: rgba(248, 249, 252, 0.07);
  border-radius: 1rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(214, 219, 235, 0.9);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
}

.event-date {
  text-align: center;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.event-date-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid #FFE89C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  background: rgba(7, 18, 31, 0.8);
}

.event-date-month {
  margin-top: 0.25rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #A7D8FF;
}

.event-date-weekday {
  margin-top: 0.1rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #07121F;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 232, 156, 0.9);
}

.event-main {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.event-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.event-icon {
  font-size: 1rem;
}

.event-title {
  font-weight: 600;
  font-size: 0.98rem;
  color: #F6F9FF;
}

.event-meta {
  font-size: 0.8rem;
  color: #DCEBFF;
}

.event-notes {
  font-size: 0.78rem;
  color: #E5EDFF;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.tag {
  font-size: 0.68rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 216, 255, 0.55);
  background: rgba(7, 18, 31, 0.8);
  color: #DCEBFF;
}

.tag-lm {
  border-color: rgba(255, 232, 156, 0.7);
  background: rgba(255, 232, 156, 0.16);
  color: #FFE89C;
}

.tag-sy {
  border-color: rgba(167, 216, 255, 0.8);
  background: rgba(167, 216, 255, 0.16);
  color: #A7D8FF;
}

.tag-lmsy {
  border-image: linear-gradient(135deg, #A7D8FF, #FFE89C) 1;
  border-width: 1px;
}

.tag-fm {
  border-color: rgba(137, 196, 255, 0.9);
  background: rgba(9, 34, 64, 0.95);
}

.tag-award {
  border-color: rgba(255, 215, 160, 0.9);
  background: rgba(63, 39, 0, 0.9);
}

.tag-event {
  border-color: rgba(212, 212, 255, 0.9);
  background: rgba(49, 51, 89, 0.9);
}

.empty {
  font-size: 0.9rem;
  color: #DCEBFF;
  margin-top: 1rem;
}


.event-hashtags {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  opacity: 0.98;
}

.event-hashtags a {
  color: #A7D8FF;
  text-decoration: none;
  margin-right: 0.35rem;
}

.event-hashtags a:hover {
  text-decoration: underline;
}

.footer {
  margin-top: 1.8rem;
  font-size: 0.78rem;
  color: #F6F9FF;
  text-align: center;
  background: rgba(7, 18, 31, 0.72);
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(167, 216, 255, 0.25);
}

.footer .hashtags {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  opacity: 0.95;
  word-spacing: 0.25rem;
}

.footer .hashtags a {
  color: #A7D8FF;
  text-decoration: none;
  margin-left: 0.2rem;
}

.footer .hashtags a:hover {
  text-decoration: underline;
}

.nowrap {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .page {
    padding: 1rem;
  }

  .filters {
    border-radius: 1rem;
    padding: 0.6rem 0.8rem;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-date {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .event-date-month,
  .event-date-weekday {
    margin-top: 0;
  }
}


/* Today / Tomorrow indicator */
.event-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1;
  white-space: nowrap;
}

.event-badge-today {
  border-color: rgba(137, 196, 255, 0.9);
  background: rgba(9, 34, 64, 0.85);
}

.event-badge-tomorrow {
  border-color: rgba(212, 212, 255, 0.9);
  background: rgba(49, 51, 89, 0.85);
}

/* Optional subtle emphasis */
.event-card.is-today {
  box-shadow: 0 0 0 1px rgba(137, 196, 255, 0.35);
}

.event-card.is-tomorrow {
  box-shadow: 0 0 0 1px rgba(212, 212, 255, 0.25);
}

/* Google Calendar button */
.event-gcal {
  margin-top: 10px;
}

.gcal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.18);
  text-decoration: none;
  color: inherit;
  font-size: 11px;
  font-weight: 500;
}

.gcal-btn:hover {
  background: rgba(0, 0, 0, 0.35);
}
/* Footer hashtag link styling */
.footer-hashtags a,
.footer-hashtags a:visited {
  color: inherit;
  text-decoration: none;
}

.footer-hashtags a:hover,
.footer-hashtags a:focus {
  text-decoration: underline;
}

.footer-hashtags a:active {
  color: inherit;
}
.hashtag-title {
  margin-bottom: 2px;
}
.hashtag-title {
  margin-bottom: 3px;
  font-weight: 500;
}
