/**
 * San Valentino 2026 - Modern UX Enhancements
 * Grafica spettacolare con animazioni fluide
 */

:root {
  --valentine-primary: #ff1744;
  --valentine-secondary: #f50057;
  --valentine-accent: #ff4081;
  --valentine-pink: #ffc0cb;
  --valentine-dark: #1a1a2e;
  --valentine-darker: #0f0f1e;
  --gradient-valentine: linear-gradient(135deg, #ff1744 0%, #f50057 50%, #ff4081 100%);
  --gradient-romantic: linear-gradient(to bottom, rgba(255,23,68,0.1), transparent);
  --shadow-glow: 0 0 40px rgba(255, 23, 68, 0.3);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Suspense Counter - Spettacolare */
.suspense-counter {
  background: var(--gradient-valentine);
  padding: 60px 30px;
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}

.suspense-counter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,100 Q300,0 600,100 T1200,100 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: cover;
  animation: wave 15s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.suspense-number {
  font-size: 120px;
  font-weight: 900;
  color: white;
  text-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
  font-family: 'Inter', sans-serif;
  letter-spacing: -4px;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(255,255,255,0.5),
                 0 0 40px rgba(255,255,255,0.3);
  }
  50% {
    text-shadow: 0 0 30px rgba(255,255,255,0.8),
                 0 0 60px rgba(255,255,255,0.5);
  }
}

.suspense-label {
  font-size: 24px;
  color: white;
  font-weight: 600;
  margin-top: 10px;
  position: relative;
  z-index: 1;
  opacity: 0.95;
}

.suspense-message {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

/* Countdown Timer */
.countdown-timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 30px auto;
}

.countdown-item {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.2);
}

.countdown-value {
  font-size: 48px;
  font-weight: 700;
  color: white;
  line-height: 1;
  display: block;
}

.countdown-unit {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  display: block;
}

/* Wrapped Style - Spotify inspired */
.wrapped-container {
  min-height: 100vh;
  background: var(--valentine-darker);
  color: white;
  padding: 40px 20px;
}

.wrapped-slide {
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 40px;
  background: linear-gradient(135deg, #1e1e30 0%, #2a2a40 100%);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(30px);
  animation: slideIn 0.8s ease-out forwards;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wrapped-title {
  font-size: 56px;
  font-weight: 900;
  background: var(--gradient-valentine);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  line-height: 1.1;
}

.wrapped-stat {
  font-size: 96px;
  font-weight: 900;
  color: var(--valentine-primary);
  line-height: 1;
  margin: 20px 0;
  text-shadow: 0 0 40px rgba(255,23,68,0.4);
}

.wrapped-description {
  font-size: 24px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  margin-top: 20px;
}

.wrapped-progress {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin-top: 40px;
  overflow: hidden;
}

.wrapped-progress-bar {
  height: 100%;
  background: var(--gradient-valentine);
  border-radius: 4px;
  transition: width 1s ease-out;
}

/* Message Cards - Enhanced */
.message-card-enhanced {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,23,68,0.1);
}

.message-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-valentine);
  opacity: 0;
  transition: opacity 0.3s;
}

.message-card-enhanced:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255,23,68,0.15);
  border-color: var(--valentine-primary);
}

.message-card-enhanced:hover::before {
  opacity: 1;
}

.message-text {
  font-size: 18px;
  line-height: 1.7;
  color: #2c3e50;
  margin: 20px 0;
  font-weight: 400;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #95a5a6;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* Reactions */
.reaction-button {
  background: transparent;
  border: 2px solid #ecf0f1;
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  margin-right: 10px;
}

.reaction-button:hover {
  transform: scale(1.1);
  border-color: var(--valentine-primary);
  background: rgba(255,23,68,0.05);
}

.reaction-button:active {
  transform: scale(1.3);
}

.reaction-count {
  font-size: 12px;
  margin-left: 5px;
  color: #95a5a6;
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Glass morphism effects */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animated gradient backgrounds */
.gradient-animated {
  background: linear-gradient(-45deg, #ff1744, #f50057, #ff4081, #ffc0cb);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating hearts animation */
@keyframes float-hearts {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

.floating-heart {
  position: fixed;
  font-size: 30px;
  animation: float-hearts 10s linear infinite;
  pointer-events: none;
  z-index: 9999;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .suspense-number {
    font-size: 80px;
  }

  .wrapped-title {
    font-size: 40px;
  }

  .wrapped-stat {
    font-size: 64px;
  }

  .countdown-timer {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown-value {
    font-size: 36px;
  }
}

/* Micro-interactions */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.press-effect:active {
  transform: scale(0.95);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-valentine);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--valentine-primary);
}
