/**
 * Spin Time - Stylesheet
 * All classes use v838- prefix for namespace isolation
 * Mobile-first responsive design
 */

/* CSS Variables */
:root {
  --v838-primary: #4169E1;
  --v838-primary-dark: #9932CC;
  --v838-secondary: #8A2BE2;
  --v838-accent: #E6E6FA;
  --v838-bg: #0C0C0C;
  --v838-bg-light: #1a1a1a;
  --v838-text: #E6E6FA;
  --v838-text-dark: #ADB5BD;
  --v838-border: #8A2BE2;
  --v838-hover: #9932CC;
  --v838-shadow: rgba(65, 105, 225, 0.3);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--v838-text);
  background-color: var(--v838-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Container */
.v838-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* Header */
.v838-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--v838-bg) 0%, var(--v838-bg-light) 100%);
  border-bottom: 2px solid var(--v838-primary);
  transition: all 0.3s ease;
}

.v838-header-scrolled {
  box-shadow: 0 4px 12px var(--v838-shadow);
}

.v838-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  height: 60px;
}

.v838-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--v838-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.v838-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v838-primary), var(--v838-secondary));
}

.v838-header-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.v838-btn {
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v838-btn-primary {
  background: linear-gradient(135deg, var(--v838-primary), var(--v838-secondary));
  color: #fff;
  box-shadow: 0 2px 8px rgba(65, 105, 225, 0.4);
}

.v838-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(65, 105, 225, 0.6);
}

.v838-btn-secondary {
  background: transparent;
  color: var(--v838-primary);
  border: 2px solid var(--v838-primary);
}

.v838-btn-secondary:hover {
  background: var(--v838-primary);
  color: #fff;
}

.v838-menu-button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.5rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  justify-content: center;
}

.v838-menu-button span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--v838-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.v838-menu-open .v838-menu-button span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.v838-menu-open .v838-menu-button span:nth-child(2) {
  opacity: 0;
}

.v838-menu-open .v838-menu-button span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.v838-mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--v838-bg-light);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-bottom: 2px solid var(--v838-primary);
}

.v838-menu-open .v838-mobile-menu {
  max-height: 500px;
}

.v838-menu-items {
  padding: 1rem 0;
}

.v838-menu-item {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1.4rem;
  color: var(--v838-text);
  border-bottom: 1px solid rgba(138, 43, 226, 0.2);
  transition: all 0.3s ease;
}

.v838-menu-item:hover {
  background: var(--v838-primary);
  color: #fff;
  padding-left: 2rem;
}

/* Main Content */
.v838-main {
  padding-top: 70px;
  padding-bottom: 80px;
}

.v838-body-menu-open {
  overflow: hidden;
}

/* Hero Section */
.v838-hero {
  padding: 2rem 0;
}

.v838-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--v838-primary);
  text-align: center;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
}

/* Carousel */
.v838-carousel {
  position: relative;
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--v838-shadow);
}

.v838-carousel-slides {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.v838-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.v838-carousel-slide.v838-active {
  opacity: 1;
  z-index: 1;
}

.v838-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v838-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.v838-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.v838-carousel-dot.v838-active {
  background: var(--v838-primary);
  transform: scale(1.2);
}

/* Game Grid */
.v838-game-section {
  margin: 3rem 0;
}

.v838-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v838-secondary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 4px solid var(--v838-primary);
  padding-left: 1rem;
}

.v838-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.v838-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.5rem;
  background: var(--v838-bg-light);
}

.v838-game-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px var(--v838-shadow);
  background: linear-gradient(135deg, rgba(65, 105, 225, 0.2), rgba(138, 43, 226, 0.2));
}

.v838-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: var(--v838-bg);
}

.v838-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v838-game-name {
  font-size: 1rem;
  color: var(--v838-text-dark);
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Content Sections */
.v838-content-section {
  background: var(--v838-bg-light);
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  border: 1px solid var(--v838-border);
}

.v838-content-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--v838-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.v838-content-section p {
  margin-bottom: 1rem;
  color: var(--v838-text-dark);
  line-height: 1.6;
}

.v838-content-section ul {
  list-style: disc;
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.v838-content-section li {
  margin-bottom: 0.5rem;
  color: var(--v838-text-dark);
}

.v838-promo-link {
  color: var(--v838-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.v838-promo-link:hover {
  color: var(--v838-secondary);
  text-decoration: underline;
}

/* Bottom Navigation */
.v838-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--v838-bg-light) 0%, var(--v838-bg) 100%);
  border-top: 2px solid var(--v838-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  box-shadow: 0 -4px 12px var(--v838-shadow);
}

.v838-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  color: var(--v838-text-dark);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.v838-nav-item:hover,
.v838-nav-item.v838-active {
  color: var(--v838-primary);
  transform: scale(1.05);
}

.v838-nav-item.v838-touching {
  transform: scale(0.95);
}

.v838-nav-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.v838-nav-text {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.v838-nav-item.v838-active .v838-nav-icon {
  color: var(--v838-primary);
}

/* Footer */
.v838-footer {
  background: var(--v838-bg-light);
  padding: 3rem 0 7rem;
  border-top: 2px solid var(--v838-primary);
  margin-top: 3rem;
}

.v838-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.v838-footer-link {
  color: var(--v838-primary);
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--v838-border);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.v838-footer-link:hover {
  background: var(--v838-primary);
  color: #fff;
  transform: translateY(-2px);
}

.v838-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.v838-partner-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.v838-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.v838-copyright {
  text-align: center;
  color: var(--v838-text-dark);
  font-size: 1.2rem;
  padding: 1rem;
  border-top: 1px solid var(--v838-border);
}

/* Responsive */
@media (min-width: 769px) {
  .v838-bottom-nav {
    display: none;
  }

  .v838-main {
    padding-bottom: 2rem;
  }

  .v838-footer {
    padding-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  .v838-header-buttons .v838-btn {
    padding: 0.4rem 0.8rem;
    font-size: 1.1rem;
  }

  .v838-game-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Utility Classes */
.v838-text-center {
  text-align: center;
}

.v838-mt-1 { margin-top: 1rem; }
.v838-mt-2 { margin-top: 2rem; }
.v838-mb-1 { margin-bottom: 1rem; }
.v838-mb-2 { margin-bottom: 2rem; }

.v838-hidden {
  display: none;
}
