/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@700&display=swap');

:root {
  --primary-red: #D90F0F;
  --dark-red: #8B0000;
  --gold: #F2C868;
  --light-yellow: #FFFACD;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Ma Shan Zheng', cursive, 'Noto Serif SC', serif;
  background-color: var(--primary-red);
  background-image: radial-gradient(circle, var(--primary-red) 0%, var(--dark-red) 100%);
  color: var(--gold);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Background Pattern (Optional subtle texture) */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g fill="%239c0b0b" fill-opacity="0.4"><path d="M50 50h10v10H50zM10 10h10v10H10z"/></g></svg>');
  z-index: 0;
  pointer-events: none;
}

/* Lantern Decorations */
.lantern-container {
  position: absolute;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 10;
  pointer-events: none;
}

.lantern {
  width: 80px;
  height: auto;
  animation: swing 3s infinite ease-in-out alternate;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5));
}

@keyframes swing {
  0% {
    transform: rotate(-5deg);
  }

  100% {
    transform: rotate(5deg);
  }
}

/* Main Container */
.container {
  z-index: 1;
  width: 90%;
  max-width: 800px;
  text-align: center;
  margin-top: 20px;
  padding-bottom: 50px;
}

/* Header */
header {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 20px;
  position: relative;
}

header::after {
  content: "福";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10rem;
  opacity: 0.1;
  font-family: 'Ma Shan Zheng', cursive;
  z-index: -1;
}

h1 {
  font-size: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
}

.sub-title {
  font-size: 1.5rem;
  color: var(--light-yellow);
}

/* Date Info Section */
.date-info {
  background: rgba(139, 0, 0, 0.4);
  border: 2px solid var(--gold);
  border-radius: 15px;
  padding: 15px;
  margin: 20px 0;
  box-shadow: 0 0 20px rgba(242, 200, 104, 0.2);
}

.current-date {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.lunar-date {
  font-size: 2rem;
  color: var(--gold);
}

/* Countdown Section */
.countdown-section {
  margin: 30px 0;
  position: relative;
}

.countdown-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.decoration-icon {
  width: 40px;
  height: 40px;
  /* Use a simpler representation like a stylized character or svg if image not available */
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-red);
  font-weight: bold;
}

.countdown-display {
  background: linear-gradient(135deg, #b71c1c, #880e4f);
  border: 4px solid var(--gold);
  border-radius: 50px;
  padding: 20px 40px;
  display: inline-block;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Festivals Grid */
.festivals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
  width: 100%;
}

.festival-item {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 5px;
  font-size: 1.2rem;
  color: var(--light-yellow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.festival-days {
  font-size: 2rem;
  font-weight: bold;
  color: #FFF;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  /* Floating effect */
  margin-bottom: 5px;
}

.festival-item div:last-child {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-family: 'Noto Serif SC', serif;
}

.days-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}

#days {
  font-size: 5rem;
  font-weight: bold;
  line-height: 1;
  color: #FFF;
  text-shadow: 0 0 10px var(--gold);
}

.unit {
  font-size: 2rem;
}

.time-wrapper {
  margin-top: 10px;
  font-size: 1.5rem;
  color: var(--light-yellow);
  font-family: 'Noto Serif SC', serif;
  background: rgba(0, 0, 0, 0.2);
  padding: 5px 20px;
  border-radius: 20px;
}

/* Video Section */
.video-container {
  margin: 40px auto;
  /* Center horizontally */
  position: relative;
  width: 100%;
  max-width: 800px;
  /* Limit max width for large screens */
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  border: 5px solid var(--gold);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  color: #fff;
  font-family: sans-serif;
  z-index: -1;
}

/* Footer & Motto */
.footer-motto {
  margin-top: 20px;
}

.big-motto {
  font-size: 3.5rem;
  background: linear-gradient(to bottom, #FFE082, #F2C868);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0px rgba(0, 0, 0, 0.5));
}

.zodiac-year {
  font-size: 1.2rem;
  margin-top: 10px;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    width: 95%;
    margin-top: 10px;
  }

  h1 {
    font-size: 2rem;
  }

  .current-date,
  .lunar-date {
    font-size: 1.1rem;
  }

  .countdown-display {
    padding: 15px 20px;
  }

  #days {
    font-size: 3.5rem;
  }

  .unit {
    font-size: 1.2rem;
  }

  .time-wrapper {
    font-size: 1.1rem;
  }

  .festivals-grid {
    grid-template-columns: 1fr 1fr;
    /* Keep 2 columns even on mobile for compactness, or 1fr for list */
    gap: 10px;
  }

  .festival-item {
    font-size: 1rem;
  }

  .festival-days {
    font-size: 1.2rem;
  }

  .big-motto {
    font-size: 2rem;
  }

  .lantern {
    width: 50px;
  }

  /* Make countdown title stack on very small screens */
  .countdown-title {
    flex-wrap: wrap;
    font-size: 1.4rem;
  }
}