/* CSS Variables for Wynn Casino Theme */
:root {
  --wynn-gold: #D4AF37;
  --wynn-gold-light: #F4E4C1;
  --wynn-gold-dark: #B8941F;
  --wynn-crimson: #330000;
  --wynn-crimson-deep: #1A0000;
  --wynn-burgundy: #4A0000;
  --wynn-black: #050505;
  --font-display: 'Playfair Display', serif;
  --font-elegant: 'Cormorant Garamond', serif;
  --font-body: 'Lato', sans-serif;
}

html {
  -ms-touch-action: none;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  /* display: none; <- Crashes Chrome on hover */
  -webkit-appearance: none;
  margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;

  cursor: default;
  color: var(--wynn-gold-light);
  background-color: var(--wynn-black);

  text-align: center;
  font-family: var(--font-body);

  display: flex;
  flex-direction: column;
  
  /* fix bug: https://github.com/cocos-creator/2d-tasks/issues/791 */
  /* overflow cannot be applied in Cocos2dGameContainer, 
  otherwise child elements will be hidden when Cocos2dGameContainer rotated 90 deg */
  overflow: hidden;
}

#Cocos2dGameContainer {
  position: absolute;
  margin: 0;
  left: 0px;
  top: 0px;

  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

a:link, a:visited {
  color: #666;
}

a:active, a:hover {
  color: #666;
}

p.header {
  font-size: small;
}

p.footer {
  font-size: x-small;
}

#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--wynn-black) url(./wynn-loading-bg.jpg) no-repeat center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Dark overlay with gradient */
.splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(5, 5, 5, 0) 0%, 
    rgba(5, 5, 5, 0.4) 40%, 
    rgba(5, 5, 5, 0.8) 100%);
  z-index: 1;
}

/* Hostess character */
.splash-hostess {
  position: absolute;
  bottom: 0;
  left: 1rem;
  height: 45vh;
  max-height: 500px;
  object-fit: contain;
  z-index: 10;
  pointer-events: none;
  animation: slideInLeft 0.8s ease-out 0.3s both;
}

/* Logo and title container */
.splash-content {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInDown 0.8s ease-out both;
}

.splash-logo {
  height: 7rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 10px 30px rgba(212, 175, 55, 0.5));
  animation: float 3s ease-in-out infinite;
}

@media (min-width: 768px) {
  .splash-logo {
    height: 9rem;
  }
}

.splash-subtitle {
  color: var(--wynn-gold-light);
  font-family: var(--font-elegant);
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0;
  animation: fadeIn 0.8s ease-out 0.5s both;
}

@media (min-width: 768px) {
  .splash-subtitle {
    font-size: 1.5rem;
  }
}

/* Sparkle particles */
.sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.8);
  animation: sparkleAnimation 2s ease-in-out infinite;
}

@media (min-width: 768px) {
  .sparkle {
    width: 4px;
    height: 4px;
  }
}

/* Progress section */
.progress-section {
  position: relative;
  z-index: 20;
  margin-top: 4rem;
  width: 18rem;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

@media (min-width: 768px) {
  .progress-section {
    width: 24rem;
  }
}

.progress-bar-container {
  position: relative;
  height: 1.5rem;
  border-radius: 9999px;
  border: 1px solid var(--wynn-gold);
  background-color: rgba(74, 0, 0, 0.8);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.progress-bar {
  position: relative;
  height: 100%;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease-out;
  background: linear-gradient(135deg, 
    #F4E4C1 0%, 
    #D4AF37 50%, 
    #B8941F 100%);
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on progress bar */
.progress-bar span::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent);
  animation: shimmer 2s infinite;
}

.stripes span {
  background-size: 30px 30px;
  background-image: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.15) 25%, 
    transparent 25%,
    transparent 50%, 
    rgba(255, 255, 255, 0.15) 50%, 
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%, 
    transparent);            
  animation: animate-stripes 1s linear infinite;             
}

.progress-text {
  text-align: center;
  margin-top: 0.75rem;
  color: var(--wynn-gold);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.loading-text {
  text-align: center;
  margin-top: 0.25rem;
  color: var(--wynn-gold-light);
  font-family: var(--font-elegant);
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-200px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes sparkleAnimation {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

@keyframes animate-stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 0;
  }
}
