/* Wild West Casino Custom Styles */

/* Color Variables */
:root {
  --deep-brown: #4b2e2b;
  --sand: #d2b48c;
  --terracotta: #a0522d;
  --ochre: #c19a6b;
  --maroon: #8b0000;
  --steel-gray: #696969;
  --dark-brown: #1c1c1c;
  --light-sand: #f5deb3;
  --parchment: #faebd7;
  --wood: linear-gradient(135deg, #4b2e2b 0%, #3d2520 100%);
}

/* Custom Tailwind Configuration */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Typography */
.font-western {
  font-family: "Rye", "Creepster", serif;
}

.font-serif {
  font-family: "Merriweather", serif;
}

/* Custom Colors */
.bg-deep-brown {
  background-color: var(--deep-brown);
}
.bg-sand {
  background-color: var(--sand);
}
.bg-terracotta {
  background-color: var(--terracotta);
}
.bg-ochre {
  background-color: var(--ochre);
}
.bg-maroon {
  background-color: var(--maroon);
}
.bg-steel-gray {
  background-color: var(--steel-gray);
}
.bg-dark-brown {
  background-color: var(--dark-brown);
}
.bg-light-sand {
  background-color: var(--light-sand);
}
.bg-parchment {
  background-color: var(--parchment);
}
.bg-wood {
  background: var(--wood);
}

.text-deep-brown {
  color: var(--deep-brown);
}
.text-sand {
  color: var(--sand);
}
.text-terracotta {
  color: var(--terracotta);
}
.text-ochre {
  color: var(--ochre);
}
.text-maroon {
  color: var(--maroon);
}
.text-steel-gray {
  color: var(--steel-gray);
}
.text-dark-brown {
  color: var(--dark-brown);
}

.border-maroon {
  border-color: var(--maroon);
}
.border-ochre {
  border-color: var(--ochre);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(139, 0, 0, 0.3), rgba(28, 28, 28, 0.6)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="desert" patternUnits="userSpaceOnUse" width="100" height="100"><rect width="100" height="100" fill="%23D2B48C"/><circle cx="20" cy="30" r="2" fill="%23A0522D" opacity="0.3"/><circle cx="80" cy="70" r="1.5" fill="%23A0522D" opacity="0.2"/></pattern></defs><rect width="1200" height="600" fill="url(%23desert)"/><polygon points="0,400 200,350 400,380 600,340 800,370 1000,330 1200,360 1200,600 0,600" fill="%234B2E2B" opacity="0.8"/></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Buttons */
.btn-primary {
  @apply bg-maroon hover:bg-red-800 text-sand font-bold py-3 px-6 rounded-lg transition-all duration-300 transform hover:scale-105 shadow-lg border-2 border-ochre;
  background: linear-gradient(135deg, var(--maroon) 0%, #660000 100%);
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.6);
  transform: translateY(-2px) scale(1.05);
}

.btn-secondary {
  @apply bg-transparent border-2 border-ochre text-ochre hover:bg-ochre hover:text-dark-brown font-bold py-3 px-6 rounded-lg transition-all duration-300;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Navigation */
.nav-link {
  position: relative;
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ochre);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Game Cards */
.game-card {
  @apply bg-parchment rounded-lg shadow-lg overflow-hidden transition-all duration-300 hover:shadow-2xl;
  border: 3px solid var(--deep-brown);
  background: linear-gradient(135deg, var(--parchment) 0%, #f0e68c 100%);
  position: relative;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="paper" patternUnits="userSpaceOnUse" width="20" height="20"><rect width="20" height="20" fill="none"/><circle cx="5" cy="5" r="0.5" fill="%23A0522D" opacity="0.1"/><circle cx="15" cy="15" r="0.3" fill="%23A0522D" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23paper)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.game-card-inner {
  position: relative;
  z-index: 1;
}

.game-card:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 0 10px 25px rgba(75, 46, 43, 0.3);
}

/* Bonus Cards */
.bonus-card {
  @apply bg-wood rounded-lg shadow-xl overflow-hidden border-4 border-ochre relative;
  background: linear-gradient(135deg, var(--deep-brown) 0%, #3d2520 100%);
  position: relative;
}

.bonus-card.featured {
  transform: scale(1.05);
  border-color: var(--maroon);
  box-shadow: 0 15px 35px rgba(139, 0, 0, 0.4);
}

.bonus-ribbon {
  position: absolute;
  top: 20px;
  right: -30px;
  background: var(--maroon);
  color: var(--sand);
  padding: 8px 40px;
  font-size: 12px;
  font-weight: bold;
  transform: rotate(45deg);
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Payment Methods */
.payment-method {
  @apply bg-white rounded-lg p-4 text-center font-bold text-dark-brown shadow-md hover:shadow-lg transition-all duration-300;
  border: 2px solid var(--ochre);
}

.payment-method:hover {
  transform: translateY(-2px);
  border-color: var(--maroon);
}

/* Security Badge */
.security-badge {
  @apply bg-white rounded-lg p-8 shadow-xl border-4 border-ochre;
  background: linear-gradient(135deg, white 0%, var(--light-sand) 100%);
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(1deg);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 6px 25px rgba(139, 0, 0, 0.8);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes float-delayed {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(-3deg);
  }
}

@keyframes dusty-entrance {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.8);
    filter: blur(5px);
  }
  50% {
    opacity: 0.7;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fade-in 1s ease-out;
}

.animate-slide-up {
  animation: slide-up 1s ease-out 0.3s both;
}

.animate-bounce-in {
  animation: bounce-in 1.2s ease-out 0.6s both;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 8s ease-in-out infinite 2s;
}

.animate-dusty-entrance {
  animation: dusty-entrance 1.5s ease-out;
}

/* Wanted Poster Effect */
.wanted-poster {
  background: var(--parchment);
  border: 8px solid var(--deep-brown);
  position: relative;
  box-shadow: inset 0 0 20px rgba(75, 46, 43, 0.3);
}

.wanted-poster::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: repeating-linear-gradient(
    45deg,
    var(--deep-brown),
    var(--deep-brown) 2px,
    transparent 2px,
    transparent 8px
  );
  z-index: -1;
}

/* Decorative Elements */
.western-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
}

.western-divider::before,
.western-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--maroon), transparent);
}

.western-divider i {
  margin: 0 1rem;
  color: var(--ochre);
  font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    background-attachment: scroll;
  }

  .bonus-card.featured {
    transform: none;
  }

  .font-western {
    font-size: 0.9em;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--sand);
}

::-webkit-scrollbar-thumb {
  background: var(--maroon);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #660000;
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Focus States for Accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.nav-link:focus {
  outline: 3px solid var(--ochre);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --deep-brown: #000000;
    --sand: #ffffff;
    --ochre: #ffd700;
    --maroon: #ff0000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
