/*===============================================
  NEW YEAR 2025 WISHES - CREATIVE MODAL
  Impressive and attractive design
===============================================*/

/* Modal Container */
.newyear-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  perspective: 1000px;
  padding: 15px;
  overflow: hidden;
}

.newyear-modal.show {
  opacity: 1;
  visibility: visible;
}

.newyear-modal.hide {
  opacity: 0;
  visibility: hidden;
}

/* Overlay with animated gradient */
.newyear-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(0, 245, 212, 0.15) 0%, 
    rgba(123, 44, 191, 0.15) 50%, 
    rgba(247, 37, 133, 0.15) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: gradientShift 8s ease infinite;
  cursor: pointer;
}

@keyframes gradientShift {
  0%, 100% {
    background: linear-gradient(135deg, 
      rgba(0, 245, 212, 0.15) 0%, 
      rgba(123, 44, 191, 0.15) 50%, 
      rgba(247, 37, 133, 0.15) 100%);
  }
  25% {
    background: linear-gradient(135deg, 
      rgba(247, 37, 133, 0.15) 0%, 
      rgba(255, 214, 10, 0.15) 50%, 
      rgba(0, 245, 212, 0.15) 100%);
  }
  50% {
    background: linear-gradient(135deg, 
      rgba(123, 44, 191, 0.15) 0%, 
      rgba(0, 245, 212, 0.15) 50%, 
      rgba(255, 110, 0, 0.15) 100%);
  }
  75% {
    background: linear-gradient(135deg, 
      rgba(255, 214, 10, 0.15) 0%, 
      rgba(247, 37, 133, 0.15) 50%, 
      rgba(123, 44, 191, 0.15) 100%);
  }
}

/* Content Container */
.newyear-content {
  position: relative;
  width: 90%;
  max-width: 650px;
  max-height: 95vh;
  z-index: 10;
  transform: scale(0.8) rotateX(15deg);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: auto;
  overflow: hidden;
}

.newyear-modal.show .newyear-content {
  transform: scale(1) rotateX(0deg);
  opacity: 1;
  border-radius: 25px;
}

.newyear-modal.hide .newyear-content {
  transform: scale(0.8) rotateY(90deg);
  opacity: 0;
}

/* Main Content Box */
.newyear-main {
  position: relative;
  background: rgba(18, 18, 26, 0.95);
  border: 2px solid rgba(0, 245, 212, 0.3);
  border-radius: 25px;
  padding: 30px 30px 35px;
  box-shadow: 
    0 0 60px rgba(0, 245, 212, 0.3),
    0 0 120px rgba(123, 44, 191, 0.2),
    inset 0 0 60px rgba(0, 245, 212, 0.05);
  overflow: visible;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 
      0 0 60px rgba(0, 245, 212, 0.3),
      0 0 120px rgba(123, 44, 191, 0.2),
      inset 0 0 60px rgba(0, 245, 212, 0.05);
  }
  50% {
    box-shadow: 
      0 0 80px rgba(0, 245, 212, 0.5),
      0 0 160px rgba(123, 44, 191, 0.3),
      inset 0 0 80px rgba(0, 245, 212, 0.08);
  }
}

.newyear-main.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px) rotate(-1deg); }
  20%, 40%, 60%, 80% { transform: translateX(5px) rotate(1deg); }
}

/* Animated Year */
.newyear-year {
  font-size: clamp(60px, 12vw, 100px);
  font-weight: 900;
  font-family: 'Syne', sans-serif;
  text-align: center;
  margin-bottom: 15px;
  position: relative;
  line-height: 1;
}

.year-digit {
  display: inline-block;
  background: linear-gradient(135deg, #00f5d4 0%, #7b2cbf 50%, #f72585 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: 
    yearDigitFloat 2s ease-in-out infinite,
    gradientMove 4s ease infinite;
  animation-delay: calc(var(--i) * 0.1s);
  text-shadow: 
    0 0 30px rgba(0, 245, 212, 0.5),
    0 0 60px rgba(123, 44, 191, 0.3);
  filter: drop-shadow(0 0 20px rgba(0, 245, 212, 0.6));
}

@keyframes yearDigitFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}

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

/* Title */
.newyear-title {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  text-align: center;
  margin: 18px 0;
  line-height: 1.2;
}

.title-word {
  display: inline-block;
  color: #ffffff;
  margin: 0 8px;
  animation: titleWordBounce 1s ease-out;
  animation-delay: calc(0.5s + var(--i) * 0.1s);
  animation-fill-mode: both;
  text-shadow: 
    0 0 20px rgba(0, 245, 212, 0.8),
    0 0 40px rgba(123, 44, 191, 0.5);
}

@keyframes titleWordBounce {
  0% {
    transform: translateY(-100px) scale(0);
    opacity: 0;
  }
  60% {
    transform: translateY(10px) scale(1.1);
    opacity: 1;
  }
  80% {
    transform: translateY(-5px) scale(0.95);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Countdown Timer */
.countdown-container {
  margin: 15px 0;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  background: rgba(0, 245, 212, 0.05);
  border: 2px solid rgba(0, 245, 212, 0.2);
  border-radius: 12px;
  margin: 0 auto;
  max-width: 450px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.countdown-value {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  background: linear-gradient(135deg, #00f5d4 0%, #7b2cbf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 245, 212, 0.5);
  filter: drop-shadow(0 0 10px rgba(0, 245, 212, 0.3));
}

.countdown-label {
  font-size: clamp(9px, 1.8vw, 11px);
  color: #b4b4c4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  font-weight: 600;
}

.countdown-separator {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #00f5d4;
  margin: 0 5px;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.countdown-complete {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  background: linear-gradient(90deg, #00f5d4, #7b2cbf, #f72585, #ffd60a);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  display: block;
  text-align: center;
  padding: 20px;
}

/* Message */
.newyear-message {
  text-align: center;
  margin: 18px 0 25px;
  font-size: clamp(14px, 2.2vw, 17px);
  color: #b4b4c4;
  line-height: 1.6;
}

.message-line {
  display: block;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: calc(1s + var(--i) * 0.2s);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-line.highlight {
  font-size: clamp(16px, 2.6vw, 20px);
  font-weight: 600;
  background: linear-gradient(90deg, #00f5d4, #7b2cbf, #f72585, #ffd60a);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: 
    fadeInUp 0.8s ease-out forwards,
    shimmer 3s linear infinite;
  animation-delay: calc(1s + var(--i) * 0.2s), 2s;
  margin: 10px 0;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

/* Action Buttons */
.newyear-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 2s forwards;
}

.newyear-btn {
  position: relative;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Syne', sans-serif;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  transform: translateY(0);
  white-space: nowrap;
  min-width: 165px;
  text-align: center;
  /* Prevent size changes */
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.newyear-btn .btn-text {
  position: relative;
  z-index: 3;
  display: inline-block;
  color: inherit;
  pointer-events: none;
}

.newyear-btn .btn-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: 1;
  pointer-events: none;
  max-width: 100%;
  max-height: 100%;
}

.newyear-btn:hover .btn-ripple {
  width: 200%;
  height: 200%;
}

.newyear-btn:hover {
  transform: translateY(-3px);
  /* Maintain size - no width/height changes */
}

.newyear-btn:active {
  transform: translateY(-1px);
}

/* Celebrate Button */
.btn-celebrate {
  background: linear-gradient(135deg, #00f5d4 0%, #7b2cbf 100%);
  color: #0a0a0f;
  box-shadow: 
    0 0 30px rgba(0, 245, 212, 0.5),
    0 10px 30px rgba(0, 0, 0, 0.2);
  /* Maintain size */
  width: auto;
  min-width: 165px;
  max-width: 200px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-celebrate .btn-ripple {
  background: rgba(255, 255, 255, 0.4);
}

.btn-celebrate:hover {
  box-shadow: 
    0 0 40px rgba(0, 245, 212, 0.8),
    0 15px 40px rgba(0, 0, 0, 0.3);
  /* No size changes on hover */
  transform: translateY(-3px);
  height: 48px;
  max-width: 200px;
}

.btn-celebrate.celebrating {
  animation: celebrate 0.5s ease-in-out;
}

@keyframes celebrate {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  50% { transform: scale(1.15) rotate(5deg); }
  75% { transform: scale(1.1) rotate(-3deg); }
}

/* Close Button - Maximum Specificity with Unique Class Name */
button.newyear-btn.btn-newyear-close,
.newyear-modal button.newyear-btn.btn-newyear-close,
#closeModalBtn.newyear-btn.btn-newyear-close {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 2px solid rgba(0, 245, 212, 0.4) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  white-space: nowrap !important;
  min-width: 165px !important;
  max-width: 200px !important;
  font-family: 'Syne', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 14px 32px !important;
  /* Maintain fixed size */
  box-sizing: border-box !important;
  width: auto !important;
  height: 48px !important;
  overflow: hidden !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

button.newyear-btn.btn-newyear-close .btn-text,
.newyear-modal button.newyear-btn.btn-newyear-close .btn-text,
#closeModalBtn.newyear-btn.btn-newyear-close .btn-text,
button.newyear-btn.btn-newyear-close span,
.newyear-modal button.newyear-btn.btn-newyear-close span {
  color: #ffffff !important;
  display: inline-block !important;
  position: relative !important;
  z-index: 3 !important;
  font-family: 'Syne', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  pointer-events: none !important;
}

button.newyear-btn.btn-newyear-close .btn-ripple,
.newyear-modal button.newyear-btn.btn-newyear-close .btn-ripple,
#closeModalBtn.newyear-btn.btn-newyear-close .btn-ripple {
  z-index: 1 !important;
  pointer-events: none !important;
  opacity: 0.5 !important;
}

button.newyear-btn.btn-newyear-close:hover,
.newyear-modal button.newyear-btn.btn-newyear-close:hover,
#closeModalBtn.newyear-btn.btn-newyear-close:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(0, 245, 212, 0.6) !important;
  box-shadow: 
    0 0 30px rgba(0, 245, 212, 0.4),
    0 15px 40px rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
  /* No size changes */
  transform: translateY(-3px) !important;
  width: auto !important;
  max-width: 200px !important;
  height: 48px !important;
}

button.newyear-btn.btn-newyear-close:active,
.newyear-modal button.newyear-btn.btn-newyear-close:active,
#closeModalBtn.newyear-btn.btn-newyear-close:active {
  transform: translateY(-1px) !important;
}

/* Decorative Elements */
.newyear-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.decoration-circle {
  position: absolute;
  border: 2px solid;
  border-radius: 50%;
  opacity: 0.3;
  animation: decorCircleFloat 4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.5s);
}

.decoration-circle:nth-child(1) {
  width: 100px;
  height: 100px;
  border-color: #00f5d4;
  top: 10%;
  left: 10%;
}

.decoration-circle:nth-child(2) {
  width: 60px;
  height: 60px;
  border-color: #7b2cbf;
  top: 70%;
  right: 15%;
}

.decoration-circle:nth-child(3) {
  width: 80px;
  height: 80px;
  border-color: #f72585;
  bottom: 15%;
  left: 20%;
}

@keyframes decorCircleFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(10px, -10px) rotate(120deg);
  }
  66% {
    transform: translate(-10px, 10px) rotate(240deg);
  }
}

.decoration-star {
  position: absolute;
  font-size: 30px;
  animation: decorStarTwinkle 2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.3s);
}

.decoration-star:nth-child(4) { top: 5%; left: 5%; }
.decoration-star:nth-child(5) { top: 10%; right: 8%; }
.decoration-star:nth-child(6) { bottom: 20%; left: 15%; }
.decoration-star:nth-child(7) { bottom: 10%; right: 10%; }

@keyframes decorStarTwinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.3) rotate(180deg);
  }
}

/* Fireworks Container */
.fireworks-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.firework {
  position: absolute;
  width: 5px;
  height: 5px;
}

.firework-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  animation: fireworkExplode 1.5s ease-out forwards;
}

@keyframes fireworkExplode {
  0% {
    transform: rotate(var(--i)) translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: rotate(var(--i)) translateY(-150px) scale(0);
    opacity: 0;
  }
}

/* Confetti Container */
.confetti-container {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10%;
  animation: confettiFall linear forwards;
}

.confetti-piece.circle {
  border-radius: 50%;
}

.confetti-piece.square {
  border-radius: 2px;
}

.confetti-piece.triangle {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid;
  border-bottom-color: inherit;
  background: transparent !important;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotateZ(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotateZ(720deg);
    opacity: 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .newyear-modal {
    padding: 10px;
  }

  .newyear-content {
    width: 95%;
  }

  .newyear-main {
    padding: 25px 18px 28px;
    border-radius: 20px;
  }

  .newyear-year {
    font-size: clamp(45px, 15vw, 75px);
    margin-bottom: 12px;
  }

  .newyear-title {
    font-size: clamp(22px, 7vw, 32px);
    margin: 15px 0;
  }

  .title-word {
    margin: 0 4px;
  }

  .countdown-container {
    margin: 12px 0;
  }

  .countdown-timer {
    gap: 5px;
    padding: 10px 8px;
  }

  .countdown-item {
    min-width: 45px;
  }

  .countdown-value {
    font-size: clamp(20px, 5.5vw, 28px);
  }

  .countdown-label {
    font-size: clamp(8px, 1.8vw, 10px);
    margin-top: 3px;
  }

  .countdown-separator {
    font-size: clamp(18px, 4.5vw, 24px);
    margin: 0 2px;
  }

  .newyear-message {
    font-size: clamp(13px, 3.5vw, 16px);
    margin: 12px 0 20px;
  }

  .message-line.highlight {
    font-size: clamp(14px, 4vw, 18px);
    margin: 8px 0;
  }

  .newyear-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
    align-items: center;
    justify-content: center;
  }

  .newyear-btn,
  button.newyear-btn.btn-newyear-close,
  #closeModalBtn.newyear-btn.btn-newyear-close {
    padding: 13px 28px !important;
    font-size: 15px !important;
    width: 100%;
    min-width: auto !important;
    max-width: 280px ;
  }

  button.newyear-btn.btn-newyear-close .btn-text,
  button.newyear-btn.btn-newyear-close span {
    font-size: 15px !important;
  }

  .decoration-circle {
    display: none;
  }

  .decoration-star {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .newyear-modal {
    padding: 8px;
  }

  .newyear-main {
    padding: 20px 12px 22px;
  }

  .newyear-year {
    font-size: clamp(40px, 18vw, 65px);
    margin-bottom: 10px;
  }

  .newyear-title {
    margin: 12px 0;
  }

  .countdown-container {
    margin: 10px 0;
  }

  .countdown-timer {
    padding: 8px 6px;
    gap: 4px;
  }

  .countdown-item {
    min-width: 40px;
  }

  .countdown-value {
    font-size: clamp(18px, 5vw, 24px);
  }

  .newyear-message {
    margin: 10px 0 18px;
  }

  .newyear-actions {
    margin-top: 20px;
    gap: 8px;
    align-items: center;
    justify-content: center;
  }
}

/* Prevent body scroll when modal is open */
body:has(.newyear-modal.show) {
  overflow: hidden !important;
  height: 100vh;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .newyear-main {
    border-width: 3px;
  }

  .year-digit,
  .title-word,
  .message-line.highlight {
    -webkit-text-fill-color: #ffffff;
    text-shadow: none;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .newyear-modal,
  .newyear-content,
  .year-digit,
  .title-word,
  .message-line,
  .newyear-actions,
  .decoration-circle,
  .decoration-star,
  .firework-particle,
  .confetti-piece {
    animation: none !important;
    transition: none !important;
  }

  .newyear-content {
    transform: none !important;
    opacity: 1 !important;
  }
}

