/* Custom styles for Xổ Số Siêu Tốc */

/* Smooth transitions for everything */
* {
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease-out;
}

/* Numpad button effects */
.numpad-btn {
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.numpad-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.numpad-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Enhanced Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

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

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Apply animations */
.animate-slide-up {
  animation: slideInUp 0.4s ease-out;
}

.animate-slide-right {
  animation: slideInRight 0.3s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.3s ease-out;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

/* Loading spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* PWA Install Banner */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  z-index: 9999;
}

.install-banner.show {
  transform: translateY(0);
  animation: slideInUp 0.4s ease-out;
}

.install-banner-content {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.install-banner-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.install-banner-text {
  flex: 1;
}

.install-banner-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 4px;
}

.install-banner-desc {
  font-size: 13px;
  opacity: 0.9;
}

.install-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.install-btn {
  background: white;
  color: #667eea;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.install-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.dismiss-btn {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.dismiss-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* Mobile-first responsive */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  
  .numpad-btn {
    font-size: 2rem !important;
  }
  
  .install-banner-content {
    flex-direction: column;
    text-align: center;
  }
  
  .install-banner-actions {
    width: 100%;
  }
  
  .install-btn, .dismiss-btn {
    flex: 1;
  }
}

/* Highlight effect for winning numbers - Enhanced */
.highlight-win {
  animation: highlight 0.5s ease-in-out;
}

@keyframes highlight {
  0% {
    background-color: transparent;
    transform: scale(1);
  }
  50% {
    background-color: #fef08a;
    transform: scale(1.1);
  }
  100% {
    background-color: #fde047;
    transform: scale(1);
  }
}

/* Confetti effect for winning */
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

/* Success celebration animation */
@keyframes celebrate {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(360deg);
    opacity: 1;
  }
}

.celebrate {
  animation: celebrate 0.6s ease-out;
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease-out;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Ripple effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

