/* Juan 365 Main CSS - Mobile-First Design */
/* All classes use g9c5- prefix to avoid conflicts */

/* CSS Variables */
:root {
  --g9c5-primary: #98FB98;
  --g9c5-secondary: #9966CC;
  --g9c5-bg: #0E1621;
  --g9c5-bg-light: #1a2332;
  --g9c5-text: #66CDAA;
  --g9c5-text-muted: #98FB98;
  --g9c5-accent: #008000;
  --g9c5-border: #2a3441;
  --g9c5-shadow: rgba(152, 251, 152, 0.2);
  --g9c5-gradient: linear-gradient(135deg, #98FB98, #66CDAA);
  --g9c5-hover: rgba(102, 205, 170, 0.8);
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--g9c5-bg);
  color: var(--g9c5-text);
  line-height: 1.5;
  font-size: 1.4rem;
  overflow-x: hidden;
}

/* Container */
.g9c5-container {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* Header */
.g9c5-header {
  background: var(--g9c5-bg);
  border-bottom: 1px solid var(--g9c5-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.g9c5-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  height: 6rem;
}

.g9c5-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--g9c5-text);
}

.g9c5-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.6rem;
}

.g9c5-logo-text {
  font-size: 2rem;
  font-weight: 700;
  color: var(--g9c5-primary);
}

/* Navigation */
.g9c5-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.g9c5-menu-toggle {
  background: none;
  border: none;
  color: var(--g9c5-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.4rem;
  transition: all 0.2s ease;
}

.g9c5-menu-toggle:hover {
  background: var(--g9c5-bg-light);
  color: var(--g9c5-primary);
}

.g9c5-nav-menu {
  position: fixed;
  top: 6rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--g9c5-bg);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 999;
}

.g9c5-nav-menu.g9c5-active {
  transform: translateX(0);
}

.g9c5-nav-list {
  list-style: none;
  padding: 2rem 0;
}

.g9c5-nav-item {
  border-bottom: 1px solid var(--g9c5-border);
}

.g9c5-nav-link {
  display: block;
  padding: 1.5rem 2rem;
  color: var(--g9c5-text);
  text-decoration: none;
  font-size: 1.6rem;
  transition: all 0.2s ease;
}

.g9c5-nav-link:hover {
  background: var(--g9c5-bg-light);
  color: var(--g9c5-primary);
}

/* Overlay */
.g9c5-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}

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

/* Main Content */
.g9c5-main {
  flex: 1;
  padding-top: 6rem;
  padding-bottom: 8rem;
}

/* Buttons */
.g9c5-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  background: var(--g9c5-gradient);
  color: var(--g9c5-bg);
  text-decoration: none;
  border-radius: 0.8rem;
  font-weight: 600;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 4.4rem;
  gap: 0.8rem;
}

.g9c5-btn:hover {  
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--g9c5-shadow);
}

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

.g9c5-btn-outline:hover {
  background: var(--g9c5-primary);
  color: var(--g9c5-bg);
}

.g9c5-btn-small {
  padding: 0.8rem 1.6rem;
  font-size: 1.2rem;
  min-height: 3.6rem;
}

/* Touch feedback */
.g9c5-touch-active {
  transform: scale(0.98);
  opacity: 0.8;
}

/* Slider/Carousel */
.g9c5-slider {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  margin: 2rem 0;
}

.g9c5-slides-container {
  display: flex;
  transition: transform 0.4s ease;
}

.g9c5-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}

.g9c5-slide img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  display: block;
}

.g9c5-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(14, 22, 33, 0.9));
  padding: 2rem;
  color: var(--g9c5-text);
}

.g9c5-slide-indicators {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.g9c5-slide-indicator {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--g9c5-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.g9c5-slide-indicator.g9c5-active {
  background: var(--g9c5-primary);
  transform: scale(1.2);
}

/* Game Grid */
.g9c5-games-section {
  margin: 3rem 0;
}

.g9c5-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--g9c5-primary);
  margin-bottom: 2rem;
  text-align: center;
}

.g9c5-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.g9c5-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--g9c5-text);
  padding: 1rem;
  border-radius: 1rem;
  background: var(--g9c5-bg-light);
  border: 1px solid var(--g9c5-border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.g9c5-game-item:hover {
  transform: translateY(-2px);
  border-color: var(--g9c5-primary);
  box-shadow: 0 4px 12px var(--g9c5-shadow);
}

.g9c5-game-icon {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 0.8rem;
  object-fit: cover;
  margin-bottom: 0.8rem;
}

.g9c5-game-name {
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}

/* Content Sections */
.g9c5-content-section {
  margin: 4rem 0;
  padding: 3rem 2rem;
  background: var(--g9c5-bg-light);
  border-radius: 1.2rem;
  border: 1px solid var(--g9c5-border);
}

.g9c5-content-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--g9c5-primary);
  margin-bottom: 2rem;
  text-align: center;
}

.g9c5-content-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--g9c5-text);
  margin-bottom: 1.5rem;
}

.g9c5-content-text:last-child {
  margin-bottom: 0;
}

/* FAQ */
.g9c5-faq-item {
  margin-bottom: 2rem;
  border: 1px solid var(--g9c5-border);
  border-radius: 0.8rem;
  overflow: hidden;
}

.g9c5-faq-question {
  background: var(--g9c5-bg-light);
  padding: 1.5rem 2rem;
  font-weight: 600;
  color: var(--g9c5-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.g9c5-faq-answer {
  padding: 1.5rem 2rem;
  color: var(--g9c5-text);
  line-height: 1.6;
}

/* Bottom Navigation */
.g9c5-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--g9c5-bg);
  border-top: 1px solid var(--g9c5-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 6rem;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.g9c5-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.4rem;
  text-decoration: none;
  color: var(--g9c5-text-muted);
  font-size: 1rem;
  min-width: 4.4rem;
  min-height: 4.4rem;
  border-radius: 0.6rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.g9c5-bottom-nav-item:hover,
.g9c5-bottom-nav-item.g9c5-active {
  color: var(--g9c5-primary);
  background: var(--g9c5-bg-light);
}

.g9c5-bottom-nav-icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

.g9c5-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.g9c5-footer {
  background: var(--g9c5-bg-light);
  border-top: 1px solid var(--g9c5-border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.g9c5-footer-content {
  text-align: center;
}

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

.g9c5-footer-link {
  color: var(--g9c5-text-muted);
  text-decoration: none;
  font-size: 1.3rem;
  transition: color 0.2s ease;
}

.g9c5-footer-link:hover {
  color: var(--g9c5-primary);
}

.g9c5-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.g9c5-partner-icon {
  width: 4rem;
  height: 4rem;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all 0.2s ease;
}

.g9c5-partner-icon:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.g9c5-copyright {
  color: var(--g9c5-text-muted);
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* Promo Links */
.g9c5-promo-link {
  color: var(--g9c5-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.g9c5-promo-link:hover {
  border-bottom-color: var(--g9c5-primary);
}

/* Cards */
.g9c5-card {
  background: var(--g9c5-bg-light);
  border: 1px solid var(--g9c5-border);
  border-radius: 1.2rem;
  padding: 2rem;
  margin: 2rem 0;
}

.g9c5-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g9c5-primary);
  margin-bottom: 1.5rem;
}

.g9c5-card-content {
  color: var(--g9c5-text);
  line-height: 1.6;
}

/* Statistics */
.g9c5-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.g9c5-stat-item {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--g9c5-bg-light);
  border-radius: 1rem;
  border: 1px solid var(--g9c5-border);
}

.g9c5-stat-number {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--g9c5-primary);
  display: block;
}

.g9c5-stat-label {
  font-size: 1.2rem;
  color: var(--g9c5-text-muted);
  margin-top: 0.5rem;
}

/* Animations */
@keyframes g9c5-fadeIn {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.g9c5-fade-in {
  animation: g9c5-fadeIn 0.6s ease forwards;
}

/* Responsive Design */
@media (min-width: 768px) {
  .g9c5-bottom-nav {
    display: none;
  }
  
  .g9c5-main {
    padding-bottom: 2rem;
  }
  
  .g9c5-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 2rem;
  }
  
  .g9c5-nav-actions {
    gap: 1.5rem;
  }
  
  .g9c5-menu-toggle {
    display: none;
  }
  
  .g9c5-nav-menu {
    position: static;
    transform: none;
    background: none;
    display: flex;
    align-items: center;
  }
  
  .g9c5-nav-list {
    display: flex;
    padding: 0;
    gap: 2rem;
  }
  
  .g9c5-nav-item {
    border: none;
  }
  
  .g9c5-nav-link {
    padding: 1rem 1.5rem;
    font-size: 1.4rem;
    border-radius: 0.6rem;
  }
  
  .g9c5-overlay {
    display: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --g9c5-border: #4a5568;
    --g9c5-bg-light: #2d3748;
  }
}

/* Print styles */
@media print {
  .g9c5-header,
  .g9c5-bottom-nav,
  .g9c5-menu-toggle,
  .g9c5-btn {
    display: none !important;
  }
  
  .g9c5-main {
    padding-top: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}