/* JiliQQ Layout Styles - Mobile-first design */
/* All classes use v969- prefix for namespace isolation */

/* ===== CSS Variables ===== */
:root {
  --bg-primary: #F5F5F5;
  --bg-secondary: #D3D3D3;
  --text-primary: #262626;
  --accent-green: #BAFFC9;
  --border-color: #BDC3C7;
  --white: #FFFFFF;
  --shadow: rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* ===== Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

/* ===== Header Styles ===== */
.v969-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 1000;
  padding: 12px 16px;
  transition: var(--transition);
}

.v969-header-container {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.v969-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.v969-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-green);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}

.v969-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.v969-header-actions {
  display: flex;
  gap: 8px;
}

.v969-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.v969-btn-register {
  background: var(--accent-green);
  color: var(--text-primary);
}

.v969-btn-register:hover {
  background: #a8ffb7;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow);
}

.v969-btn-login {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.v969-btn-login:hover {
  background: var(--white);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.v969-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--text-primary);
}

/* ===== Mobile Menu ===== */
.v969-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.v969-mobile-menu.v969-menu-active {
  display: flex;
  opacity: 1;
}

.v969-menu-content {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.v969-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
}

.v969-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.v969-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  transition: var(--transition);
}

.v969-menu-link:hover {
  background: var(--accent-green);
  transform: translateX(4px);
}

.v969-menu-link i {
  font-size: 20px;
}

/* ===== Main Content ===== */
.v969-main-content {
  margin-top: 80px;
  padding: 20px 16px;
  padding-bottom: 100px;
}

/* ===== Bottom Navigation ===== */
.v969-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--white);
  box-shadow: 0 -2px 10px var(--shadow);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 1px solid var(--border-color);
}

.v969-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  border-radius: 8px;
  cursor: pointer;
}

.v969-nav-item:hover {
  background: var(--accent-green);
  transform: scale(1.05);
}

.v969-nav-item.v969-nav-active {
  color: #2d7a3e;
  background: var(--accent-green);
}

.v969-nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.v969-nav-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .v969-bottom-nav {
    display: none;
  }

  .v969-main-content {
    padding-bottom: 40px;
  }
}

/* ===== Hero Section ===== */
.v969-hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--accent-green) 100%);
  border-radius: 12px;
  padding: 32px 24px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 4px 12px var(--shadow);
}

.v969-hero h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.v969-hero p {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ===== Category Tabs ===== */
.v969-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.v969-category-tabs::-webkit-scrollbar {
  display: none;
}

.v969-category-tab {
  padding: 10px 20px;
  background: var(--white);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.v969-category-tab:hover {
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.v969-category-tab.v969-tab-active {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--text-primary);
}

/* ===== Game Grid ===== */
.v969-game-category {
  display: none;
}

.v969-game-category.v969-category-active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.v969-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.v969-game-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.v969-game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px var(--shadow);
  border-color: var(--accent-green);
}

.v969-game-image-wrapper {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
}

.v969-game-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  opacity: 0;
}

.v969-game-image.v969-image-loaded {
  opacity: 1;
}

.v969-game-card:hover .v969-game-image {
  transform: scale(1.1);
}

.v969-game-info {
  padding: 8px;
  text-align: center;
}

.v969-game-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

/* ===== Content Sections ===== */
.v969-content-section {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px var(--shadow);
}

.v969-section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  border-left: 4px solid var(--accent-green);
  padding-left: 12px;
}

.v969-content-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.v969-content-text p {
  margin-bottom: 12px;
}

.v969-link {
  color: #2d7a3e;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.v969-link:hover {
  text-decoration: underline;
  color: #1a5a2b;
}

/* ===== Footer ===== */
.v969-footer {
  background: var(--bg-secondary);
  padding: 32px 16px 80px 16px;
  margin-top: 40px;
}

.v969-partners {
  margin-bottom: 24px;
}

.v969-partners-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  color: var(--text-primary);
}

.v969-partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.v969-partner-logo {
  background: var(--white);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  transition: var(--transition);
}

.v969-partner-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px var(--shadow);
}

.v969-partner-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.v969-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.v969-footer-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: var(--transition);
}

.v969-footer-link:hover {
  background: var(--accent-green);
  color: var(--text-primary);
}

.v969-copyright {
  text-align: center;
  font-size: 13px;
  color: var(--text-primary);
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

/* ===== Utility Classes ===== */
.v969-text-center {
  text-align: center;
}

.v969-mb-1 {
  margin-bottom: 8px;
}

.v969-mb-2 {
  margin-bottom: 16px;
}

.v969-mb-3 {
  margin-bottom: 24px;
}

.v969-mt-1 {
  margin-top: 8px;
}

.v969-mt-2 {
  margin-top: 16px;
}

.v969-mt-3 {
  margin-top: 24px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 380px) {
  .v969-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .v969-partners-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
