:root {
  --christmas-red: #e63946;
  --christmas-green: #2a9d8f;
  --christmas-gold: #e9c46a;
  --winter-blue: #457b9d;
  --snow-white: #f1faee;
  --dark-blue: #1d3557;
  --gradient-xmas: linear-gradient(135deg, #e63946, #2a9d8f, #e9c46a);
  --shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #1d3557, #457b9d);
  color: var(--dark-blue);
  min-height: 100vh;
  overflow-x: hidden;
  padding: 20px;
  position: relative;
}

.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.christmas-lights {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: repeating-linear-gradient(
    90deg,
    var(--christmas-red),
    var(--christmas-red) 20px,
    var(--christmas-green) 20px,
    var(--christmas-green) 40px,
    var(--christmas-gold) 40px,
    var(--christmas-gold) 60px,
    var(--snow-white) 60px,
    var(--snow-white) 80px
  );
  z-index: 2;
  opacity: 0.8;
  animation: lightsTwinkle 2s infinite;
}

@keyframes lightsTwinkle {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

.main-container {
  max-width: 1200px;
  margin: 40px auto 100px;
  position: relative;
  z-index: 3;
  background: rgba(241, 250, 238, 0.95);
  border-radius: 25px;
  padding: 30px;
  box-shadow: var(--shadow);
  border: 5px solid var(--christmas-red);
}

.header {
  text-align: center;
  margin-bottom: 50px;
  padding: 30px;
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.1),
    rgba(42, 157, 143, 0.1)
  );
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.christmas-header {
  margin-bottom: 30px;
}

.lights-row {
  height: 3px;
  background: var(--gradient-xmas);
  margin: 20px 0;
  position: relative;
}

.lights-row::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 20px;
  background: radial-gradient(
      circle at 20px 50%,
      var(--christmas-red) 10px,
      transparent 11px
    ),
    radial-gradient(
      circle at 60px 50%,
      var(--christmas-green) 10px,
      transparent 11px
    ),
    radial-gradient(
      circle at 100px 50%,
      var(--christmas-gold) 10px,
      transparent 11px
    );
  background-repeat: repeat-x;
  background-size: 40px 20px;
}

.main-title {
  font-family: "Montserrat", sans-serif;
  font-size: 3.2rem;
  color: var(--christmas-red);
  margin: 30px 0;
  text-shadow: 3px 3px 0 rgba(42, 157, 143, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.christmas-icon,
.birthday-icon {
  font-size: 4rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.subtitle {
  font-size: 1.3rem;
  color: var(--winter-blue);
  font-weight: 600;
  margin-top: 20px;
}

.birthday-person h2 {
  font-size: 2.5rem;
  color: var(--dark-blue);
  margin-bottom: 30px;
  font-weight: 800;
}

.date-badge {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px auto;
  flex-wrap: wrap;
}

.date-item {
  background: white;
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-width: 120px;
  border: 3px solid var(--christmas-gold);
}

.date-item.main {
  transform: scale(1.1);
  border-color: var(--christmas-red);
  background: linear-gradient(135deg, #ffe8e8, white);
  z-index: 2;
}

.date-item .number {
  font-size: 3rem;
  font-weight: 900;
  display: block;
  line-height: 1;
  color: var(--christmas-red);
}

.date-item.main .number {
  color: var(--christmas-green);
  font-size: 3.5rem;
}

.date-item .label {
  font-size: 1.1rem;
  color: var(--dark-blue);
  opacity: 0.8;
  margin-top: 10px;
  display: block;
}

.festive-note {
  background: var(--christmas-green);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 50px;
  margin-top: 20px;
  font-size: 1.2rem;
  font-weight: 600;
}

.greeting-card {
  background: white;
  border-radius: 25px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--christmas-gold);
}

.card-section {
  margin-bottom: 50px;
  padding: 35px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9),
    rgba(241, 250, 238, 0.9)
  );
  border-radius: 20px;
  border-left: 8px solid var(--christmas-red);
}

.card-section.festive {
  background: linear-gradient(135deg, #fff0f0, #f0fff5);
  border-left-color: var(--christmas-green);
}

.card-section h3 {
  color: var(--christmas-red);
  font-size: 1.8rem;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
  text-align: center;
}

.section-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
  text-align: center;
}

.timeline-section {
  background: linear-gradient(135deg, #e8f4ff, white);
  padding: 40px;
  border-radius: 20px;
  margin: 40px 0;
  border: 3px dashed var(--winter-blue);
}

.timeline {
  position: relative;
  margin: 50px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-xmas);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
}

.timeline-year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-xmas);
  color: white;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  z-index: 2;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border: 5px solid white;
}

.timeline-content {
  width: 45%;
  padding: 25px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: auto;
  margin-left: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
  margin-right: 55%;
}

.timeline-icon {
  font-size: 3rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 120px;
}

.friendship-counter {
  text-align: center;
  margin-top: 60px;
  padding: 30px;
  background: white;
  border-radius: 20px;
  border: 3px solid var(--christmas-gold);
}

.counter-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.counter-number {
  font-size: 5rem;
  font-weight: 900;
  color: var(--christmas-red);
  line-height: 1;
}

.counter-text {
  font-size: 1.5rem;
  color: var(--dark-blue);
  font-weight: 600;
}

.counter-note {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  color: var(--christmas-green);
  margin-top: 15px;
}

.message-header.festive {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
}

.holly-left,
.holly-right {
  font-size: 3rem;
  animation: swing 3s infinite ease-in-out;
}

@keyframes swing {
  0%,
  100% {
    transform: rotate(-15deg);
  }
  50% {
    transform: rotate(15deg);
  }
}

.message-content {
  line-height: 1.8;
}

.dropcap::first-letter {
  font-size: 4rem;
  font-weight: 900;
  float: left;
  line-height: 0.8;
  margin-right: 15px;
  color: var(--christmas-red);
  font-family: "Dancing Script", cursive;
}

.quote-box.festive {
  background: linear-gradient(135deg, #fff8e8, white);
  border-left: 5px solid var(--christmas-gold);
  padding: 30px;
  margin: 40px 0;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.quote-mark {
  font-size: 4rem;
  color: var(--christmas-red);
  opacity: 0.5;
  font-family: "Georgia", serif;
}

.quote {
  flex: 1;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--dark-blue);
  text-align: center;
  font-weight: 600;
}

.highlight-box.winter {
  background: linear-gradient(135deg, #f0f9ff, white);
  border: 3px solid var(--winter-blue);
  padding: 30px;
  border-radius: 20px;
  margin: 40px 0;
}

.highlight-box h4 {
  color: var(--winter-blue);
  margin-bottom: 25px;
  font-size: 1.4rem;
}

.highlight-box ul {
  list-style: none;
  padding: 0;
}

.highlight-box li {
  margin-bottom: 15px;
  padding-left: 40px;
  position: relative;
  font-size: 1.1rem;
}

.highlight-box li i {
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--christmas-green);
  font-size: 1.2rem;
}

.wishes-section {
  margin: 60px 0;
}

.wishes-section h4 {
  text-align: center;
  color: var(--christmas-red);
  margin-bottom: 40px;
  font-size: 1.6rem;
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.wish-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  border-top: 5px solid var(--christmas-gold);
}

.wish-card:hover {
  transform: translateY(-10px);
}

.wish-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.encouragement.festive {
  background: linear-gradient(135deg, #fff0f0, white);
  padding: 30px;
  border-radius: 20px;
  margin: 50px 0;
  border: 3px solid var(--christmas-red);
}

.santa-note {
  display: flex;
  align-items: center;
  gap: 30px;
}

.santa-icon {
  font-size: 4rem;
  animation: shake 2s infinite;
}

@keyframes shake {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

.santa-text {
  flex: 1;
}

.christmas-section {
  background: linear-gradient(135deg, #f0fff5, white);
  padding: 40px;
  border-radius: 20px;
  margin: 60px 0;
  border: 3px solid var(--christmas-green);
}

.perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.perk {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.perk-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.perk h5 {
  color: var(--christmas-green);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.interactive-section {
  text-align: center;
  margin: 60px 0;
  padding: 40px;
  background: linear-gradient(135deg, #fff8f0, white);
  border-radius: 25px;
}

.interactive-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.fun-btn {
  background: var(--gradient-xmas);
  color: white;
  border: none;
  padding: 25px;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  transition: all 0.3s;
  min-height: 80px;
  box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
}

.fun-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(230, 57, 70, 0.4);
}

.fun-btn.festive {
  background: linear-gradient(
    135deg,
    var(--christmas-red),
    var(--christmas-green)
  );
}

.countdown-section {
  text-align: center;
  margin: 60px 0;
  padding: 40px;
  background: linear-gradient(135deg, #e8f4ff, white);
  border-radius: 25px;
  border: 3px solid var(--winter-blue);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.time-unit .number {
  font-size: 4rem;
  font-weight: 900;
  color: var(--christmas-red);
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.time-unit .label {
  margin-top: 10px;
  color: var(--dark-blue);
  font-size: 1.1rem;
  font-weight: 600;
}

.countdown-note {
  margin-top: 30px;
  font-size: 1.2rem;
  color: var(--christmas-green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.signature-section {
  margin: 60px 0 40px;
}

.signature-card {
  background: white;
  padding: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--christmas-gold);
}

.signature-content {
  flex: 1;
  text-align: center;
}

.greeting {
  font-size: 1.2rem;
  color: var(--dark-blue);
  opacity: 0.8;
  margin-bottom: 10px;
}

.name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--christmas-red);
  margin: 15px 0;
  font-family: "Dancing Script", cursive;
}

.signature-line {
  width: 200px;
  height: 2px;
  background: var(--gradient-xmas);
  margin: 20px auto;
}

.signature-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--christmas-green);
  margin: 15px 0;
}

.date {
  font-size: 1.1rem;
  color: var(--winter-blue);
  font-style: italic;
}

.signature-decoration {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.decoration {
  font-size: 2.5rem;
  animation: spin 4s linear infinite;
}

.decoration:nth-child(2) {
  animation-delay: 1s;
}
.decoration:nth-child(3) {
  animation-delay: 2s;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.audio-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 50px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 15px;
  backdrop-filter: blur(10px);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

#volume {
  width: 80px;
  accent-color: var(--christmas-red);
}

.play-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-xmas);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.play-btn:hover {
  transform: scale(1.1);
}

.tree-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 100;
  display: none;
}

.tree {
  position: relative;
  width: 100px;
  height: 150px;
}

.tree-top,
.tree-middle,
.tree-bottom {
  position: absolute;
  text-align: center;
  width: 100%;
}

.tree-top {
  top: 0;
  font-size: 2rem;
}

.tree-middle {
  top: 40px;
  font-size: 2.5rem;
}

.tree-bottom {
  top: 90px;
  font-size: 2rem;
}

.tree-trunk {
  position: absolute;
  bottom: 0;
  left: 45%;
  width: 10px;
  height: 30px;
  background: #8b4513;
  border-radius: 5px;
}

.ornament {
  animation: ornamentGlow 2s infinite;
  animation-delay: calc(var(--delay) * 0.5s);
}

@keyframes ornamentGlow {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.close-tree {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--christmas-red);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
}

.gift-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.gift-box {
  background: white;
  padding: 40px;
  border-radius: 25px;
  max-width: 500px;
  width: 90%;
  position: relative;
  text-align: center;
  border: 5px solid var(--christmas-gold);
}

.close-gift {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--christmas-red);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.gift-icon {
  font-size: 5rem;
  margin: 20px 0;
  animation: bounce 2s infinite;
}

.gift-content h3 {
  color: var(--christmas-red);
  margin-bottom: 30px;
}

.gift-message {
  text-align: left;
  margin: 30px 0;
}

.gift-message ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.gift-message li {
  margin: 15px 0;
  padding-left: 40px;
  position: relative;
  font-size: 1.1rem;
}

.gift-message li::before {
  content: "🎄";
  position: absolute;
  left: 0;
}

.highlight {
  color: var(--christmas-red);
  font-weight: 900;
}

.gift-note {
  font-weight: 700;
  color: var(--christmas-green);
  font-size: 1.2rem;
  margin-top: 25px;
}

.unwrap-btn {
  background: var(--gradient-xmas);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  text-align: center;
  background: rgba(29, 53, 87, 0.9);
  color: white;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 15px;
  font-size: 1.8rem;
}

@media (max-width: 768px) {
  .main-title {
    font-size: 2.2rem;
    flex-direction: column;
    gap: 15px;
  }

  .date-badge {
    gap: 15px;
  }

  .date-item {
    min-width: 100px;
    padding: 15px 20px;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-year {
    left: 30px !important;
  }

  .timeline-content {
    width: calc(100% - 80px);
    margin-left: 80px !important;
  }

  .countdown-timer {
    gap: 20px;
  }

  .time-unit .number {
    font-size: 2.5rem;
  }

  .signature-card {
    flex-direction: column;
    gap: 30px;
  }

  .audio-container {
    bottom: 80px;
    right: 50%;
    transform: translateX(50%);
  }
}
