/* 777 Pinas Mobile-First Design System */
/* Colors: #FFFFBA, #FFDFBA, #F5F5F5, #FFF8DC, #2D2D2D, #C9C9FF */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  color: #2D2D2D;
  background: linear-gradient(135deg, #FFF8DC 0%, #F5F5F5 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container System */
.g7d9-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

.g7d9-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 8rem; /* Bottom nav space */
}

/* Typography */
.g7d9-h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: #2D2D2D;
  margin-bottom: 1.5rem;
}

.g7d9-h2 {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.3;
  color: #2D2D2D;
  margin-bottom: 1.2rem;
}

.g7d9-h3 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.4;
  color: #2D2D2D;
  margin-bottom: 1rem;
}

.g7d9-h4 {
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.4;
  color: #2D2D2D;
  margin-bottom: 0.8rem;
}

/* Header Navigation */
.g7d9-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #FFFFBA 0%, #FFDFBA 100%);
  box-shadow: 0 2px 12px rgba(45, 45, 45, 0.1);
  z-index: 1001;
  border-bottom: 2px solid #C9C9FF;
}

.g7d9-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  min-height: 5.6rem;
}

.g7d9-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 2rem;
  font-weight: 700;
  color: #2D2D2D;
}

.g7d9-logo-img {
  width: 3.2rem;
  height: 3.2rem;
  margin-right: 0.8rem;
  border-radius: 0.4rem;
}

.g7d9-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.g7d9-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  border-radius: 0.8rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  min-height: 4.4rem; /* Touch-friendly */
  min-width: 4.4rem;
  user-select: none;
}

.g7d9-btn-primary {
  background: linear-gradient(135deg, #C9C9FF 0%, #FFFFBA 100%);
  color: #2D2D2D;
  border: 2px solid transparent;
}

.g7d9-btn-primary:hover,
.g7d9-btn-primary:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 201, 255, 0.3);
}

.g7d9-btn-secondary {
  background: transparent;
  color: #2D2D2D;
  border: 2px solid #C9C9FF;
}

.g7d9-btn-secondary:hover,
.g7d9-btn-secondary:active {
  background: #C9C9FF;
  transform: translateY(-1px);
}

.g7d9-btn-sm {
  padding: 0.8rem 1.6rem;
  font-size: 1.4rem;
  min-height: 3.6rem;
}

/* Promotional Buttons */
.g7d9-promo-btn {
  background: linear-gradient(135deg, #FFFFBA 0%, #C9C9FF 50%, #FFDFBA 100%);
  color: #2D2D2D;
  font-weight: 700;
  font-size: 1.8rem;
  padding: 1.6rem 3.2rem;
  border-radius: 1.2rem;
  box-shadow: 0 4px 16px rgba(255, 255, 186, 0.3);
  border: 3px solid #C9C9FF;
  position: relative;
  overflow: hidden;
}

.g7d9-promo-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: transform 0.5s;
  transform: translateX(-100%);
}

.g7d9-promo-btn:hover::before,
.g7d9-promo-btn:active::before {
  transform: translateX(100%);
}

.g7d9-promo-btn:hover,
.g7d9-promo-btn:active {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(255, 255, 186, 0.4);
}

/* Hamburger Menu */
.g7d9-hamburger {
  display: flex;
  flex-direction: column;
  width: 3rem;
  height: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  justify-content: space-around;
  align-items: center;
}

.g7d9-hamburger span {
  width: 2rem;
  height: 0.3rem;
  background: #2D2D2D;
  border-radius: 0.15rem;
  transition: all 0.3s ease;
}

.g7d9-hamburger.g7d9-active span:nth-child(1) {
  transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.g7d9-hamburger.g7d9-active span:nth-child(2) {
  opacity: 0;
}

.g7d9-hamburger.g7d9-active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.5rem, -0.5rem);
}

/* Mobile Menu */
.g7d9-mobile-menu {
  position: fixed;
  top: 5.6rem;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #FFFFBA 0%, #FFF8DC 100%);
  transform: translateY(-100%);
  transition: all 0.3s ease;
  z-index: 1000;
  border-bottom: 2px solid #C9C9FF;
  box-shadow: 0 4px 12px rgba(45, 45, 45, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.g7d9-mobile-menu.g7d9-active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.g7d9-menu-list {
  list-style: none;
  padding: 1rem 0;
}

.g7d9-menu-item {
  border-bottom: 1px solid rgba(201, 201, 255, 0.3);
}

.g7d9-menu-item:last-child {
  border-bottom: none;
}

.g7d9-nav-link {
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  color: #2D2D2D;
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.g7d9-nav-link:hover,
.g7d9-nav-link.g7d9-active {
  background: linear-gradient(90deg, #C9C9FF, #FFDFBA);
  color: #2D2D2D;
}

.g7d9-nav-link i {
  margin-right: 1rem;
  width: 2rem;
  text-align: center;
  color: #C9C9FF;
}

/* Menu Overlay */
.g7d9-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 45, 45, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}

.g7d9-menu-overlay.g7d9-active {
  opacity: 1;
  visibility: visible;
}

/* Main Content */
.g7d9-main {
  flex: 1;
  padding: 0;
  margin-top: 5.6rem;
}

/* Cards */
.g7d9-card {
  background: linear-gradient(145deg, #F5F5F5 0%, #FFF8DC 100%);
  border-radius: 1.2rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(45, 45, 45, 0.1);
  border: 1px solid rgba(201, 201, 255, 0.2);
}

.g7d9-card-header {
  margin-bottom: 1.5rem;
}

/* Game Grid */
.g7d9-games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.g7d9-game-item {
  background: linear-gradient(135deg, #FFFFBA 0%, #FFDFBA 100%);
  border-radius: 1.2rem;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid #C9C9FF;
  opacity: 0;
  transform: translateY(2rem);
}

.g7d9-game-item.g7d9-animate-in {
  opacity: 1;
  transform: translateY(0);
  animation: g7d9-slide-up 0.6s ease-out;
}

.g7d9-game-item:hover,
.g7d9-game-item:active {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(201, 201, 255, 0.3);
}

.g7d9-game-img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  border-bottom: 2px solid #C9C9FF;
}

.g7d9-game-name {
  display: block;
  padding: 1.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: #2D2D2D;
  text-align: center;
  line-height: 1.2;
}

/* Grid System */
.g7d9-grid {
  display: grid;
  gap: 1.5rem;
}

.g7d9-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.g7d9-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Spacing Utilities */
.g7d9-mb-sm { margin-bottom: 1rem; }
.g7d9-mb-md { margin-bottom: 2rem; }
.g7d9-mb-lg { margin-bottom: 3rem; }
.g7d9-mb-xl { margin-bottom: 4rem; }

.g7d9-mt-sm { margin-top: 1rem; }
.g7d9-mt-md { margin-top: 2rem; }
.g7d9-mt-lg { margin-top: 3rem; }

.g7d9-p-sm { padding: 1rem; }
.g7d9-p-md { padding: 2rem; }
.g7d9-p-lg { padding: 3rem; }

/* Text Utilities */
.g7d9-text-center { text-align: center; }
.g7d9-text-left { text-align: left; }
.g7d9-text-right { text-align: right; }

.g7d9-text-primary { color: #FFFFBA; }
.g7d9-text-secondary { color: #C9C9FF; }
.g7d9-text-dark { color: #2D2D2D; }
.g7d9-text-light { color: #F5F5F5; }

/* Bottom Navigation */
.g7d9-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #FFFFBA 0%, #FFDFBA 100%);
  border-top: 2px solid #C9C9FF;
  z-index: 999;
  box-shadow: 0 -2px 12px rgba(45, 45, 45, 0.1);
}

.g7d9-bottom-nav-container {
  max-width: 430px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.g7d9-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  text-decoration: none;
  color: #2D2D2D;
  transition: all 0.3s ease;
  min-height: 6rem;
  position: relative;
}

.g7d9-bottom-nav-item:hover,
.g7d9-bottom-nav-item.g7d9-active {
  color: #C9C9FF;
  background: rgba(201, 201, 255, 0.1);
}

.g7d9-bottom-nav-item.g7d9-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 0.3rem;
  background: #C9C9FF;
  border-radius: 0 0 0.15rem 0.15rem;
}

.g7d9-bottom-nav-item i,
.g7d9-bottom-nav-item ion-icon {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.g7d9-bottom-nav-text {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
}

/* Footer */
.g7d9-footer {
  background: linear-gradient(135deg, #2D2D2D 0%, #1A1A1A 100%);
  color: #F5F5F5;
  padding: 3rem 0 10rem;
  margin-top: auto;
}

.g7d9-footer-content {
  padding: 0 1.5rem;
}

.g7d9-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.g7d9-footer-link {
  color: #F5F5F5;
  text-decoration: none;
  font-size: 1.4rem;
  padding: 0.8rem;
  border-radius: 0.4rem;
  transition: all 0.3s ease;
  text-align: center;
}

.g7d9-footer-link:hover {
  background: rgba(201, 201, 255, 0.1);
  color: #C9C9FF;
}

.g7d9-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 2rem 0;
  align-items: center;
}

.g7d9-partner-img {
  width: 100%;
  height: 4rem;
  object-fit: contain;
  filter: grayscale(1) brightness(1.5);
  transition: all 0.3s ease;
}

.g7d9-partner-img:hover {
  filter: none;
  transform: scale(1.05);
}

.g7d9-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: rgba(245, 245, 245, 0.7);
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 245, 245, 0.2);
}

/* Animations */
@keyframes g7d9-slide-up {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes g7d9-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes g7d9-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes g7d9-toast-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(2rem);
  }
}

/* Loading States */
.g7d9-loading {
  opacity: 0;
  animation: g7d9-fade-in 0.5s ease-out 0.2s forwards;
}

.g7d9-loaded {
  animation: g7d9-fade-in 0.3s ease-out;
}

/* Toast Notification */
.g7d9-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #2D2D2D;
  color: #FFFFBA;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-size: 1.4rem;
  z-index: 10000;
  border: 1px solid #C9C9FF;
  box-shadow: 0 4px 12px rgba(45, 45, 45, 0.3);
}

/* Responsive Design */
@media (max-width: 430px) {
  .g7d9-container {
    padding: 0 1rem;
  }
  
  .g7d9-h1 {
    font-size: 2.4rem;
  }
  
  .g7d9-h2 {
    font-size: 2rem;
  }
  
  .g7d9-games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .g7d9-game-img {
    height: 7rem;
  }
  
  .g7d9-footer-links {
    grid-template-columns: 1fr;
  }
  
  .g7d9-partners {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 360px) {
  .g7d9-nav {
    padding: 0.8rem 1rem;
  }
  
  .g7d9-card {
    padding: 1.5rem;
  }
  
  .g7d9-promo-btn {
    font-size: 1.6rem;
    padding: 1.4rem 2.4rem;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .g7d9-logo-img,
  .g7d9-game-img,
  .g7d9-partner-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .g7d9-card {
    background: linear-gradient(145deg, #1A1A1A 0%, #2D2D2D 100%);
    border-color: rgba(201, 201, 255, 0.1);
    color: #F5F5F5;
  }
  
  .g7d9-h1, .g7d9-h2, .g7d9-h3, .g7d9-h4 {
    color: #F5F5F5;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .g7d9-game-item {
    opacity: 1;
    transform: none;
  }
}