/**
 * JL29 Login - Main Stylesheet
 * All classes use g251- prefix for namespace isolation
 * Mobile-first responsive design
 */

/* CSS Variables - Color Palette */
:root {
  --g251-primary: #C9C9FF;
  --g251-secondary: #A9A9A9;
  --g251-dark: #273746;
  --g251-accent: #FF91A4;
  --g251-white: #ffffff;
  --g251-black: #000000;
  --g251-light-gray: #f5f5f5;
  --g251-medium-gray: #e0e0e0;
  --g251-dark-gray: #333333;
  --g251-text: #2c3e50;
  --g251-link: #3498db;
  --g251-success: #27ae60;
  --g251-warning: #f39c12;
  --g251-danger: #e74c3c;
  --g251-shadow: rgba(0, 0, 0, 0.1);
  --g251-shadow-hover: rgba(0, 0, 0, 0.2);
}

/* 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.6;
  color: var(--g251-text);
  background-color: var(--g251-white);
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--g251-dark);
}

h1 { font-size: 2.4rem; }
h2 { font-size: 2.0rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.6rem; }
h5 { font-size: 1.5rem; }
h6 { font-size: 1.4rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--g251-link);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--g251-accent);
}

/* Container */
.g251-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.g251-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--g251-dark) 0%, #1a252f 100%);
  box-shadow: 0 2px 10px var(--g251-shadow);
  padding: 0.8rem 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.g251-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.g251-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--g251-white);
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
}

.g251-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.g251-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.g251-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.g251-btn-register {
  background: var(--g251-accent);
  color: var(--g251-white);
}

.g251-btn-register:hover {
  background: #ff7a92;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 145, 164, 0.4);
}

.g251-btn-login {
  background: transparent;
  color: var(--g251-white);
  border: 2px solid var(--g251-primary);
}

.g251-btn-login:hover {
  background: var(--g251-primary);
  color: var(--g251-dark);
}

/* Mobile Menu Toggle */
.g251-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: transparent;
  border: none;
}

.g251-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--g251-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.g251-mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--g251-dark);
  padding: 1rem;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
  max-width: 430px;
  margin: 0 auto;
}

.g251-mobile-menu.g251-menu-active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.g251-menu-link {
  display: block;
  padding: 1rem;
  color: var(--g251-white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.4rem;
  transition: background 0.3s ease;
}

.g251-menu-link:hover {
  background: rgba(201, 201, 255, 0.1);
}

/* Main Content */
.g251-main {
  padding-top: 70px;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* Carousel */
.g251-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--g251-shadow);
}

.g251-carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.g251-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.g251-carousel-slide.g251-slide-active {
  opacity: 1;
}

.g251-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g251-carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.g251-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.g251-carousel-dot.g251-dot-active {
  background: var(--g251-white);
  width: 25px;
  border-radius: 5px;
}

/* Section */
.g251-section {
  padding: 2rem 0;
  margin-bottom: 1rem;
}

.g251-section-title {
  font-size: 2rem;
  color: var(--g251-dark);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.g251-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--g251-primary), var(--g251-accent));
  border-radius: 2px;
}

/* Game Grid */
.g251-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.g251-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.g251-game-item:hover {
  transform: scale(1.05);
}

.g251-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--g251-shadow);
  margin-bottom: 0.5rem;
  background: var(--g251-light-gray);
}

.g251-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g251-game-name {
  font-size: 1.1rem;
  color: var(--g251-dark);
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card */
.g251-card {
  background: var(--g251-white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px var(--g251-shadow);
  transition: box-shadow 0.3s ease;
}

.g251-card:hover {
  box-shadow: 0 4px 20px var(--g251-shadow-hover);
}

/* Button */
.g251-btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--g251-accent) 0%, #ff7a92 100%);
  color: var(--g251-white);
  border: none;
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 145, 164, 0.3);
}

.g251-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 145, 164, 0.4);
}

.g251-btn-secondary {
  background: linear-gradient(135deg, var(--g251-primary) 0%, #a8a8ff 100%);
  color: var(--g251-dark);
}

.g251-btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(201, 201, 255, 0.4);
}

/* List */
.g251-list {
  list-style: none;
  padding: 0;
}

.g251-list-item {
  padding: 1rem;
  margin-bottom: 0.8rem;
  background: var(--g251-light-gray);
  border-radius: 8px;
  border-left: 4px solid var(--g251-accent);
  transition: all 0.3s ease;
}

.g251-list-item:hover {
  background: var(--g251-medium-gray);
  transform: translateX(5px);
}

/* Footer */
.g251-footer {
  background: linear-gradient(135deg, var(--g251-dark) 0%, #1a252f 100%);
  color: var(--g251-white);
  padding: 2rem 1rem 7rem;
  margin-top: 2rem;
}

.g251-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.g251-footer-link {
  color: var(--g251-primary);
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  background: rgba(201, 201, 255, 0.1);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.g251-footer-link:hover {
  background: rgba(201, 201, 255, 0.2);
  transform: translateY(-2px);
}

.g251-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.g251-partner-logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px;
  transition: all 0.3s ease;
}

.g251-partner-logo:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.g251-partner-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.g251-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--g251-secondary);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Bottom Navigation */
.g251-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--g251-dark) 0%, #1a252f 100%);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 10px var(--g251-shadow);
  z-index: 1000;
  max-width: 430px;
  margin: 0 auto;
  height: 60px;
}

.g251-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  color: var(--g251-secondary);
  transition: all 0.3s ease;
  text-decoration: none;
  padding: 0.3rem;
  border-radius: 8px;
}

.g251-nav-item:hover,
.g251-nav-item.g251-nav-active {
  color: var(--g251-accent);
  background: rgba(255, 145, 164, 0.1);
  transform: scale(1.05);
}

.g251-nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.g251-nav-text {
  font-size: 11px;
  font-weight: 500;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .g251-bottom-nav {
    display: none;
  }

  .g251-main {
    padding-bottom: 2rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .g251-main {
    padding-bottom: 80px;
  }
}

/* Utility Classes */
.g251-text-center { text-align: center; }
.g251-mt-1 { margin-top: 1rem; }
.g251-mt-2 { margin-top: 2rem; }
.g251-mb-1 { margin-bottom: 1rem; }
.g251-mb-2 { margin-bottom: 2rem; }
.g251-p-1 { padding: 1rem; }
.g251-p-2 { padding: 2rem; }

/* Animation */
@keyframes g251-fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.g251-animate-fadeIn {
  animation: g251-fadeIn 0.6s ease forwards;
}
