/* ph799 ph Styles - All classes prefixed with g16d- */
:root {
  font-size: 62.5%; /* 10px base for rem calculations */
  --g16d-primary: #00FA9A;
  --g16d-secondary: #20B2AA;
  --g16d-bg: #2E4057;
  --g16d-bg-light: #3a4f6a;
  --g16d-text: #ffffff;
  --g16d-text-muted: #999999;
  --g16d-accent: #DDA0DD;
  --g16d-purple: #BA55D3;
  --g16d-success: #00FA9A;
  --g16d-warning: #DDA0DD;
  --g16d-error: #ff6b6b;
  --g16d-border: rgba(0, 250, 154, 0.2);
  --g16d-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --g16d-radius: 8px;
  --g16d-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--g16d-text);
  background: linear-gradient(135deg, var(--g16d-bg) 0%, var(--g16d-bg-light) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Base Layout */
.g16d-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
  position: relative;
}

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

.g16d-main {
  flex: 1;
  padding-top: 7rem;
  padding-bottom: 8rem;
}

/* Header */
.g16d-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(46, 64, 87, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--g16d-border);
  transition: var(--g16d-transition);
  height: 6rem;
}

.g16d-header.g16d-hidden {
  transform: translateY(-100%);
}

.g16d-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6rem;
  padding: 0 1.6rem;
}

.g16d-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--g16d-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.6rem;
}

.g16d-logo-img {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
}

.g16d-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.g16d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: var(--g16d-radius);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--g16d-transition);
  min-height: 4.4rem;
  min-width: 4.4rem;
}

.g16d-btn-primary {
  background: linear-gradient(135deg, var(--g16d-primary), #00e085);
  color: var(--g16d-bg);
}

.g16d-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--g16d-shadow);
}

.g16d-btn-secondary {
  background: linear-gradient(135deg, var(--g16d-secondary), var(--g16d-purple));
  color: white;
}

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

.g16d-menu-toggle {
  background: none;
  border: none;
  color: var(--g16d-text);
  font-size: 2rem;
  cursor: pointer;
  width: 4.4rem;
  height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.g16d-mobile-menu {
  position: fixed;
  top: 6rem;
  left: 0;
  right: 0;
  background: rgba(46, 64, 87, 0.98);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--g16d-border);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: var(--g16d-transition);
  z-index: 999;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

.g16d-mobile-menu.g16d-active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.g16d-mobile-nav {
  padding: 2rem 1.6rem;
}

.g16d-mobile-nav a {
  display: block;
  padding: 1.2rem 0;
  color: var(--g16d-text);
  text-decoration: none;
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(0, 250, 154, 0.1);
  transition: var(--g16d-transition);
}

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

/* Carousel */
.g16d-carousel {
  position: relative;
  width: 100%;
  height: 20rem;
  overflow: hidden;
  border-radius: var(--g16d-radius);
  margin-bottom: 2rem;
}

.g16d-carousel-track {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.g16d-slide {
  width: 33.333%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

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

.g16d-carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 2rem;
  color: white;
}

.g16d-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.g16d-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(0, 250, 154, 0.3);
  cursor: pointer;
  transition: var(--g16d-transition);
}

.g16d-dot.g16d-active {
  background: var(--g16d-primary);
  transform: scale(1.2);
}

/* Game Grid */
.g16d-game-section {
  margin: 3rem 0;
}

.g16d-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--g16d-text);
  text-align: center;
  position: relative;
}

.g16d-section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 5rem;
  height: 0.3rem;
  background: linear-gradient(135deg, var(--g16d-primary), var(--g16d-secondary));
  border-radius: 0.15rem;
}

.g16d-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.g16d-game-card {
  background: var(--g16d-bg-light);
  border-radius: var(--g16d-radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--g16d-transition);
  border: 1px solid var(--g16d-border);
  position: relative;
  overflow: hidden;
}

.g16d-game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 250, 154, 0.1), transparent);
  transition: left 0.5s;
}

.g16d-game-card:hover::before {
  left: 100%;
}

.g16d-game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--g16d-shadow);
  border-color: var(--g16d-primary);
}

.g16d-game-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--g16d-radius);
  margin-bottom: 0.8rem;
  object-fit: cover;
}

.g16d-game-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--g16d-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.g16d-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--g16d-primary);
}

.g16d-section p {
  margin-bottom: 1rem;
  color: var(--g16d-text-muted);
  line-height: 1.6;
}

.g16d-section ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.g16d-section li {
  margin-bottom: 0.5rem;
  color: var(--g16d-text-muted);
}

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

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

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

.g16d-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--g16d-text);
}

/* Footer */
.g16d-footer {
  background: var(--g16d-bg);
  border-top: 1px solid var(--g16d-border);
  padding: 3rem 0 8rem;
  margin-top: auto;
}

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

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

.g16d-footer-links a {
  color: var(--g16d-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--g16d-transition);
}

.g16d-footer-links a:hover {
  color: var(--g16d-primary);
}

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

.g16d-partner-logo {
  width: 3rem;
  height: 3rem;
  opacity: 0.6;
  transition: var(--g16d-transition);
  border-radius: 0.4rem;
}

.g16d-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

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

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

.g16d-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--g16d-text-muted);
  font-size: 1rem;
  transition: var(--g16d-transition);
  padding: 0.5rem;
  min-width: 4.4rem;
  min-height: 4.4rem;
  justify-content: center;
}

.g16d-nav-item:hover,
.g16d-nav-item.g16d-active {
  color: var(--g16d-primary);
  transform: translateY(-2px);
}

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

/* Animations */
@keyframes g16d-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.g16d-fade-in {
  animation: g16d-fadeIn 0.6s ease-out;
}

/* Toast Notifications */
.g16d-toast {
  position: fixed;
  top: 8rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--g16d-bg-light);
  color: var(--g16d-text);
  padding: 1.2rem 2rem;
  border-radius: var(--g16d-radius);
  border: 1px solid var(--g16d-border);
  box-shadow: var(--g16d-shadow);
  z-index: 1001;
  opacity: 0;
  transition: var(--g16d-transition);
}

.g16d-toast.g16d-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.g16d-toast-success {
  border-color: var(--g16d-success);
  background: rgba(0, 250, 154, 0.1);
}

.g16d-toast-error {
  border-color: var(--g16d-error);
  background: rgba(255, 107, 107, 0.1);
}

/* Responsive Design */
@media (max-width: 375px) {
  .g16d-container {
    padding: 0 1.2rem;
  }
  
  .g16d-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  
  .g16d-game-icon {
    width: 3.5rem;
    height: 3.5rem;
  }
  
  .g16d-game-name {
    font-size: 1rem;
  }
}

@media (min-width: 431px) {
  .g16d-container {
    max-width: 430px;
  }
}

/* Utility Classes */
.g16d-text-center { text-align: center; }
.g16d-text-left { text-align: left; }
.g16d-text-right { text-align: right; }
.g16d-mb-1 { margin-bottom: 1rem; }
.g16d-mb-2 { margin-bottom: 2rem; }
.g16d-mb-3 { margin-bottom: 3rem; }
.g16d-mt-1 { margin-top: 1rem; }
.g16d-mt-2 { margin-top: 2rem; }
.g16d-mt-3 { margin-top: 3rem; }
.g16d-p-1 { padding: 1rem; }
.g16d-p-2 { padding: 2rem; }
.g16d-hidden { display: none; }
.g16d-flex { display: flex; }
.g16d-flex-center { display: flex; align-items: center; justify-content: center; }
.g16d-gap-1 { gap: 1rem; }
.g16d-gap-2 { gap: 2rem; }

/* Loading States */
.g16d-lazy {
  opacity: 0.6;
  filter: blur(2px);
  transition: var(--g16d-transition);
}

.g16d-lazy:not([src]) {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: g16d-loading 1.5s infinite;
}

@keyframes g16d-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}