/**
 * CasinoPlus Main Stylesheet
 * All classes use v316- prefix for namespace isolation
 */

/* CSS Variables */
:root {
  --v316-primary: #BC8F8F;
  --v316-secondary: #FF69B4;
  --v316-accent: #D2691E;
  --v316-dark: #212F3D;
  --v316-light: #FAF0E6;
  --v316-gray: #ADB5BD;
  --v316-success: #28a745;
  --v316-danger: #dc3545;
  --v316-warning: #ffc107;

  /* Typography */
  --v316-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --v316-font-size-base: 1.6rem;
  --v316-line-height: 1.5;

  /* Spacing */
  --v316-spacing-xs: 0.4rem;
  --v316-spacing-sm: 0.8rem;
  --v316-spacing-md: 1.6rem;
  --v316-spacing-lg: 2.4rem;
  --v316-spacing-xl: 3.2rem;

  /* Layout */
  --v316-max-width: 430px;
  --v316-header-height: 60px;
  --v316-nav-height: 60px;

  /* Border Radius */
  --v316-radius-sm: 4px;
  --v316-radius-md: 8px;
  --v316-radius-lg: 12px;
  --v316-radius-full: 50%;

  /* Shadows */
  --v316-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --v316-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --v316-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--v316-font-family);
  font-size: var(--v316-font-size-base);
  line-height: var(--v316-line-height);
  color: var(--v316-light);
  background-color: var(--v316-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--v316-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--v316-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.v316-container {
  max-width: var(--v316-max-width);
  margin: 0 auto;
  padding: 0 var(--v316-spacing-md);
}

/* Header */
.v316-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--v316-header-height);
  background: linear-gradient(135deg, var(--v316-dark) 0%, #1a2734 100%);
  box-shadow: var(--v316-shadow-md);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--v316-spacing-md);
}

.v316-logo {
  display: flex;
  align-items: center;
  gap: var(--v316-spacing-sm);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v316-secondary);
  text-decoration: none;
}

.v316-logo-icon {
  width: 32px;
  height: 32px;
}

.v316-header-actions {
  display: flex;
  gap: var(--v316-spacing-sm);
  align-items: center;
}

.v316-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  border-radius: var(--v316-radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.v316-btn-primary {
  background: linear-gradient(135deg, var(--v316-secondary) 0%, var(--v316-primary) 100%);
  color: #fff;
  box-shadow: var(--v316-shadow-sm);
}

.v316-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--v316-shadow-md);
}

.v316-btn-secondary {
  background: transparent;
  color: var(--v316-light);
  border: 2px solid var(--v316-primary);
}

.v316-btn-secondary:hover {
  background: var(--v316-primary);
  color: #fff;
}

.v316-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--v316-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: var(--v316-spacing-xs);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.v316-mobile-menu {
  position: fixed;
  top: var(--v316-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--v316-dark);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: var(--v316-spacing-md);
}

.v316-mobile-menu.v316-menu-open {
  transform: translateX(0);
}

.v316-menu-overlay {
  position: fixed;
  top: var(--v316-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.v316-menu-overlay.v316-overlay-show {
  opacity: 1;
  visibility: visible;
}

.v316-menu-list {
  list-style: none;
  padding: var(--v316-spacing-md) 0;
}

.v316-menu-item {
  margin-bottom: var(--v316-spacing-sm);
}

.v316-menu-link {
  display: flex;
  align-items: center;
  gap: var(--v316-spacing-sm);
  padding: var(--v316-spacing-sm) var(--v316-spacing-md);
  color: var(--v316-light);
  font-size: 1.6rem;
  border-radius: var(--v316-radius-md);
  transition: all 0.3s ease;
}

.v316-menu-link:hover {
  background: rgba(255, 105, 180, 0.1);
  color: var(--v316-secondary);
}

.v316-menu-icon {
  font-size: 2rem;
  width: 24px;
  text-align: center;
}

/* Main Content */
main {
  margin-top: var(--v316-header-height);
  padding-bottom: var(--v316-nav-height);
  min-height: calc(100vh - var(--v316-header-height) - var(--v316-nav-height));
}

/* Carousel */
.v316-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: var(--v316-spacing-lg);
}

.v316-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.v316-carousel-slide.v316-slide-active {
  opacity: 1;
}

.v316-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section */
.v316-section {
  padding: var(--v316-spacing-lg) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.v316-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--v316-secondary);
  margin-bottom: var(--v316-spacing-md);
  text-align: center;
}

.v316-section-content {
  color: var(--v316-gray);
  font-size: 1.5rem;
  line-height: 1.8;
}

/* Game Grid */
.v316-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--v316-spacing-sm);
  margin-bottom: var(--v316-spacing-lg);
}

.v316-game-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.v316-game-item:hover {
  transform: scale(1.05);
}

.v316-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--v316-radius-md);
  background: var(--v316-gray);
}

.v316-game-name {
  font-size: 1.1rem;
  color: var(--v316-light);
  text-align: center;
  margin-top: var(--v316-spacing-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card */
.v316-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--v316-radius-lg);
  padding: var(--v316-spacing-md);
  margin-bottom: var(--v316-spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v316-card-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--v316-primary);
  margin-bottom: var(--v316-spacing-sm);
}

.v316-card-content {
  font-size: 1.5rem;
  color: var(--v316-gray);
  line-height: 1.8;
}

/* FAQ */
.v316-faq-item {
  margin-bottom: var(--v316-spacing-md);
}

.v316-faq-question {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--v316-secondary);
  margin-bottom: var(--v316-spacing-xs);
}

.v316-faq-answer {
  font-size: 1.5rem;
  color: var(--v316-gray);
  line-height: 1.8;
}

/* Footer */
.v316-footer {
  background: #1a2734;
  padding: var(--v316-spacing-lg) 0;
  margin-top: var(--v316-spacing-lg);
}

.v316-footer-content {
  color: var(--v316-gray);
  font-size: 1.4rem;
  line-height: 1.8;
  margin-bottom: var(--v316-spacing-md);
}

.v316-partners {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v316-spacing-sm);
  justify-content: center;
  margin-bottom: var(--v316-spacing-md);
}

.v316-partner-logo {
  width: 60px;
  height: 30px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.v316-partner-logo:hover {
  opacity: 1;
}

.v316-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v316-spacing-md);
  justify-content: center;
  margin-bottom: var(--v316-spacing-md);
}

.v316-footer-link {
  color: var(--v316-primary);
  font-size: 1.4rem;
}

.v316-copyright {
  text-align: center;
  color: var(--v316-gray);
  font-size: 1.2rem;
}

/* Bottom Navigation (Mobile) */
.v316-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--v316-nav-height);
  background: linear-gradient(135deg, var(--v316-dark) 0%, #1a2734 100%);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.v316-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  color: var(--v316-gray);
  transition: all 0.3s ease;
  cursor: pointer;
  padding: var(--v316-spacing-xs);
  border-radius: var(--v316-radius-md);
}

.v316-nav-item:hover,
.v316-nav-item.v316-nav-active {
  color: var(--v316-secondary);
  background: rgba(255, 105, 180, 0.1);
  transform: scale(1.05);
}

.v316-nav-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.v316-nav-label {
  font-size: 1rem;
  font-weight: 500;
}

/* Desktop: Hide bottom nav */
@media (min-width: 769px) {
  .v316-bottom-nav {
    display: none;
  }

  main {
    padding-bottom: var(--v316-spacing-md);
  }

  .v316-menu-toggle {
    display: flex;
  }
}

/* Mobile: Show menu toggle */
@media (max-width: 768px) {
  .v316-menu-toggle {
    display: flex;
  }

  .v316-desktop-nav {
    display: none;
  }
}

/* Animations */
@keyframes v316-ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Utility Classes */
.v316-text-center {
  text-align: center;
}

.v316-mt-md {
  margin-top: var(--v316-spacing-md);
}

.v316-mb-md {
  margin-bottom: var(--v316-spacing-md);
}

.v316-py-lg {
  padding-top: var(--v316-spacing-lg);
  padding-bottom: var(--v316-spacing-lg);
}

.v316-highlight {
  color: var(--v316-secondary);
  font-weight: 600;
}
