/**
 * Lucky Star Casino - Main Design System
 * All classes use v17f- prefix for namespace isolation
 */

/* ===================================
   CSS Variables & Root Setup
   =================================== */
:root {
  /* Brand Colors */
  --v17f-primary: #FFEB3B;
  --v17f-secondary: #FF8000;
  --v17f-accent: #CD5C5C;
  --v17f-dark: #262626;
  --v17f-light: #FF6347;

  /* Extended Palette */
  --v17f-bg-dark: #1a1a1a;
  --v17f-bg-darker: #0d0d0d;
  --v17f-bg-card: #2d2d2d;
  --v17f-text-primary: #ffffff;
  --v17f-text-secondary: #cccccc;
  --v17f-text-muted: #999999;
  --v17f-border: #404040;
  --v17f-shadow: rgba(0, 0, 0, 0.3);

  /* Typography */
  --v17f-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --v17f-font-size-base: 1.6rem;
  --v17f-line-height: 1.5;

  /* Spacing */
  --v17f-spacing-xs: 0.4rem;
  --v17f-spacing-sm: 0.8rem;
  --v17f-spacing-md: 1.6rem;
  --v17f-spacing-lg: 2.4rem;
  --v17f-spacing-xl: 3.2rem;

  /* Transitions */
  --v17f-transition-fast: 150ms ease-in-out;
  --v17f-transition-base: 300ms ease-in-out;
  --v17f-transition-slow: 500ms ease-in-out;

  /* Z-index layers */
  --v17f-z-header: 1000;
  --v17f-z-bottom-nav: 1000;
  --v17f-z-mobile-menu: 9999;
  --v17f-z-modal: 10000;
  --v17f-z-overlay: 9998;
}

/* ===================================
   Reset & Base Styles
   =================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--v17f-font-family);
  font-size: var(--v17f-font-size-base);
  line-height: var(--v17f-line-height);
  color: var(--v17f-text-primary);
  background-color: var(--v17f-bg-darker);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--v17f-transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ===================================
   Layout & Container
   =================================== */
.v17f-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 var(--v17f-spacing-md);
}

.v17f-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.v17f-main {
  flex: 1;
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .v17f-main {
    padding-bottom: var(--v17f-spacing-xl);
  }
}

.v17f-section {
  padding: var(--v17f-spacing-lg) 0;
}

.v17f-grid {
  display: grid;
  gap: var(--v17f-spacing-md);
}

.v17f-flex {
  display: flex;
  gap: var(--v17f-spacing-md);
}

.v17f-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================================
   Header & Navigation
   =================================== */
.v17f-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--v17f-z-header);
  background-color: var(--v17f-dark);
  border-bottom: 2px solid var(--v17f-primary);
  transition: box-shadow var(--v17f-transition-base);
}

.v17f-header.v17f-scrolled {
  box-shadow: 0 4px 12px var(--v17f-shadow);
}

.v17f-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--v17f-spacing-sm) var(--v17f-spacing-md);
  max-width: 430px;
  margin: 0 auto;
}

.v17f-logo {
  display: flex;
  align-items: center;
  gap: var(--v17f-spacing-xs);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--v17f-primary);
}

.v17f-logo-icon {
  width: 32px;
  height: 32px;
}

.v17f-header-actions {
  display: flex;
  gap: var(--v17f-spacing-xs);
}

.v17f-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--v17f-transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v17f-spacing-xs);
  cursor: pointer;
}

.v17f-btn-primary {
  background: linear-gradient(135deg, var(--v17f-primary), var(--v17f-secondary));
  color: var(--v17f-dark);
}

.v17f-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 235, 59, 0.4);
}

.v17f-btn-secondary {
  background: transparent;
  color: var(--v17f-primary);
  border: 2px solid var(--v17f-primary);
}

.v17f-btn-secondary:hover {
  background: var(--v17f-primary);
  color: var(--v17f-dark);
}

.v17f-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--v17f-spacing-xs);
  cursor: pointer;
}

.v17f-menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--v17f-primary);
  transition: all var(--v17f-transition-fast);
}

/* ===================================
   Mobile Menu
   =================================== */
.v17f-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: var(--v17f-z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--v17f-transition-base);
}

.v17f-menu-overlay.v17f-active {
  opacity: 1;
  visibility: visible;
}

.v17f-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background-color: var(--v17f-dark);
  z-index: var(--v17f-z-mobile-menu);
  padding: var(--v17f-spacing-lg) var(--v17f-spacing-md);
  transition: right var(--v17f-transition-base);
  overflow-y: auto;
}

.v17f-mobile-menu.v17f-active {
  right: 0;
}

.v17f-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--v17f-spacing-lg);
}

.v17f-mobile-menu-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v17f-primary);
}

.v17f-menu-close {
  font-size: 2.4rem;
  color: var(--v17f-text-primary);
  cursor: pointer;
}

.v17f-menu-nav {
  display: flex;
  flex-direction: column;
  gap: var(--v17f-spacing-sm);
}

.v17f-menu-nav a {
  display: flex;
  align-items: center;
  gap: var(--v17f-spacing-sm);
  padding: var(--v17f-spacing-md);
  font-size: 1.4rem;
  color: var(--v17f-text-primary);
  border-radius: 8px;
  transition: background-color var(--v17f-transition-fast);
}

.v17f-menu-nav a:hover {
  background-color: var(--v17f-bg-card);
  color: var(--v17f-primary);
}

.v17f-menu-nav a i {
  font-size: 1.8rem;
  color: var(--v17f-secondary);
}

/* ===================================
   Carousel/Slider
   =================================== */
.v17f-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 60px;
}

.v17f-carousel-slides {
  display: flex;
  transition: transform var(--v17f-transition-slow);
}

.v17f-carousel-slide {
  min-width: 100%;
  position: relative;
}

.v17f-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.v17f-carousel-dots {
  position: absolute;
  bottom: var(--v17f-spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--v17f-spacing-xs);
  z-index: 10;
}

.v17f-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--v17f-transition-fast);
}

.v17f-carousel-dot.v17f-active,
.v17f-carousel-dot:hover {
  background-color: var(--v17f-primary);
  transform: scale(1.2);
}

/* ===================================
   Cards & Content Blocks
   =================================== */
.v17f-card {
  background-color: var(--v17f-bg-card);
  border-radius: 12px;
  padding: var(--v17f-spacing-md);
  margin-bottom: var(--v17f-spacing-md);
  border: 1px solid var(--v17f-border);
}

.v17f-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v17f-primary);
  margin-bottom: var(--v17f-spacing-sm);
}

.v17f-card-content {
  color: var(--v17f-text-secondary);
  line-height: var(--v17f-line-height);
}

.v17f-highlight {
  color: var(--v17f-secondary);
  font-weight: 600;
}

/* ===================================
   Game Grid
   =================================== */
.v17f-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--v17f-spacing-xs);
  margin-bottom: var(--v17f-spacing-md);
}

.v17f-game-item {
  position: relative;
  cursor: pointer;
  transition: transform var(--v17f-transition-fast);
}

.v17f-game-item:hover {
  transform: scale(1.05);
}

.v17f-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--v17f-border);
  transition: border-color var(--v17f-transition-fast);
}

.v17f-game-item:hover .v17f-game-icon {
  border-color: var(--v17f-primary);
}

.v17f-game-name {
  font-size: 1rem;
  color: var(--v17f-text-secondary);
  text-align: center;
  margin-top: var(--v17f-spacing-xs);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===================================
   Section Headers
   =================================== */
.v17f-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--v17f-spacing-md);
  padding-bottom: var(--v17f-spacing-sm);
  border-bottom: 2px solid var(--v17f-accent);
}

.v17f-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--v17f-primary);
}

.v17f-section-icon {
  font-size: 2rem;
  color: var(--v17f-secondary);
}

/* ===================================
   Accordion
   =================================== */
.v17f-accordion {
  border: 1px solid var(--v17f-border);
  border-radius: 8px;
  margin-bottom: var(--v17f-spacing-sm);
  overflow: hidden;
}

.v17f-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--v17f-spacing-md);
  background-color: var(--v17f-bg-card);
  cursor: pointer;
  transition: background-color var(--v17f-transition-fast);
}

.v17f-accordion-header:hover {
  background-color: var(--v17f-border);
}

.v17f-accordion-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--v17f-text-primary);
}

.v17f-accordion-icon {
  font-size: 1.8rem;
  color: var(--v17f-secondary);
  transition: transform var(--v17f-transition-fast);
}

.v17f-accordion.v17f-active .v17f-accordion-icon {
  transform: rotate(180deg);
}

.v17f-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--v17f-transition-base);
}

.v17f-accordion-content-inner {
  padding: var(--v17f-spacing-md);
  color: var(--v17f-text-secondary);
  line-height: var(--v17f-line-height);
}

/* ===================================
   Bottom Navigation (Mobile)
   =================================== */
.v17f-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--v17f-z-bottom-nav);
  background: linear-gradient(180deg, var(--v17f-dark), var(--v17f-bg-darker));
  border-top: 2px solid var(--v17f-primary);
  display: flex;
  justify-content: space-around;
  padding: var(--v17f-spacing-xs) 0;
  box-shadow: 0 -4px 12px var(--v17f-shadow);
}

@media (min-width: 769px) {
  .v17f-bottom-nav {
    display: none;
  }
}

.v17f-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: var(--v17f-spacing-xs);
  transition: all var(--v17f-transition-fast);
  cursor: pointer;
  border-radius: 8px;
}

.v17f-bottom-nav-item:hover {
  background-color: rgba(255, 235, 59, 0.1);
  transform: scale(1.05);
}

.v17f-bottom-nav-item.v17f-active {
  color: var(--v17f-primary);
}

.v17f-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: var(--v17f-spacing-xs);
}

.v17f-bottom-nav-label {
  font-size: 1rem;
  font-weight: 500;
}

/* ===================================
   Footer
   =================================== */
.v17f-footer {
  background-color: var(--v17f-dark);
  border-top: 2px solid var(--v17f-accent);
  padding: var(--v17f-spacing-lg) 0 var(--v17f-spacing-xl);
  margin-top: var(--v17f-spacing-xl);
}

.v17f-footer-section {
  margin-bottom: var(--v17f-spacing-lg);
}

.v17f-footer-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--v17f-primary);
  margin-bottom: var(--v17f-spacing-sm);
}

.v17f-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v17f-spacing-sm);
}

.v17f-footer-links a {
  font-size: 1.2rem;
  color: var(--v17f-text-secondary);
  padding: var(--v17f-spacing-xs);
  border-radius: 4px;
  transition: all var(--v17f-transition-fast);
}

.v17f-footer-links a:hover {
  color: var(--v17f-primary);
  background-color: var(--v17f-bg-card);
}

.v17f-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v17f-spacing-sm);
  margin-bottom: var(--v17f-spacing-md);
}

.v17f-partner-logo {
  width: 60px;
  height: 40px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity var(--v17f-transition-fast);
}

.v17f-partner-logo:hover {
  opacity: 1;
}

.v17f-copyright {
  text-align: center;
  padding-top: var(--v17f-spacing-md);
  border-top: 1px solid var(--v17f-border);
  font-size: 1.2rem;
  color: var(--v17f-text-muted);
}

/* ===================================
   Typography Styles
   =================================== */
.v17f-h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--v17f-primary);
  margin-bottom: var(--v17f-spacing-md);
  line-height: 1.2;
}

.v17f-h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--v17f-secondary);
  margin-bottom: var(--v17f-spacing-sm);
  line-height: 1.3;
}

.v17f-h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--v17f-text-primary);
  margin-bottom: var(--v17f-spacing-sm);
}

.v17f-text {
  color: var(--v17f-text-secondary);
  line-height: var(--v17f-line-height);
  margin-bottom: var(--v17f-spacing-sm);
}

.v17f-text-small {
  font-size: 1.2rem;
  color: var(--v17f-text-muted);
}

/* ===================================
   Utility Classes
   =================================== */
.v17f-mt-sm { margin-top: var(--v17f-spacing-sm); }
.v17f-mt-md { margin-top: var(--v17f-spacing-md); }
.v17f-mt-lg { margin-top: var(--v17f-spacing-lg); }
.v17f-mb-sm { margin-bottom: var(--v17f-spacing-sm); }
.v17f-mb-md { margin-bottom: var(--v17f-spacing-md); }
.v17f-mb-lg { margin-bottom: var(--v17f-spacing-lg); }

.v17f-text-center { text-align: center; }
.v17f-text-left { text-align: left; }
.v17f-text-right { text-align: right; }

.v17f-hidden { display: none; }
.v17f-visible { display: block; }

/* ===================================
   Animation Classes
   =================================== */
@keyframes v17f-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.v17f-animate-fadeIn {
  animation: v17f-fadeIn 0.6s ease-out;
}

/* ===================================
   Loading Spinner
   =================================== */
.v17f-loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--v17f-z-modal);
}

.v17f-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--v17f-border);
  border-top-color: var(--v17f-primary);
  border-radius: 50%;
  animation: v17f-spin 1s linear infinite;
}

@keyframes v17f-spin {
  to { transform: rotate(360deg); }
}
