/* UBet95 Mobile-First CSS Styles */
/* Color Palette: #0E1621 (dark), #DEB887 (burlywood), #BDB76B (dark khaki), #FFB347 (sandy brown) */

/* CSS Custom Properties */
:root {
  --v562-primary: #FFB347;
  --v562-secondary: #DEB887;  
  --v562-accent: #BDB76B;
  --v562-dark: #0E1621;
  --v562-bg: #0E1621;
  --v562-surface: #1a2332;
  --v562-text: #DEB887;
  --v562-text-secondary: #BDB76B;
  --v562-border: rgba(222, 184, 135, 0.2);
  --v562-shadow: rgba(14, 22, 33, 0.5);
  --v562-gradient: linear-gradient(135deg, #FFB347 0%, #DEB887 100%);
  --v562-gradient-dark: linear-gradient(135deg, #0E1621 0%, #1a2332 100%);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%; /* 10px base for rem calculations */
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--v562-bg);
  color: var(--v562-text);
  font-size: 1.4rem;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--v562-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 2.0rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.6rem; }

p {
  margin-bottom: 1rem;
  color: var(--v562-text-secondary);
}

a {
  color: var(--v562-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--v562-secondary);
  text-shadow: 0 0 8px rgba(255, 179, 71, 0.4);
}

/* Layout Components */
.v562-wrapper {
  min-height: 100vh;
  background: var(--v562-gradient-dark);
  padding-bottom: 6rem; /* Space for bottom nav */
}

.v562-container {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

.v562-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.v562-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.v562-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.v562-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Header Styles */
.v562-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(14, 22, 33, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--v562-border);
}

.v562-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 43rem;
  margin: 0 auto;
}

.v562-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--v562-primary);
}

.v562-logo-img {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.6rem;
}

.v562-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.v562-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-height: 4.4rem;
  touch-action: manipulation;
}

.v562-btn-primary {
  background: var(--v562-gradient);
  color: var(--v562-dark);
  box-shadow: 0 2px 8px rgba(255, 179, 71, 0.3);
}

.v562-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 179, 71, 0.4);
}

.v562-btn-secondary {
  background: var(--v562-surface);
  color: var(--v562-secondary);
  border: 1px solid var(--v562-border);
}

.v562-btn-outline {
  background: transparent;
  color: var(--v562-primary);
  border: 1px solid var(--v562-primary);
}

.v562-btn-outline:hover {
  background: var(--v562-primary);
  color: var(--v562-dark);
}

/* Hamburger Menu */
.v562-hamburger {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.4rem;
  transition: all 0.3s ease;
}

.v562-hamburger-line {
  width: 2.4rem;
  height: 0.2rem;
  background: var(--v562-primary);
  transition: all 0.3s ease;
  border-radius: 0.1rem;
}

.v562-hamburger-active .v562-hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.v562-hamburger-active .v562-hamburger-line:nth-child(2) {
  opacity: 0;
}

.v562-hamburger-active .v562-hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(0.5rem, -0.5rem);
}

/* Mobile Menu */
.v562-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 22, 33, 0.8);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.v562-overlay-active {
  opacity: 1;
  visibility: visible;
}

.v562-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 28rem;
  height: 100vh;
  background: var(--v562-surface);
  z-index: 999;
  transition: right 0.3s ease;
  padding: 8rem 2rem 2rem;
  overflow-y: auto;
}

.v562-mobile-menu-active {
  right: 0;
}

.v562-menu-list {
  list-style: none;
}

.v562-menu-item {
  margin-bottom: 1rem;
}

.v562-menu-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  color: var(--v562-text);
  border-radius: 0.6rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.v562-menu-link:hover {
  background: rgba(255, 179, 71, 0.1);
  color: var(--v562-primary);
}

/* Main Content */
.v562-main {
  padding-top: 7rem;
  min-height: calc(100vh - 7rem);
}

.v562-section {
  padding: 2rem 0;
  opacity: 0;
  transform: translateY(2rem);
  transition: all 0.6s ease;
}

.v562-animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.v562-hero {
  text-align: center;
  padding: 3rem 0;
  background: var(--v562-gradient);
  color: var(--v562-dark);
  margin-bottom: 2rem;
  border-radius: 0 0 2rem 2rem;
}

.v562-hero h1 {
  color: var(--v562-dark);
  margin-bottom: 1.5rem;
  font-size: 2.6rem;
}

.v562-hero p {
  color: rgba(14, 22, 33, 0.8);
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

/* Carousel */
.v562-carousel {
  position: relative;
  margin-bottom: 2rem;
  border-radius: 1rem;
  overflow: hidden;
}

.v562-carousel-slide {
  display: none;
  position: relative;
}

.v562-slide-active {
  display: block;
}

.v562-carousel-image {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.v562-carousel-image:hover {
  transform: scale(1.05);
}

.v562-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.v562-carousel-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(222, 184, 135, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.v562-dot-active {
  background: var(--v562-primary);
  transform: scale(1.2);
}

/* Cards */
.v562-card {
  background: var(--v562-surface);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--v562-border);
  box-shadow: 0 4px 12px var(--v562-shadow);
  transition: all 0.3s ease;
}

.v562-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 179, 71, 0.2);
  border-color: var(--v562-primary);
}

.v562-card h3 {
  margin-bottom: 0.8rem;
  color: var(--v562-primary);
}

.v562-card p {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Game Grid */
.v562-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.v562-game-item {
  background: var(--v562-surface);
  border-radius: 0.8rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--v562-border);
}

.v562-game-item:hover {
  background: rgba(255, 179, 71, 0.1);
  transform: scale(1.05);
  border-color: var(--v562-primary);
}

.v562-game-image {
  width: 5rem;
  height: 5rem;
  border-radius: 0.6rem;
  margin-bottom: 0.5rem;
  transition: opacity 0.3s ease;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
  opacity: 1; /* Start visible to avoid flash */
  background-color: var(--v562-surface);
  background-image: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
}

.v562-game-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--v562-text);
  line-height: 1.2;
}

/* Game Categories */
.v562-game-category {
  margin-bottom: 3rem;
}

.v562-category-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v562-primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  border-bottom: 2px solid var(--v562-primary);
  padding-bottom: 0.5rem;
}

/* Statistics Section */
.v562-stats {
  background: var(--v562-gradient);
  color: var(--v562-dark);
  padding: 2rem;
  border-radius: 1rem;
  margin: 2rem 0;
}

.v562-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.v562-stat-item {
  text-align: center;
  background: rgba(14, 22, 33, 0.1);
  padding: 1.5rem;
  border-radius: 0.8rem;
}

.v562-stat-number {
  font-size: 2.4rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.v562-stat-label {
  font-size: 1.2rem;
  opacity: 0.8;
}

/* Footer */
.v562-footer {
  background: var(--v562-dark);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--v562-border);
}

.v562-footer-content {
  text-align: center;
}

.v562-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.v562-footer-link {
  color: var(--v562-text-secondary);
  font-size: 1.3rem;
  font-weight: 500;
}

.v562-footer-link:hover {
  color: var(--v562-primary);
}

.v562-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
  opacity: 0.6;
}

.v562-partner-img {
  width: 4rem;
  height: 4rem;
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.v562-partner-img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

.v562-copyright {
  color: var(--v562-text-secondary);
  font-size: 1.2rem;
  text-align: center;
  opacity: 0.7;
  margin-top: 2rem;
}

/* Bottom Navigation */
.v562-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(14, 22, 33, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--v562-border);
  z-index: 500;
  height: 6rem;
}

.v562-bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.v562-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--v562-text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
  min-width: 6rem;
  min-height: 4.4rem;
  justify-content: center;
  border-radius: 0.6rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.v562-bottom-nav-item:hover,
.v562-nav-active {
  color: var(--v562-primary);
  background: rgba(255, 179, 71, 0.1);
  transform: scale(1.05);
}

.v562-bottom-nav-icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

.v562-bottom-nav-text {
  font-size: 1rem;
  line-height: 1;
}

/* Promotional Links */
.v562-promo-link {
  position: relative;
  overflow: hidden;
}

.v562-promo-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 179, 71, 0.2);
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: -1;
}

.v562-promo-link:hover::before {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* Loading and Animations */
@keyframes v562-fadeIn {
  from { opacity: 0; transform: translateY(2rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes v562-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.v562-loading {
  animation: v562-pulse 2s infinite;
}

.v562-fade-in {
  animation: v562-fadeIn 0.6s ease-out;
}

/* Lazy Loading */
.v562-lazy {
  filter: blur(5px);
  transition: filter 0.3s ease;
}

/* Additional Image Loading and Error Handling */
.v562-game-image:not([src]), 
.v562-game-image[src=""], 
.v562-game-image[src="#"] {
  background: var(--v562-surface);
  border: 2px dashed var(--v562-border);
}

/* Image fade-in effect */
.v562-game-image.loaded {
  opacity: 1;
}

/* Tooltips */
.v562-tooltip {
  position: absolute;
  background: var(--v562-dark);
  color: var(--v562-text);
  padding: 0.5rem 1rem;
  border-radius: 0.4rem;
  font-size: 1.2rem;
  z-index: 1001;
  box-shadow: 0 4px 12px var(--v562-shadow);
  border: 1px solid var(--v562-border);
}

/* Responsive Design */
@media (min-width: 48rem) {
  .v562-container {
    max-width: 76.8rem;
    padding: 0 2rem;
  }
  
  .v562-nav {
    padding: 1.2rem 2rem;
  }
  
  .v562-hamburger {
    display: none;
  }
  
  .v562-nav-actions {
    gap: 1.5rem;
  }
  
  .v562-games-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }
  
  .v562-game-image {
    width: 6rem;
    height: 6rem;
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
    opacity: 1; /* Start visible to avoid flash */
    background-color: var(--v562-surface);
    background-image: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
  }
  
  .v562-bottom-nav {
    display: none;
  }
  
  .v562-wrapper {
    padding-bottom: 0;
  }
}

@media (min-width: 102.4rem) {
  .v562-container {
    max-width: 120rem;
  }
  
  .v562-games-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}