/**
 * XoPlay Layout Styles
 * Version: 1.0.0
 * All classes use 'v9f9-' prefix
 * Color scheme: Purple (#8A2BE2), Dark (#141414), Orange (#E65100)
 */

/* CSS Variables */
:root {
  --v9f9-primary: #8A2BE2;
  --v9f9-secondary: #E65100;
  --v9f9-dark: #141414;
  --v9f9-light: #FFFFFF;
  --v9f9-gray: #808080;
  --v9f9-bg: #1A1A1A;
  --v9f9-card-bg: #252525;
  --v9f9-border: rgba(138, 43, 226, 0.2);
  --v9f9-shadow: rgba(138, 43, 226, 0.3);
  --v9f9-transition: all 0.3s ease;
  --v9f9-radius: 8px;
  --v9f9-header-height: 60px;
  --v9f9-bottom-nav-height: 56px;
}

/* Reset & 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, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--v9f9-light);
  background: var(--v9f9-bg);
  max-width: 430px;
  margin: 0 auto;
  padding-top: var(--v9f9-header-height);
  padding-bottom: var(--v9f9-bottom-nav-height);
  overflow-x: hidden;
}

a {
  color: var(--v9f9-primary);
  text-decoration: none;
  transition: var(--v9f9-transition);
}

a:hover {
  color: var(--v9f9-secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Header Styles */
.v9f9-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--v9f9-header-height);
  background: linear-gradient(135deg, var(--v9f9-dark) 0%, #2A2A2A 100%);
  border-bottom: 2px solid var(--v9f9-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--v9f9-shadow);
  transition: var(--v9f9-transition);
}

.v9f9-header.v9f9-scrolled {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
}

.v9f9-logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.v9f9-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.v9f9-site-name {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--v9f9-primary), var(--v9f9-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.v9f9-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Button Styles */
.v9f9-btn {
  padding: 0.8rem 1.5rem;
  border-radius: var(--v9f9-radius);
  font-size: 1.3rem;
  font-weight: 600;
  transition: var(--v9f9-transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.v9f9-btn-register {
  background: linear-gradient(135deg, var(--v9f9-primary), #9B59B6);
  color: var(--v9f9-light);
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.v9f9-btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.6);
}

.v9f9-btn-login {
  background: transparent;
  color: var(--v9f9-primary);
  border: 2px solid var(--v9f9-primary);
}

.v9f9-btn-login:hover {
  background: var(--v9f9-primary);
  color: var(--v9f9-light);
}

.v9f9-btn-primary {
  background: linear-gradient(135deg, var(--v9f9-secondary), #FF6F00);
  color: var(--v9f9-light);
  box-shadow: 0 4px 15px rgba(230, 81, 0, 0.4);
  padding: 1.2rem 2.5rem;
  font-size: 1.5rem;
}

.v9f9-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(230, 81, 0, 0.6);
}

.v9f9-menu-toggle {
  color: var(--v9f9-light);
  font-size: 2.2rem;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v9f9-menu-toggle.v9f9-active {
  color: var(--v9f9-primary);
}

/* Mobile Navigation */
.v9f9-mobile-nav {
  position: fixed;
  top: var(--v9f9-header-height);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  max-height: 0;
  overflow: hidden;
  background: var(--v9f9-dark);
  border-bottom: 2px solid var(--v9f9-border);
  z-index: 999;
  transition: max-height 0.3s ease;
}

.v9f9-mobile-nav.v9f9-active {
  max-height: 400px;
  box-shadow: 0 10px 30px var(--v9f9-shadow);
}

.v9f9-nav-list {
  list-style: none;
  padding: 1rem 0;
}

.v9f9-nav-list li {
  border-bottom: 1px solid rgba(138, 43, 226, 0.1);
}

.v9f9-nav-list li:last-child {
  border-bottom: none;
}

.v9f9-nav-list a {
  display: block;
  padding: 1.2rem 2rem;
  color: var(--v9f9-light);
  font-size: 1.5rem;
  transition: var(--v9f9-transition);
}

.v9f9-nav-list a:hover,
.v9f9-nav-list a.v9f9-active {
  background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.2));
  color: var(--v9f9-primary);
  padding-left: 2.5rem;
}

/* Main Content */
.v9f9-main {
  padding: 0 0 2rem 0;
  min-height: calc(100vh - var(--v9f9-header-height) - var(--v9f9-bottom-nav-height));
}

.v9f9-section {
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
}

.v9f9-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--v9f9-light);
  margin-bottom: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--v9f9-primary), var(--v9f9-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.v9f9-section-subtitle {
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--v9f9-light);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.v9f9-section-subtitle i {
  color: var(--v9f9-primary);
  font-size: 2.2rem;
}

.v9f9-content-text {
  font-size: 1.4rem;
  line-height: 1.7;
  color: #CCCCCC;
  margin-bottom: 1.5rem;
}

.v9f9-content-text strong {
  color: var(--v9f9-primary);
  font-weight: 600;
}

.v9f9-text-center {
  text-align: center;
}

.v9f9-text-highlight {
  color: var(--v9f9-secondary);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 1.5rem 0 1rem 0;
}

.v9f9-mt-1 { margin-top: 1rem; }
.v9f9-mt-2 { margin-top: 2rem; }
.v9f9-mb-1 { margin-bottom: 1rem; }
.v9f9-mb-2 { margin-bottom: 2rem; }

/* Carousel Styles */
.v9f9-carousel {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 200px;
  overflow: hidden;
  border-radius: var(--v9f9-radius);
  margin-bottom: 2rem;
}

.v9f9-carousel-item {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.v9f9-carousel-item.v9f9-active {
  opacity: 1;
}

.v9f9-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v9f9-carousel-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 2;
}

.v9f9-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--v9f9-transition);
}

.v9f9-carousel-dot.v9f9-active,
.v9f9-carousel-dot:hover {
  background: var(--v9f9-primary);
  transform: scale(1.3);
}

/* Game Grid */
.v9f9-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.v9f9-game-item {
  background: var(--v9f9-card-bg);
  border-radius: var(--v9f9-radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--v9f9-transition);
  border: 1px solid transparent;
}

.v9f9-game-item:hover {
  border-color: var(--v9f9-primary);
  box-shadow: 0 4px 15px var(--v9f9-shadow);
  transform: translateY(-3px);
}

.v9f9-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  margin-bottom: 0.8rem;
  object-fit: cover;
}

.v9f9-game-name {
  font-size: 1.2rem;
  color: var(--v9f9-light);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content Block */
.v9f9-content-block {
  background: var(--v9f9-card-bg);
  border-radius: var(--v9f9-radius);
  padding: 1.5rem;
  border: 1px solid var(--v9f9-border);
  margin-bottom: 1.5rem;
}

/* List Styles */
.v9f9-list {
  list-style: none;
  padding-left: 0;
}

.v9f9-list-item {
  padding: 1rem 0 1rem 2.5rem;
  border-bottom: 1px solid rgba(138, 43, 226, 0.1);
  position: relative;
  font-size: 1.4rem;
  color: #CCCCCC;
  line-height: 1.6;
}

.v9f9-list-item:last-child {
  border-bottom: none;
}

.v9f9-list-item:before {
  content: '▸';
  position: absolute;
  left: 0.5rem;
  color: var(--v9f9-primary);
  font-size: 1.6rem;
}

.v9f9-list-item strong {
  color: var(--v9f9-secondary);
}

/* FAQ Styles */
.v9f9-faq-item {
  background: var(--v9f9-card-bg);
  border-radius: var(--v9f9-radius);
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--v9f9-border);
  transition: var(--v9f9-transition);
}

.v9f9-faq-question {
  padding: 1.5rem;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--v9f9-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.v9f9-faq-question:after {
  content: '+';
  font-size: 2rem;
  color: var(--v9f9-primary);
  transition: var(--v9f9-transition);
}

.v9f9-faq-item.v9f9-active .v9f9-faq-question:after {
  content: '−';
}

.v9f9-faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  font-size: 1.4rem;
  color: #CCCCCC;
  line-height: 1.7;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.v9f9-faq-item.v9f9-active .v9f9-faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Promotional Link */
.v9f9-promo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--v9f9-primary);
  font-weight: 600;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 1rem 2rem;
  border: 2px solid var(--v9f9-primary);
  border-radius: var(--v9f9-radius);
  transition: var(--v9f9-transition);
}

.v9f9-promo-link:hover {
  background: var(--v9f9-primary);
  color: var(--v9f9-light);
  box-shadow: 0 4px 15px var(--v9f9-shadow);
}

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

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

.v9f9-footer-link {
  font-size: 1.4rem;
  color: var(--v9f9-light);
  padding: 0.8rem 1.5rem;
  border-radius: var(--v9f9-radius);
  transition: var(--v9f9-transition);
}

.v9f9-footer-link:hover {
  background: rgba(138, 43, 226, 0.2);
  color: var(--v9f9-primary);
}

.v9f9-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--v9f9-border);
  border-bottom: 1px solid var(--v9f9-border);
}

.v9f9-partner-icon {
  width: 60px;
  height: auto;
  opacity: 0.6;
  transition: var(--v9f9-transition);
  filter: grayscale(100%);
}

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

.v9f9-copyright {
  text-align: center;
  color: var(--v9f9-gray);
  font-size: 1.3rem;
  margin-top: 2rem;
}

/* Bottom Navigation */
.v9f9-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--v9f9-bottom-nav-height);
  background: var(--v9f9-dark);
  border-top: 2px solid var(--v9f9-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--v9f9-shadow);
}

.v9f9-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  color: var(--v9f9-gray);
  transition: var(--v9f9-transition);
  text-decoration: none;
}

.v9f9-bottom-nav-item:hover,
.v9f9-bottom-nav-item.v9f9-active {
  color: var(--v9f9-primary);
  transform: translateY(-2px);
}

.v9f9-nav-icon {
  font-size: 2.4rem;
}

.v9f9-nav-label {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Animation Classes */
.v9f9-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.v9f9-animate.v9f9-animated {
  opacity: 1;
  transform: translateY(0);
}

/* Back to Top Button */
.v9f9-back-to-top {
  position: fixed;
  bottom: calc(var(--v9f9-bottom-nav-height) + 2rem);
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--v9f9-primary), #9B59B6);
  color: var(--v9f9-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--v9f9-transition);
  box-shadow: 0 4px 15px var(--v9f9-shadow);
  z-index: 999;
}

.v9f9-back-to-top.v9f9-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.v9f9-back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--v9f9-shadow);
}

/* Responsive Adjustments */
@media (max-width: 374px) {
  html { font-size: 58%; }
  .v9f9-game-grid { grid-template-columns: repeat(3, 1fr); }
  .v9f9-btn { padding: 0.6rem 1.2rem; font-size: 1.2rem; }
}

@media (min-width: 431px) {
  body {
    border-left: 1px solid var(--v9f9-border);
    border-right: 1px solid var(--v9f9-border);
  }
}
