/**
 * Sip n Score - Professional Animation Styles
 * Gaming Café Website Animation CSS
 */

/* ==============================================
   ENHANCED LOADING SCREEN ANIMATIONS
   ============================================== */

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2d2d2d 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.6s ease;
  overflow: hidden;
}

.loading-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 165, 0, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 50% 10%, rgba(138, 43, 226, 0.1) 0%, transparent 50%);
  animation: backgroundShift 4s ease-in-out infinite;
}

.loading-screen.fade-out {
  opacity: 0;
}

.loading-content {
  text-align: center;
  color: white;
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 500px;
}

.loading-logo {
  margin-bottom: 2rem;
  position: relative;
}

.loading-icon-container {
  position: relative;
  display: inline-block;
}

.loading-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: glowPulse 2s ease-in-out infinite;
}

.loading-icon {
  font-size: 3.5rem;
  margin: 0 1rem;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 0 10px rgba(255, 165, 0, 0.5));
}

.loading-icon:nth-child(1) {
  animation: loadingFloat 2s ease-in-out infinite;
  color: #ffa500;
}

.loading-icon:nth-child(2) {
  animation: loadingFloat 2s ease-in-out infinite reverse;
  animation-delay: 0.5s;
  color: #1e90ff;
}

.loading-text {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-family: 'Pacifico', 'Poppins', sans-serif;
  background: linear-gradient(135deg, #ffa500 0%, #ff6b35 50%, #1e90ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(255, 165, 0, 0.3));
  animation: textGlow 3s ease-in-out infinite;
}

.loading-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 3rem;
  color: #c4c4c4;
  font-weight: 300;
  letter-spacing: 1px;
}

.loading-bar {
  width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto 1.5rem auto;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffa500 0%, #ff6b35 50%, #1e90ff 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
  position: relative;
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.6);
}

.loading-spark {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 10px;
  background: radial-gradient(circle, #ffffff 0%, #ffa500 70%, transparent 100%);
  border-radius: 50%;
  opacity: 0;
  animation: sparkle 1s ease-in-out infinite;
}

.loading-status {
  font-size: 1rem;
  color: #8a8a8a;
  font-weight: 400;
  margin-top: 1rem;
  min-height: 20px;
  transition: all 0.3s ease;
}

.loading-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.loading-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #ffa500, #1e90ff);
  border-radius: 50%;
  animation: particleFloat linear infinite;
  opacity: 0.7;
}

/* Loading Animations */
@keyframes backgroundShift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(1deg); }
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

@keyframes loadingFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(5deg); }
  75% { transform: translateY(10px) rotate(-5deg); }
}

@keyframes textGlow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 165, 0, 0.3)); }
  50% { filter: drop-shadow(0 0 30px rgba(30, 144, 255, 0.5)); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.2); }
}

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

/* Mobile Loading Screen Optimizations */
@media (max-width: 768px) {
  .loading-content {
    padding: 1rem;
    max-width: 90vw;
  }
  
  .loading-text {
    font-size: 2.2rem;
  }
  
  .loading-subtitle {
    font-size: 1.1rem;
  }
  
  .loading-bar {
    width: 250px;
  }
  
  .loading-icon {
    font-size: 2.8rem;
    margin: 0 0.5rem;
  }
  
  .loading-particles {
    display: none; /* Hide particles on mobile for better performance */
  }
}

/* ==============================================
   NAVBAR SCROLL ANIMATIONS
   ============================================== */

.navbar {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.navbar-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-scrolled .navbar-brand {
  color: #8B4513 !important;
}

.navbar-scrolled .navbar-nav > li > a {
  color: #8B4513 !important;
}

.navbar-scrolled .navbar-nav > li > a:hover {
  color: #ff9900 !important;
}

.navbar-hidden {
  transform: translateY(-100%);
}

/* ==============================================
   SCROLL-TRIGGERED ANIMATIONS BASE
   ============================================== */

.animate-element {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: var(--animation-delay, 0ms);
}

.animate-element.animated {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================================
   SPECIFIC ANIMATION CLASSES
   ============================================== */

/* Fade In Up */
.fadeInUp {
  transform: translateY(50px);
}

.fadeInUp.animated {
  transform: translateY(0);
}

/* Fade In Scale */
.fadeInScale {
  transform: scale(0.8) translateY(30px);
}

.fadeInScale.animated {
  transform: scale(1) translateY(0);
}

/* Slide In Up */
.slideInUp {
  transform: translateY(80px);
}

.slideInUp.animated {
  transform: translateY(0);
}

/* Slide In Left */
.slideInLeft {
  transform: translateX(-50px);
}

.slideInLeft.animated {
  transform: translateX(0);
}

/* Slide In Right */
.slideInRight {
  transform: translateX(50px);
}

.slideInRight.animated {
  transform: translateX(0);
}

/* Bounce In */
.bounceIn {
  transform: scale(0.3);
  animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounceIn.animated {
  transform: scale(1);
  animation: bounceInEffect 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* Zoom In */
.zoomIn {
  transform: scale(0.8);
}

.zoomIn.animated {
  transform: scale(1);
}

/* Flip In Y */
.flipInY {
  transform: perspective(400px) rotateY(90deg);
}

.flipInY.animated {
  transform: perspective(400px) rotateY(0deg);
  animation: flipInYEffect 0.6s ease-out;
}

@keyframes flipInYEffect {
  0% {
    transform: perspective(400px) rotateY(90deg);
  }
  40% {
    transform: perspective(400px) rotateY(-10deg);
  }
  70% {
    transform: perspective(400px) rotateY(10deg);
  }
  100% {
    transform: perspective(400px) rotateY(0deg);
  }
}

/* ==============================================
   ENHANCED CARD ANIMATIONS
   ============================================== */

.card, .wifi, .trmt-card, .feature, .brand-value-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

/* Gaming-themed glow effects */
.card:hover,
.wifi:hover,
.best-3d-card:hover .card {
  box-shadow: 
    0 15px 35px rgba(139, 69, 19, 0.15),
    0 5px 15px rgba(255, 224, 102, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.trmt-card:hover {
  box-shadow: 
    0 20px 40px rgba(255, 82, 82, 0.25),
    0 8px 20px rgba(139, 69, 19, 0.15);
}

/* ==============================================
   BUTTON HOVER EFFECTS
   ============================================== */

.btn, .menu-button, .call-button, .book-now {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before, .menu-button::before, .call-button::before, .book-now::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.btn:hover::before, .menu-button:hover::before, 
.call-button:hover::before, .book-now:hover::before {
  width: 200%;
  height: 200%;
}

/* ==============================================
   COUNTER ANIMATIONS
   ============================================== */

.counter {
  font-weight: bold;
  color: #8B4513;
}

/* ==============================================
   PARALLAX ELEMENTS
   ============================================== */

.parallax-element {
  will-change: transform;
}

/* ==============================================
   TYPING ANIMATION
   ============================================== */

.typing-cursor::after {
  content: '|';
  animation: blink 1s infinite;
  color: #FFE066;
  font-weight: bold;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ==============================================
   PAGE LOADED ANIMATIONS
   ============================================== */

body.page-loaded .cover {
  animation: heroReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heroReveal {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==============================================
   GAMING-THEMED SPECIAL EFFECTS
   ============================================== */

/* Neon glow effect for gaming elements */
.game-icon.animated,
.badge-icon {
  animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
  from {
    text-shadow: 
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 15px #fff,
      0 0 20px #FFE066,
      0 0 35px #FFE066,
      0 0 40px #FFE066;
  }
  to {
    text-shadow: 
      0 0 2px #fff,
      0 0 5px #fff,
      0 0 8px #fff,
      0 0 12px #FFE066,
      0 0 18px #FFE066,
      0 0 25px #FFE066;
  }
}

/* Floating animation for icons */
.floating {
  animation: floating 3s ease-in-out infinite;
}

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

/* Pulse animation for call-to-action buttons */
.pulse-glow {
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 69, 19, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(139, 69, 19, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 69, 19, 0);
  }
}

/* ==============================================
   MOBILE OPTIMIZATIONS
   ============================================== */

@media (max-width: 768px) {
  .animate-element {
    transform: translateY(20px);
  }
  
  .loading-text {
    font-size: 2rem;
  }
  
  .loading-bar {
    width: 150px;
  }
  
  /* Reduce animation intensity on mobile for better performance */
  .card:hover,
  .wifi:hover,
  .trmt-card:hover {
    transform: translateY(-2px) scale(1.02);
  }
}

/* ==============================================
   REDUCED MOTION PREFERENCES
   ============================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .parallax-element {
    transform: none !important;
  }
}

/* ==============================================
   HIGH PERFORMANCE ANIMATIONS
   ============================================== */

.animate-element,
.card,
.wifi,
.trmt-card,
.btn,
.menu-button,
.call-button,
.book-now {
  will-change: transform, opacity;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Remove will-change after animation completes for better performance */
.animate-element.animated {
  will-change: auto;
}

/* ==============================================
   SPECIAL GAMING CAFÉ ANIMATIONS
   ============================================== */

/* Steam effect for coffee cups */
.steam-effect::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 4px;
  height: 20px;
  background: linear-gradient(to top, transparent, rgba(255, 255, 255, 0.6));
  border-radius: 2px;
  animation: steam 2s ease-in-out infinite;
  transform: translateX(-50%);
}

@keyframes steam {
  0%, 100% { opacity: 0; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-10px); }
}

/* Gaming controller vibration effect */
.controller-vibrate {
  animation: vibrate 0.3s linear infinite;
}

@keyframes vibrate {
  0% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(-1px, -1px); }
  60% { transform: translate(1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}

/* Menu items hover effect */
.menu-list li {
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.menu-list li:hover {
  background: rgba(255, 224, 102, 0.1);
  transform: translateX(5px);
  color: #8B4513 !important;
}
