@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Noto+Sans+SC:wght@300;400;700&display=swap");

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

body {
  font-family: "Noto Sans SC", sans-serif;
  background-color: #050510;
  overflow: hidden;
  color: white;
  height: 100vh;
  width: 100vw;
}

/* Canvas Background */
#fireworksCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Ensure canvas can receive click events */
  pointer-events: auto;
  cursor: crosshair;
}

/* Main Container */
.main-container {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Allow clicks to pass through to canvas where there's no content */
  pointer-events: none;
}

/* Re-enable pointer events on interactive elements */
.glass-panel,
.send-button,
#wishInput,
.title-section {
  pointer-events: auto;
}

/* Title Section */
.title-section {
  text-align: center;
  margin-bottom: 2rem;
  transform: scale(1);
  transition: transform 0.5s ease;
}

.title-section:hover {
  transform: scale(1.05);
}

.subtitle {
  font-family: "Orbitron", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.main-title {
  font-family: "Orbitron", sans-serif;
  font-size: 6rem;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.7), 0 0 20px rgba(168, 85, 247, 0.5), 0 0 30px rgba(168, 85, 247, 0.3);
  animation: pulse 2s infinite alternate;
  cursor: default;
  user-select: none;
}

.tagline {
  font-size: 1.25rem;
  color: #bfdbfe;
  margin-top: 1rem;
  letter-spacing: 0.2em;
}

@keyframes pulse {
  from {
    opacity: 0.9;
  }
  to {
    opacity: 1;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.9), 0 0 30px rgba(168, 85, 247, 0.7);
  }
}

/* Glass Panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
}

/* Countdown Panel */
.countdown-panel {
  padding: 2.5rem;
  max-width: 900px;
  width: 100%;
  margin-bottom: 2.5rem;
  transition: border-color 0.3s ease;
}

.countdown-panel:hover {
  border-color: rgba(168, 85, 247, 0.3);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.countdown-item {
  display: flex;
  flex-direction: column;
}

.countdown-number {
  font-family: "Orbitron", sans-serif;
  font-size: 4rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.7), 0 0 20px rgba(56, 189, 248, 0.5);
}

.countdown-label {
  font-size: 0.875rem;
  color: #9ca3af;
  text-transform: uppercase;
  margin-top: 0.5rem;
  letter-spacing: 0.1em;
}

/* Celebration Message */
.hidden {
  display: none !important;
}

.celebration-title {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(to right, #c084fc, #6366f1, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  text-align: center;
}

.celebration-text {
  font-size: 1.5rem;
  color: white;
  text-align: center;
}

/* Wish Section */
.wish-section {
  width: 100%;
  max-width: 500px;
  position: relative;
}

.wish-input-panel {
  padding: 0.5rem;
  display: flex;
  align-items: center;
  border-radius: 50px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#wishInput {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  padding: 0.75rem 1.25rem;
  flex-grow: 1;
  font-size: 1rem;
}

#wishInput::placeholder {
  color: #6b7280;
}

.send-button {
  background: linear-gradient(to right, #9333ea, #3b82f6);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.send-button:hover {
  transform: rotate(90deg);
  background: linear-gradient(to right, #a855f7, #60a5fa);
}

.tooltip {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 1rem;
  width: 100%;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.separator {
  opacity: 0.5;
}

#wishCount strong {
  color: #a855f7;
}

/* Danmaku Container */
#danmakuContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  user-select: none;
  font-size: 1.25rem;
  font-weight: 500;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
  will-change: transform;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(20, 20, 40, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  font-size: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.toast-error::before {
  content: "❌";
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.toast-success::before {
  content: "✨";
}

/* Responsive */
@media (max-width: 768px) {
  .main-title {
    font-size: 4rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .countdown-number {
    font-size: 3rem;
  }

  .countdown-panel {
    padding: 1.5rem;
  }

  .celebration-title {
    font-size: 2rem;
  }

  #wishInput {
    font-size: 0.875rem;
  }

  .danmaku-item {
    font-size: 1rem;
  }

  .footer {
    font-size: 0.75rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  .separator {
    display: none;
  }
}
