/**
 * Nimo Gaming - Main Stylesheet
 * All classes use g912- prefix for namespace isolation
 * Color palette: #1A1A2E | #87CEFA | #CD5C5C | #191970 | #E0FFFF
 */

:root {
  --g912-primary: #87CEFA;
  --g912-bg: #1A1A2E;
  --g912-bg-dark: #191970;
  --g912-text: #E0FFFF;
  --g912-accent: #CD5C5C;
  --g912-card-bg: #16213e;
  --g912-border: rgba(135, 206, 250, 0.15);
  --g912-shadow: rgba(0, 0, 0, 0.3);
  --g912-font-size: 62.5%;
  --g912-radius: 1.2rem;
  --g912-transition: all 0.3s ease;
}

html {
  font-size: var(--g912-font-size);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--g912-bg);
  color: var(--g912-text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden;
}

/* ===== Header ===== */
.g912-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, var(--g912-bg-dark), var(--g912-bg));
  border-bottom: 1px solid var(--g912-border);
  z-index: 1000;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.g912-logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.g912-logo-area img {
  width: 28px;
  height: 28px;
  border-radius: 0.4rem;
}

.g912-logo-area span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--g912-primary);
  letter-spacing: 0.05rem;
}

.g912-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.g912-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 0.6rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--g912-transition);
  text-decoration: none;
  min-height: 32px;
}

.g912-btn-register {
  background: linear-gradient(135deg, var(--g912-accent), #e87272);
  color: #fff;
}

.g912-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(205, 92, 92, 0.5);
}

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

.g912-btn-login:hover {
  background: rgba(135, 206, 250, 0.1);
}

.g912-menu-toggle {
  background: none;
  border: none;
  color: var(--g912-primary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Mobile Menu ===== */
.g912-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 46, 0.97);
  z-index: 9999;
  display: none;
  flex-direction: column;
  padding: 6rem 2rem 2rem;
  box-sizing: border-box;
}

.g912-mobile-menu.g912-menu-active {
  display: flex;
}

.g912-mobile-menu a {
  display: block;
  color: var(--g912-text);
  text-decoration: none;
  font-size: 1.6rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--g912-border);
  transition: var(--g912-transition);
}

.g912-mobile-menu a:hover {
  color: var(--g912-primary);
  padding-left: 1rem;
}

.g912-menu-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--g912-text);
  font-size: 2.4rem;
  cursor: pointer;
}

/* ===== Main Content ===== */
.g912-main {
  padding-top: 6rem;
}

@media (max-width: 768px) {
  .g912-main {
    padding-bottom: 80px;
  }
}

.g912-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* ===== Carousel ===== */
.g912-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--g912-radius);
  margin-bottom: 1.5rem;
}

.g912-carousel-inner {
  position: relative;
  width: 100%;
  height: 200px;
}

.g912-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: pointer;
}

.g912-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g912-slide-active {
  opacity: 1;
}

.g912-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.g912-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border: none;
  transition: var(--g912-transition);
}

.g912-carousel-dot.g912-dot-active {
  background: var(--g912-primary);
  width: 20px;
  border-radius: 4px;
}

/* ===== Section Title ===== */
.g912-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g912-primary);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--g912-accent);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.g912-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--g912-transition);
  padding: 0.4rem;
  border-radius: 0.8rem;
}

.g912-game-item:hover {
  background: rgba(135, 206, 250, 0.08);
  transform: translateY(-2px);
}

.g912-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.6rem;
  object-fit: cover;
  border: 1px solid var(--g912-border);
}

.g912-game-item span {
  font-size: 1rem;
  color: var(--g912-text);
  text-align: center;
  margin-top: 0.3rem;
  line-height: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Content Modules ===== */
.g912-card {
  background: var(--g912-card-bg);
  border-radius: var(--g912-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--g912-border);
}

.g912-card h2 {
  font-size: 1.8rem;
  color: var(--g912-primary);
  margin: 0 0 1rem;
}

.g912-card h3 {
  font-size: 1.5rem;
  color: var(--g912-primary);
  margin: 1rem 0 0.5rem;
}

.g912-card p {
  font-size: 1.3rem;
  line-height: 1.8rem;
  color: var(--g912-text);
  margin: 0.5rem 0;
}

.g912-card ul, .g912-card ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.g912-card li {
  font-size: 1.3rem;
  line-height: 1.8rem;
  margin-bottom: 0.3rem;
}

.g912-promo-link {
  color: var(--g912-accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--g912-transition);
}

.g912-promo-link:hover {
  color: #e87272;
  text-decoration: underline;
}

.g912-internal-link {
  color: var(--g912-primary);
  text-decoration: none;
  transition: var(--g912-transition);
}

.g912-internal-link:hover {
  text-decoration: underline;
}

/* ===== Promo Buttons in Cards ===== */
.g912-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--g912-accent), #e87272);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 0.6rem;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--g912-transition);
  border: none;
  margin: 0.5rem 0.3rem;
}

.g912-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(205, 92, 92, 0.5);
}

/* ===== Footer ===== */
.g912-footer {
  background: linear-gradient(135deg, var(--g912-bg-dark), var(--g912-bg));
  padding: 2rem 1rem;
  border-top: 1px solid var(--g912-border);
  text-align: center;
}

.g912-footer p {
  font-size: 1.2rem;
  color: rgba(224, 255, 255, 0.7);
  line-height: 1.6rem;
  margin: 0.3rem 0;
}

.g912-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.g912-footer-links a {
  color: var(--g912-primary);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.3rem 0.6rem;
  transition: var(--g912-transition);
}

.g912-footer-links a:hover {
  color: var(--g912-accent);
}

.g912-footer-promo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.g912-copyright {
  font-size: 1.1rem;
  color: rgba(224, 255, 255, 0.5);
  margin-top: 1rem;
}

/* ===== Bottom Navigation ===== */
.g912-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: linear-gradient(180deg, var(--g912-bg-dark), #0f0f23);
  border-top: 1px solid var(--g912-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 0.3rem;
  box-sizing: border-box;
}

.g912-bottom-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 54px;
  background: none;
  border: none;
  color: rgba(135, 206, 250, 0.6);
  cursor: pointer;
  transition: var(--g912-transition);
  padding: 0.3rem;
  text-decoration: none;
  position: relative;
}

.g912-bottom-btn:hover,
.g912-bottom-btn:focus {
  color: var(--g912-primary);
  transform: scale(1.1);
}

.g912-bottom-btn .g912-nav-icon {
  font-size: 22px;
  margin-bottom: 0.2rem;
}

.g912-bottom-btn .g912-nav-label {
  font-size: 1rem;
  line-height: 1.2rem;
}

.g912-bottom-btn.g912-active {
  color: var(--g912-accent);
}

.g912-bottom-btn.g912-active .g912-nav-icon {
  filter: drop-shadow(0 0 6px rgba(205, 92, 92, 0.5));
}

/* ===== Helpers ===== */
.g912-text-center { text-align: center; }
.g912-mt-1 { margin-top: 1rem; }
.g912-mt-2 { margin-top: 2rem; }
.g912-mb-1 { margin-bottom: 1rem; }
.g912-mb-2 { margin-bottom: 2rem; }

.g912-highlight {
  color: var(--g912-accent);
  font-weight: 600;
}

/* ===== Desktop Override ===== */
@media (min-width: 769px) {
  .g912-bottom-nav {
    display: none;
  }
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 360px) {
  .g912-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
