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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F5F3EF;
  color: #000000;
  overflow-x: hidden;
}

.app-container {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(0, 0, 0, 0.02) 10px,
      rgba(0, 0, 0, 0.02) 20px
    ),
    linear-gradient(135deg, #F5F3EF 0%, #E8DED3 50%, #F5F3EF 100%);
  background-size: 100% 100%, 400% 400%;
  animation: diagonalMove 20s linear infinite, gradientShift 15s ease infinite;
  z-index: 0;
}

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

@keyframes diagonalMove {
  0% { background-position: 0% 0%, 0% 50%; }
  100% { background-position: 40px 40px, 0% 50%; }
}

.content-wrapper {
  position: relative;
  z-index: 10;
}

/* Header */
.header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.near-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #000000;
}

.header-title {
  font-size: 1.875rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.025em;
}

.sound-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sound-toggle:hover {
  background: white;
  transform: scale(1.05);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.headline-section {
  text-align: center;
  margin-bottom: 3rem;
}

.headline {
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #4A4A4A;
}

.event-date {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000000;
}

.event-tagline {
  font-size: 1.125rem;
}

.countdown-start {
  font-size: 0.875rem;
  color: #666666;
  margin-top: 0.5rem;
}

/* Countdown Container */
.countdown-container {
  background: white;
  border-radius: 2rem;
  padding: 3rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  border: 3px solid #000000;
}

.countdown-display {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  margin-bottom: 2.5rem;
}

.countdown-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 3rem);
  flex: 1;
  min-width: 0;
}

.segment-border {
  border-right: 3px solid rgba(0, 0, 0, 0.1);
}

.segment-number-container {
  position: relative;
  height: clamp(5rem, 15vw, 10rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.countdown-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  line-height: 1;
  color: #000000;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.countdown-number.flipping {
  animation: flip 0.6s ease-in-out;
}

@keyframes flip {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

.segment-label {
  font-size: clamp(0.75rem, 2vw, 1.125rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
}

/* Progress Section */
.progress-section {
  margin-top: 2rem;
}

.progress-bar-container {
  height: 1rem;
  background: #E5E5E5;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid #000000;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #00C1DE 0%, #0099CC 100%);
  transition: width 1s ease-out;
  border-radius: 0.25rem;
}

.progress-text {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #666666;
  font-weight: 600;
}

/* Actions */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn-primary,
.btn-secondary {
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.btn-primary {
  background: #000000;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: white;
  color: #000000;
  border: 2px solid #000000;
}

.btn-secondary:hover {
  background: #000000;
  color: white;
  transform: translateY(-2px);
}

/* Stats Panel */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 2rem;
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #000000;
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  font-size: 0.875rem;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Celebration */
.celebration {
  text-align: center;
  padding: 4rem 2rem;
}

.celebration-emoji {
  font-size: 8rem;
  margin-bottom: 2rem;
  animation: bounce 2s infinite;
}

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

.celebration-text {
  font-size: 2rem;
  font-weight: 800;
  color: #000000;
}

/* Milestone Modal */
.milestone-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.milestone-card {
  background: white;
  border-radius: 2rem;
  padding: 3rem;
  max-width: 28rem;
  margin: 1rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  border: 3px solid #000000;
}

.milestone-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.milestone-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.milestone-message {
  font-size: 1.125rem;
  color: #666666;
}

.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-container::before,
.confetti-container::after {
  content: '🎉';
  position: absolute;
  font-size: 2rem;
  animation: confettiFall 3s linear infinite;
}

.confetti-container::before {
  left: 20%;
  animation-delay: 0s;
}

.confetti-container::after {
  right: 20%;
  animation-delay: 1s;
}

@keyframes confettiFall {
  0% {
    top: -10%;
    opacity: 1;
    transform: rotate(0deg);
  }
  100% {
    top: 110%;
    opacity: 0;
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Footer */
.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
  text-align: center;
}

.footer-text {
  font-size: 0.875rem;
  color: #666666;
  margin-bottom: 0.5rem;
}

.footer-link {
  color: #00C1DE;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s;
}

.footer-link:hover {
  color: #0099CC;
}

.footer-link-subtle {
  color: #888888;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-link-subtle:hover {
  color: #000000;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }
  
  .header-title {
    font-size: 1.5rem;
  }
  
  .countdown-container {
    padding: 2rem 1rem;
  }
  
  .countdown-display {
    flex-wrap: wrap;
  }
  
  .countdown-segment {
    min-width: calc(50% - 0.5rem);
    border-right: none !important;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0.5rem;
  }
  
  .countdown-segment:nth-child(2) {
    border-right: none;
  }
  
  .countdown-segment:nth-child(3),
  .countdown-segment:nth-child(4) {
    border-bottom: none;
  }
  
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
  
  .stats-panel {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  
  .milestone-card {
    padding: 2rem;
  }
  
  .milestone-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .headline {
    font-size: 1.75rem;
  }
  
  .event-date {
    font-size: 1rem;
  }
  
  .event-tagline {
    font-size: 0.875rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .countdown-number.flipping {
    animation: none;
  }
  
  .animated-bg {
    animation: none;
  }
  
  .celebration-emoji {
    animation: none;
  }
}