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

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  padding: 20px;
}

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

/* Floating Background Particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: float 20s infinite;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.particle.circle {
  border-radius: 50%;
}

.particle.square {
  border-radius: 0;
}

.particle.triangle {
  width: 0;
  height: 0;
  background: transparent;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.particle.star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  border-radius: 0;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(50px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes floatHorizontal {
  0%, 100% {
    transform: translateX(-100px) translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(100vw) translateY(-50px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes floatDiagonal {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translate(50vw, -50vh) rotate(180deg) scale(1.5);
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(100vw, -100vh) rotate(360deg) scale(0.5);
    opacity: 0;
  }
}

/* Confetti Effect */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #f0f;
  top: -10px;
  opacity: 1;
  animation: confettiFall 3s ease-out forwards;
}

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

/* Explosion Particles from Quote Box */
.explosion-particle {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  border-radius: 50%;
  animation: explode 1.5s ease-out forwards;
}

@keyframes explode {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

.container {
  width: 100%;
  max-width: 700px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.title {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
  animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.datetime-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 35px;
  animation: fadeInUp 1s ease-out;
}

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

.date {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
  font-variant: small-caps;
}

.time {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 2px 2px 10px rgba(0, 0, 0, 0.4);
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 2px 2px 10px rgba(0, 0, 0, 0.4);
  }
  50% {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 2px 2px 10px rgba(0, 0, 0, 0.4), 0 0 40px rgba(102, 126, 234, 0.6);
  }
}

.quote-container {
  margin-bottom: 40px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Corner Decorations */
.corner-decoration {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  transition: all 0.6s ease;
}

.corner-decoration.top-left {
  top: -10px;
  left: -10px;
  border-right: none;
  border-bottom: none;
  border-radius: 10px 0 0 0;
}

.corner-decoration.top-right {
  top: -10px;
  right: -10px;
  border-left: none;
  border-bottom: none;
  border-radius: 0 10px 0 0;
}

.corner-decoration.bottom-left {
  bottom: -10px;
  left: -10px;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 10px;
}

.corner-decoration.bottom-right {
  bottom: -10px;
  right: -10px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 10px 0;
}

.quote-box.show ~ .corner-decoration {
  opacity: 1;
}

.quote-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: scale(0.8) rotateX(10deg);
  transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease, all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.quote-box.show {
  opacity: 1;
  transform: scale(1) rotateX(0deg);
  animation: revealQuote 0.8s ease-out;
}

.quote-box.theme-purple {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.25));
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4), 
              0 0 0 5px rgba(102, 126, 234, 0.2),
              0 0 0 10px rgba(118, 75, 162, 0.1);
}

.quote-box.theme-pink {
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.25));
  border-color: rgba(240, 147, 251, 0.5);
  box-shadow: 0 20px 60px rgba(240, 147, 251, 0.4), 
              0 0 0 5px rgba(240, 147, 251, 0.2),
              0 0 0 10px rgba(245, 87, 108, 0.1);
}

.quote-box.theme-blue {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.25));
  border-color: rgba(79, 172, 254, 0.5);
  box-shadow: 0 20px 60px rgba(79, 172, 254, 0.4), 
              0 0 0 5px rgba(79, 172, 254, 0.2),
              0 0 0 10px rgba(0, 242, 254, 0.1);
}

.quote-box.theme-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.25));
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.4), 
              0 0 0 5px rgba(16, 185, 129, 0.2),
              0 0 0 10px rgba(5, 150, 105, 0.1);
}

.quote-box.theme-orange {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(249, 115, 22, 0.25));
  border-color: rgba(251, 146, 60, 0.5);
  box-shadow: 0 20px 60px rgba(251, 146, 60, 0.4), 
              0 0 0 5px rgba(251, 146, 60, 0.2),
              0 0 0 10px rgba(249, 115, 22, 0.1);
}

/* Shine effect that sweeps across */
.shine-effect {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    transparent 40%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 60%,
    transparent
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  opacity: 0;
}

.quote-box.show .shine-effect {
  animation: shine 1s ease-in-out 0.2s;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
    opacity: 0;
  }
}

@keyframes revealQuote {
  0% {
    opacity: 0;
    transform: scale(0.8) rotateX(10deg) rotateY(-5deg);
  }
  40% {
    transform: scale(1.05) rotateX(-5deg) rotateY(5deg);
  }
  60% {
    transform: scale(0.98) rotateX(2deg) rotateY(-2deg);
  }
  80% {
    transform: scale(1.02) rotateX(-1deg) rotateY(1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateX(0deg) rotateY(0deg);
  }
}

.quote-text {
  font-size: 1.5rem;
  font-weight: 400;
  color: #2d3748;
  line-height: 1.8;
  margin-bottom: 20px;
  position: relative;
}

.quote-text::before {
  content: '"';
  font-size: 4rem;
  color: #667eea;
  opacity: 0.3;
  position: absolute;
  top: -20px;
  left: -10px;
  font-family: Georgia, serif;
}

.quote-author {
  font-size: 1.1rem;
  font-weight: 600;
  color: #667eea;
  font-style: italic;
}

.new-quote-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 18px 50px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.new-quote-btn::before {
  content: '';
  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, height 0.6s;
}

.new-quote-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.new-quote-btn:active {
  transform: translateY(-1px) scale(0.95);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.new-quote-btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-icon {
  font-size: 1.3rem;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-15deg) scale(1.2);
  }
  75% {
    transform: rotate(15deg) scale(1.2);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .title {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .datetime-display {
    margin-bottom: 25px;
  }

  .date {
    font-size: 1.1rem;
  }

  .time {
    font-size: 2rem;
  }

  .quote-box {
    padding: 30px 25px;
  }

  .quote-text {
    font-size: 1.2rem;
  }

  .quote-author {
    font-size: 1rem;
  }

  .new-quote-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 1.5rem;
  }

  .date {
    font-size: 0.9rem;
  }

  .time {
    font-size: 1.6rem;
  }

  .quote-text {
    font-size: 1rem;
  }

  .quote-box {
    padding: 25px 20px;
  }

  .new-quote-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }
}
