/**
 * OKGames Main Stylesheet
 * @version 1.0.0
 * @description Mobile-first responsive design for OKGames
 */

/* CSS Variables */
:root {
  --pg1b-dark: #0C0C0C;
  --pg1b-green: #008000;
  --pg1b-lime: #7FFF00;
  --pg1b-gray: #A9A9A9;
  --pg1b-light: #ECF0F1;
  --pg1b-text: #ECF0F1;
  --pg1b-bg: #0C0C0C;
  --pg1b-card-bg: #1a1a1a;
  --pg1b-border: #2a2a2a;
  --pg1b-overlay: rgba(12, 12, 12, 0.95);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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.5;
  color: var(--pg1b-text);
  background-color: var(--pg1b-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.pg1b-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.pg1b-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--pg1b-overlay);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 2px solid var(--pg1b-green);
}

.pg1b-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.pg1b-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg1b-lime);
  font-size: 1.8rem;
  font-weight: 700;
}

.pg1b-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.pg1b-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.pg1b-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pg1b-btn-primary {
  background: linear-gradient(135deg, var(--pg1b-green), #00a000);
  color: white;
}

.pg1b-btn-secondary {
  background: linear-gradient(135deg, var(--pg1b-gray), #888888);
  color: var(--pg1b-dark);
}

.pg1b-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(127, 255, 0, 0.3);
}

/* Menu Toggle */
.pg1b-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.pg1b-menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--pg1b-lime);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.pg1b-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pg1b-menu-overlay.pg1b-overlay-show {
  display: block;
  opacity: 1;
}

/* Mobile Menu */
.pg1b-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--pg1b-overlay);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 2rem 0;
}

.pg1b-mobile-menu.pg1b-menu-open {
  right: 0;
}

.pg1b-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--pg1b-lime);
  cursor: pointer;
  padding: 0.5rem;
}

.pg1b-menu-nav {
  padding: 1rem;
}

.pg1b-menu-nav a {
  display: block;
  padding: 1rem;
  color: var(--pg1b-text);
  text-decoration: none;
  border-bottom: 1px solid var(--pg1b-border);
  transition: all 0.3s ease;
  font-size: 1.4rem;
}

.pg1b-menu-nav a:hover {
  background: var(--pg1b-green);
  color: white;
  padding-left: 1.5rem;
}

.pg1b-menu-nav a:last-child {
  border-bottom: none;
}

/* Main Content */
main {
  padding-top: 70px;
  padding-bottom: 80px;
}

/* Carousel */
.pg1b-carousel {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.pg1b-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg1b-carousel-slide.pg1b-slide-active {
  opacity: 1;
}

.pg1b-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section Styles */
.pg1b-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--pg1b-border);
}

.pg1b-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pg1b-lime);
  margin-bottom: 1.5rem;
  text-align: center;
  text-transform: uppercase;
}

.pg1b-section-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--pg1b-green);
  margin-bottom: 1rem;
}

/* Game Grid */
.pg1b-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.pg1b-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--pg1b-text);
  transition: transform 0.3s ease;
}

.pg1b-game-item:hover {
  transform: scale(1.05);
}

.pg1b-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--pg1b-card-bg);
  border: 2px solid var(--pg1b-border);
  transition: border-color 0.3s ease;
}

.pg1b-game-item:hover .pg1b-game-icon {
  border-color: var(--pg1b-lime);
}

.pg1b-game-name {
  font-size: 1rem;
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Component */
.pg1b-card {
  background: var(--pg1b-card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--pg1b-border);
}

.pg1b-card-title {
  font-size: 1.6rem;
  color: var(--pg1b-lime);
  margin-bottom: 1rem;
  font-weight: 600;
}

.pg1b-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--pg1b-gray);
}

.pg1b-card-content p {
  margin-bottom: 1rem;
}

.pg1b-card-content a {
  color: var(--pg1b-lime);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.pg1b-card-content a:hover {
  color: var(--pg1b-green);
  text-decoration: underline;
}

/* List Styles */
.pg1b-list {
  list-style: none;
  padding: 0;
}

.pg1b-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--pg1b-border);
  position: relative;
  padding-left: 2rem;
}

.pg1b-list li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--pg1b-lime);
  font-weight: bold;
}

.pg1b-list li:last-child {
  border-bottom: none;
}

/* CTA Button */
.pg1b-cta-btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 2rem auto;
  padding: 1.2rem 2rem;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(135deg, var(--pg1b-lime), #5cb800);
  color: var(--pg1b-dark);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(127, 255, 0, 0.4);
  transition: all 0.3s ease;
}

.pg1b-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(127, 255, 0, 0.6);
}

/* Bottom Navigation */
.pg1b-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--pg1b-dark) 0%, #1a1a1a 100%);
  border-top: 2px solid var(--pg1b-green);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  max-width: 430px;
  margin: 0 auto;
}

.pg1b-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--pg1b-gray);
  transition: all 0.3s ease;
  cursor: pointer;
}

.pg1b-nav-item:hover,
.pg1b-nav-item.pg1b-nav-active {
  color: var(--pg1b-lime);
}

.pg1b-nav-item:active {
  transform: scale(0.95);
}

.pg1b-nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.pg1b-nav-text {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

/* Footer */
.pg1b-footer {
  background: var(--pg1b-card-bg);
  padding: 3rem 1rem 8rem;
  border-top: 2px solid var(--pg1b-green);
}

.pg1b-footer-description {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--pg1b-gray);
  font-size: 1.3rem;
  line-height: 1.6;
}

.pg1b-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg1b-footer-links a {
  color: var(--pg1b-lime);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--pg1b-green);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.pg1b-footer-links a:hover {
  background: var(--pg1b-green);
  color: white;
}

.pg1b-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg1b-partner-img {
  height: 40px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.pg1b-partner-img:hover {
  opacity: 1;
}

.pg1b-copyright {
  text-align: center;
  color: var(--pg1b-gray);
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* Desktop Responsive */
@media (min-width: 769px) {
  .pg1b-bottom-nav {
    display: none;
  }

  main {
    padding-bottom: 2rem;
  }

  .pg1b-mobile-menu {
    display: none;
  }

  .pg1b-menu-toggle {
    display: none;
  }

  .pg1b-header-content {
    max-width: 100%;
    padding: 1rem 2rem;
  }

  .pg1b-container {
    max-width: 100%;
  }

  .pg1b-carousel {
    max-width: 100%;
  }

  .pg1b-game-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* Utility Classes */
.pg1b-text-center {
  text-align: center;
}

.pg1b-text-lime {
  color: var(--pg1b-lime);
}

.pg1b-text-green {
  color: var(--pg1b-green);
}

.pg1b-mt-1 { margin-top: 1rem; }
.pg1b-mt-2 { margin-top: 2rem; }
.pg1b-mb-1 { margin-bottom: 1rem; }
.pg1b-mb-2 { margin-bottom: 2rem; }

/* Icon Libraries */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://cdn.jsdelivr.net/npm/ionicons@5.5.2/dist/css/ionicons.min.css');
