:root {
  --g538-primary: #FFDFBA;
  --g538-secondary: #FF5722;
  --g538-accent: #FFF176;
  --g538-dark: #1E1E1E;
  --g538-pink: #FF91A4;
  --g538-white: #FFFFFF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--g538-dark);
  background: linear-gradient(135deg, #1E1E1E 0%, #2D2D2D 100%);
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

.g538-wrapper {
  min-height: 100vh;
  padding-bottom: 70px;
}

.g538-container {
  padding: 0 1.5rem;
}

.g538-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, var(--g538-dark) 0%, #2D2D2D 100%);
  box-shadow: 0 2px 10px rgba(255, 223, 186, 0.1);
  z-index: 100;
  transition: all 0.3s ease;
}

.g538-header.g538-scrolled {
  background: rgba(30, 30, 30, 0.98);
  backdrop-filter: blur(10px);
}

.g538-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
}

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

.g538-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.g538-logo-text {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--g538-primary) 0%, var(--g538-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.g538-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.g538-btn-header {
  padding: 0.8rem 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.g538-btn-register {
  background: linear-gradient(135deg, var(--g538-primary) 0%, var(--g538-secondary) 100%);
  color: var(--g538-dark);
}

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

.g538-btn-register:active, .g538-btn-login:active {
  transform: scale(0.95);
}

.g538-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.g538-hamburger span {
  width: 25px;
  height: 3px;
  background: var(--g538-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.g538-hamburger.g538-active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.g538-hamburger.g538-active span:nth-child(2) {
  opacity: 0;
}

.g538-hamburger.g538-active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.g538-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.g538-menu-overlay.g538-overlay-active {
  opacity: 1;
  visibility: visible;
}

.g538-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100%;
  background: linear-gradient(135deg, #1E1E1E 0%, #2D2D2D 100%);
  z-index: 99;
  transition: right 0.3s ease;
  padding-top: 80px;
  box-shadow: -2px 0 10px rgba(255, 223, 186, 0.1);
}

.g538-mobile-menu.g538-menu-active {
  right: 0;
}

.g538-menu-list {
  list-style: none;
}

.g538-menu-item {
  border-bottom: 1px solid rgba(255, 223, 186, 0.1);
}

.g538-menu-link {
  display: block;
  padding: 1.5rem 2rem;
  color: var(--g538-primary);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.g538-menu-link:active {
  background: rgba(255, 223, 186, 0.1);
}

.g538-section {
  margin-top: 8rem;
  margin-bottom: 3rem;
}

.g538-section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--g538-primary);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.3;
}

.g538-hero {
  text-align: center;
  padding: 3rem 0;
}

.g538-hero-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--g538-primary) 0%, var(--g538-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.g538-hero-text {
  font-size: 1.5rem;
  color: #ADB5BD;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.g538-content-box {
  background: rgba(255, 223, 186, 0.05);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 223, 186, 0.1);
}

.g538-content-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--g538-primary);
  margin-bottom: 1.5rem;
}

.g538-content-text {
  font-size: 1.4rem;
  color: #ADB5BD;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.g538-btn {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.g538-btn-primary {
  background: linear-gradient(135deg, var(--g538-primary) 0%, var(--g538-secondary) 100%);
  color: var(--g538-dark);
}

.g538-btn-secondary {
  background: linear-gradient(135deg, var(--g538-secondary) 0%, var(--g538-pink) 100%);
  color: var(--g538-white);
}

.g538-btn-block {
  display: block;
  width: 100%;
}

.g538-btn:active {
  transform: scale(0.98);
}

.g538-mt-2 {
  margin-top: 2rem;
}

.g538-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 2rem 0;
}

.g538-game-item {
  background: rgba(255, 223, 186, 0.05);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 223, 186, 0.1);
}

.g538-game-item:active {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 223, 186, 0.2);
}

.g538-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.g538-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g538-game-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--g538-primary);
}

.g538-list {
  list-style: none;
}

.g538-list-item {
  padding: 1.2rem 0;
  padding-left: 2.5rem;
  position: relative;
  color: #ADB5BD;
  font-size: 1.4rem;
  line-height: 1.7;
  border-bottom: 1px solid rgba(255, 223, 186, 0.05);
}

.g538-list-item:before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--g538-secondary);
  font-weight: 700;
}

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

.g538-footer {
  background: var(--g538-dark);
  padding: 2rem 0;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 223, 186, 0.1);
}

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

.g538-footer-link {
  color: var(--g538-primary);
  text-decoration: none;
  font-size: 1.3rem;
  transition: color 0.3s ease;
}

.g538-footer-link:active {
  color: var(--g538-secondary);
}

.g538-copyright {
  text-align: center;
  color: #6C757D;
  font-size: 1.2rem;
}

.g538-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, #1E1E1E 0%, #2D2D2D 100%);
  border-top: 1px solid rgba(255, 223, 186, 0.1);
  box-shadow: 0 -2px 10px rgba(255, 223, 186, 0.1);
  z-index: 100;
}

.g538-bottom-nav-container {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
}

.g538-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #6C757D;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.g538-bottom-nav-item:active {
  color: var(--g538-primary);
}

.g538-bottom-nav-icon {
  font-size: 2rem;
}

.g538-bottom-nav-text {
  font-size: 1.1rem;
  font-weight: 500;
}

@media (max-width: 375px) {
  html {
    font-size: 58%;
  }
  
  .g538-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
