/**
 * gamph Main Stylesheet
 * Mobile-first responsive design for gamph.click
 * All classes use va91- prefix for namespace isolation
 */

/* CSS Variables for theme */
:root {
  --va91-primary: #40E0D0;
  --va91-primary-dark: #2BC4B5;
  --va91-accent: #FFCC33;
  --va91-accent-hover: #FFD54F;
  --va91-bg-dark: #0D1117;
  --va91-bg-darker: #010409;
  --va91-bg-light: #161B22;
  --va91-text: #F0FDFF;
  --va91-text-muted: #8B949E;
  --va91-border: #30363D;
  --va91-shadow: rgba(64, 224, 208, 0.15);
  --va91-overlay: rgba(13, 17, 23, 0.95);
}

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5rem;
  color: var(--va91-text);
  background-color: var(--va91-bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container and wrapper */
.va91-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.va91-wrapper {
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .va91-wrapper {
    padding-bottom: 2rem;
  }
}

/* Header styles */
.va91-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--va91-bg-darker);
  border-bottom: 1px solid var(--va91-border);
  box-shadow: 0 2px 8px var(--va91-shadow);
}

.va91-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.va91-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--va91-text);
  font-size: 1.6rem;
  font-weight: 700;
}

.va91-logo img {
  width: 28px;
  height: 28px;
}

.va91-header-buttons {
  display: flex;
  gap: 0.5rem;
}

.va91-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-height: 36px;
}

.va91-btn-primary {
  background: linear-gradient(135deg, var(--va91-primary) 0%, var(--va91-primary-dark) 100%);
  color: var(--va91-bg-darker);
}

.va91-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(64, 224, 208, 0.3);
}

.va91 btn-secondary {
  background-color: transparent;
  color: var(--va91-primary);
  border: 1px solid var(--va91-primary);
}

.va91-btn-secondary:hover {
  background-color: var(--va91-primary);
  color: var(--va91-bg-darker);
}

/* Mobile menu toggle */
.va91-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--va91-text);
  font-size: 2rem;
  padding: 0;
}

@media (min-width: 769px) {
  .va91-menu-toggle {
    display: none;
  }
}

/* Mobile menu */
.va91-mobile-menu {
  position: fixed;
  top: 56px;
  left: -100%;
  width: 100%;
  height: calc(100vh - 56px);
  background-color: var(--va91-overlay);
  backdrop-filter: blur(10px);
  transition: left 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
}

.va91-mobile-menu.va91-menu-open {
  left: 0;
}

.va91-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.va91-menu-overlay.va91-overlay-active {
  opacity: 1;
  visibility: visible;
}

.va91-menu-nav {
  padding: 1rem;
}

.va91-menu-link {
  display: block;
  padding: 1rem;
  color: var(--va91-text);
  text-decoration: none;
  border-bottom: 1px solid var(--va91-border);
  font-size: 1.4rem;
  transition: background-color 0.2s ease;
}

.va91-menu-link:hover {
  background-color: var(--va91-bg-light);
  color: var(--va91-primary);
}

.va91-menu-link:last-child {
  border-bottom: none;
}

/* Main content */
.va91-main {
  margin-top: 56px;
  padding: 1rem 0;
}

@media (min-width: 769px) {
  .va91-main {
    margin-top: 56px;
  }
}

/* Carousel */
.va91-carousel {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.va91-carousel-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* Card styles */
.va91-card {
  background-color: var(--va91-bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--va91-border);
}

.va91-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--va91-primary);
  margin-bottom: 1rem;
}

.va91-card-text {
  color: var(--va91-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Grid layouts */
.va91-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}

.va91-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.va91-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Game item */
.va91-game-item {
  display: block;
  text-decoration: none;
  color: var(--va91-text);
  transition: transform 0.2s ease;
}

.va91-game-item:hover {
  transform: scale(1.05);
}

.va91-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background-color: var(--va91-bg-darker);
}

.va91-game-name {
  font-size: 1rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--va91-text);
}

/* Section */
.va91-section {
  margin-bottom: 2rem;
}

.va91-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--va91-text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.va91-section-title .va91-icon {
  color: var(--va91-accent);
}

/* Link styles */
.va91-link {
  color: var(--va91-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.va91-link:hover {
  color: var(--va91-accent);
  text-decoration: underline;
}

/* List styles */
.va91-list {
  list-style: none;
  padding: 0;
}

.va91-list-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--va91-border);
  color: var(--va91-text-muted);
}

.va91-list-item:last-child {
  border-bottom: none;
}

/* Footer */
.va91-footer {
  background-color: var(--va91-bg-darker);
  border-top: 1px solid var(--va91-border);
  padding: 2rem 0 1rem;
  margin-top: 2rem;
}

.va91-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.va91-footer-link {
  color: var(--va91-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.va91-footer-link:hover {
  color: var(--va91-primary);
}

.va91-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.va91-partner-logo {
  width: 60px;
  height: 30px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.va91-partner-logo:hover {
  opacity: 1;
}

.va91-copyright {
  text-align: center;
  color: var(--va91-text-muted);
  font-size: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--va91-border);
}

/* Mobile bottom navigation */
.va91-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, var(--va91-bg-light) 0%, var(--va91-bg-darker) 100%);
  border-top: 2px solid var(--va91-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(64, 224, 208, 0.2);
}

@media (min-width: 769px) {
  .va91-bottom-nav {
    display: none;
  }
}

.va91-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--va91-text-muted);
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem;
}

.va91-nav-item:hover {
  color: var(--va91-primary);
  transform: scale(1.1);
}

.va91-nav-item.active {
  color: var(--va91-primary);
}

.va91-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.va91-nav-text {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/* Icon helper class */
.va91-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Utility classes */
.va91-text-center {
  text-align: center;
}

.va91-mb-1 {
  margin-bottom: 1rem;
}

.va91-mb-2 {
  margin-bottom: 2rem;
}

.va91-mt-1 {
  margin-top: 1rem;
}

.va91-mt-2 {
  margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .va91-container {
    padding: 0 1rem;
  }

  .va91-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 360px) {
  .va91-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .va91-nav-icon {
    font-size: 2rem;
  }
}
