/**
 * YYY777 Gaming Platform - Core Layout CSS
 * Copyright 2025 - yyy777.click
 * Mobile-first responsive design with w89bf prefix
 */

/* CSS Variables with prefix */
:root {
  --w89bf-primary: #1A202C;
  --w89bf-secondary: #2D3748;
  --w89bf-accent: #4FD1C7;
  --w89bf-highlight: #F6E05E;
  --w89bf-background: #F7FAFC;
  --w89bf-text-light: #F7FAFC;
  --w89bf-text-dark: #1A202C;
  --w89bf-gradient: linear-gradient(135deg, var(--w89bf-primary), var(--w89bf-secondary));
  --w89bf-shadow: 0 4px 15px rgba(26, 32, 44, 0.2);
  --w89bf-border-radius: 8px;
  --w89bf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%; /* 10px base for rem calculations */
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--w89bf-text-dark);
  background-color: var(--w89bf-background);
  overflow-x: hidden;
}

/* Container and layout classes */
.w89bf-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
  width: 100%;
}

.w89bf-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header and navigation */
.w89bf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--w89bf-gradient);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(79, 209, 199, 0.2);
  transition: var(--w89bf-transition);
}

.w89bf-header.w89bf-hidden {
  transform: translateY(-100%);
}

.w89bf-nav {
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.6rem;
  position: relative;
  z-index: 1001;
}

.w89bf-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--w89bf-text-light);
  font-weight: 700;
  font-size: 1.8rem;
}

.w89bf-logo img {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: var(--w89bf-border-radius);
}

.w89bf-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.w89bf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.6rem;
  border: none;
  border-radius: var(--w89bf-border-radius);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--w89bf-transition);
  min-height: 44px;
  min-width: 44px;
}

.w89bf-btn-primary {
  background: linear-gradient(135deg, var(--w89bf-accent), var(--w89bf-highlight));
  color: var(--w89bf-text-dark);
  box-shadow: var(--w89bf-shadow);
}

.w89bf-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 209, 199, 0.4);
}

.w89bf-btn-secondary {
  background: transparent;
  color: var(--w89bf-text-light);
  border: 2px solid var(--w89bf-accent);
}

.w89bf-btn-secondary:hover {
  background: var(--w89bf-accent);
  color: var(--w89bf-text-dark);
}

/* Mobile menu toggle */
.w89bf-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.w89bf-menu-toggle span {
  display: block;
  height: 3px;
  width: 2.4rem;
  background: var(--w89bf-text-light);
  margin: 3px 0;
  transition: var(--w89bf-transition);
  transform-origin: center;
}

.w89bf-menu-toggle.w89bf-active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.w89bf-menu-toggle.w89bf-active span:nth-child(2) {
  opacity: 0;
}

.w89bf-menu-toggle.w89bf-active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu */
.w89bf-mobile-menu {
  position: fixed;
  top: 6rem;
  left: 0;
  right: 0;
  background: var(--w89bf-gradient);
  transform: translateY(-100%);
  transition: var(--w89bf-transition);
  z-index: 999;
  box-shadow: var(--w89bf-shadow);
  pointer-events: none;
}

.w89bf-mobile-menu.w89bf-menu-active {
  transform: translateY(0);
  pointer-events: auto;
}

.w89bf-mobile-menu ul {
  list-style: none;
  padding: 2rem;
}

.w89bf-mobile-menu li {
  margin-bottom: 1rem;
}

.w89bf-mobile-menu a {
  display: block;
  padding: 1.2rem 1.6rem;
  color: var(--w89bf-text-light);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--w89bf-border-radius);
  transition: var(--w89bf-transition);
}

.w89bf-mobile-menu a:hover {
  background: rgba(79, 209, 199, 0.2);
  transform: translateX(0.5rem);
}

/* Main content */
.w89bf-main {
  flex: 1;
  margin-top: 6rem;
  padding-bottom: 8rem;
}

.w89bf-section {
  padding: 2rem 0;
}

.w89bf-section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--w89bf-primary);
  margin-bottom: 1.6rem;
  text-align: center;
}

/* Card components */
.w89bf-card {
  background: white;
  border-radius: var(--w89bf-border-radius);
  box-shadow: var(--w89bf-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.w89bf-card-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--w89bf-primary);
  margin-bottom: 1.2rem;
}

.w89bf-card-text {
  line-height: 1.6;
}

/* Game grid */
.w89bf-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.w89bf-game-card {
  background: white;
  border-radius: var(--w89bf-border-radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--w89bf-shadow);
  cursor: pointer;
  transition: var(--w89bf-transition);
}

.w89bf-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(26, 32, 44, 0.3);
}

.w89bf-game-card img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  border-radius: var(--w89bf-border-radius);
  margin-bottom: 0.8rem;
}

.w89bf-game-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--w89bf-primary);
  margin-bottom: 0.5rem;
}

/* Bottom navigation */
.w89bf-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
  box-shadow: 0 -2px 10px rgba(26, 32, 44, 0.1);
  z-index: 100;
}

.w89bf-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--w89bf-secondary);
  transition: var(--w89bf-transition);
  padding: 0.5rem;
}

.w89bf-nav-item.w89bf-active,
.w89bf-nav-item:hover {
  color: var(--w89bf-accent);
}

.w89bf-nav-item i {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.w89bf-nav-item span {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Footer */
.w89bf-footer {
  background: var(--w89bf-gradient);
  color: var(--w89bf-text-light);
  padding: 3rem 0 2rem 0;
  text-align: center;
}

.w89bf-footer-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.w89bf-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.w89bf-footer-links a {
  color: var(--w89bf-text-light);
  text-decoration: none;
  font-size: 1.4rem;
  opacity: 0.8;
  transition: var(--w89bf-transition);
}

.w89bf-footer-links a:hover {
  opacity: 1;
  color: var(--w89bf-accent);
}

.w89bf-partners {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.w89bf-partner-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--w89bf-transition);
}

.w89bf-partner-logo:hover {
  opacity: 1;
}

.w89bf-copyright {
  font-size: 1.2rem;
  opacity: 0.7;
  margin-top: 2rem;
}

/* Utility classes */
.w89bf-text-center { text-align: center; }
.w89bf-text-left { text-align: left; }
.w89bf-text-right { text-align: right; }

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

.w89bf-p-1 { padding: 1rem; }
.w89bf-p-2 { padding: 2rem; }

.w89bf-hidden { display: none !important; }
.w89bf-visible { display: block !important; }

/* Responsive design */
@media (min-width: 481px) {
  .w89bf-container {
    max-width: 76.8rem;
  }
  
  .w89bf-bottom-nav {
    display: none;
  }
  
  .w89bf-main {
    padding-bottom: 2rem;
  }
  
  .w89bf-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
  }
  
  .w89bf-footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}