/**
 * jilispin Layout Stylesheet
 * @version 1.0.0
 * @description Mobile-first responsive styles for jilispin gaming platform
 */

/* CSS Variables */
:root {
  --pg38-primary: #FF5722;
  --pg38-secondary: #FFDFBA;
  --pg38-accent: #FFB3BA;
  --pg38-neutral: #999999;
  --pg38-dark: #1A1A1A;
  --pg38-darker: #0d0d0d;
  --pg38-light: #FFDFBA;
  --pg38-white: #ffffff;
  --pg38-text: #FFDFBA;
  --pg38-text-muted: #999999;
  --pg38-border: #333333;
  --pg38-shadow: rgba(0, 0, 0, 0.3);
  --pg38-gradient: linear-gradient(135deg, #FF5722 0%, #FF8A65 100%);
  --pg38-radius: 0.8rem;
  --pg38-radius-sm: 0.4rem;
  --pg38-transition: all 0.3s ease;
  --pg38-font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* 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: var(--pg38-font-main);
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--pg38-text);
  background-color: var(--pg38-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.pg38-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.pg38-wrapper {
  padding-bottom: 8rem;
}

/* Header Styles */
.pg38-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--pg38-darker);
  border-bottom: 1px solid var(--pg38-border);
  box-shadow: 0 2px 10px var(--pg38-shadow);
}

.pg38-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 430px;
  margin: 0 auto;
}

.pg38-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg38-text);
  font-size: 1.8rem;
  font-weight: 700;
}

.pg38-logo-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--pg38-radius-sm);
  object-fit: cover;
}

.pg38-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.pg38-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--pg38-radius-sm);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--pg38-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pg38-btn-primary {
  background: var(--pg38-gradient);
  color: var(--pg38-white);
}

.pg38-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}

.pg38-btn-secondary {
  background: transparent;
  color: var(--pg38-primary);
  border: 2px solid var(--pg38-primary);
}

.pg38-btn-secondary:hover {
  background: var(--pg38-primary);
  color: var(--pg38-white);
}

.pg38-hamburger {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.5rem;
  background: transparent;
  border: none;
}

.pg38-hamburger span {
  display: block;
  width: 2.4rem;
  height: 0.3rem;
  background-color: var(--pg38-text);
  border-radius: 0.2rem;
  transition: var(--pg38-transition);
}

.pg38-hamburger-active span:nth-child(1) {
  transform: rotate(45deg) translate(0.6rem, 0.6rem);
}

.pg38-hamburger-active span:nth-child(2) {
  opacity: 0;
}

.pg38-hamburger-active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.6rem, -0.6rem);
}

/* Mobile Menu */
.pg38-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: var(--pg38-darker);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 6rem 2rem 2rem;
  box-shadow: -5px 0 20px var(--pg38-shadow);
}

.pg38-mobile-menu.pg38-menu-open {
  right: 0;
}

.pg38-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--pg38-transition);
}

.pg38-menu-overlay.pg38-overlay-active {
  opacity: 1;
  visibility: visible;
}

.pg38-menu-item {
  display: block;
  padding: 1.2rem 0;
  color: var(--pg38-text);
  text-decoration: none;
  font-size: 1.6rem;
  border-bottom: 1px solid var(--pg38-border);
  transition: var(--pg38-transition);
}

.pg38-menu-item:hover {
  color: var(--pg38-primary);
  padding-left: 1rem;
}

.pg38-menu-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: var(--pg38-text);
  font-size: 2.4rem;
  cursor: pointer;
}

/* Main Content */
.pg38-main {
  padding-top: 7rem;
}

.pg38-section {
  padding: 2.5rem 0;
}

.pg38-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--pg38-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.pg38-section-subtitle {
  font-size: 1.6rem;
  color: var(--pg38-text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

/* Carousel */
.pg38-carousel {
  position: relative;
  width: 100%;
  height: 20rem;
  overflow: hidden;
  border-radius: var(--pg38-radius);
  margin-bottom: 2rem;
}

.pg38-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg38-carousel-slide.pg38-slide-active {
  opacity: 1;
}

.pg38-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg38-carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
}

.pg38-carousel-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--pg38-transition);
}

.pg38-carousel-dot.pg38-dot-active {
  background-color: var(--pg38-primary);
  transform: scale(1.2);
}

/* Game Grid */
.pg38-game-section {
  margin-bottom: 3rem;
}

.pg38-game-category {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--pg38-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pg38-game-category::before {
  content: '';
  width: 0.5rem;
  height: 2rem;
  background: var(--pg38-gradient);
  border-radius: var(--pg38-radius-sm);
}

.pg38-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.pg38-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--pg38-text);
  transition: var(--pg38-transition);
}

.pg38-game-item:hover {
  transform: translateY(-0.5rem);
}

.pg38-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--pg38-radius-sm);
  background: linear-gradient(135deg, var(--pg38-neutral) 0%, var(--pg38-dark) 100%);
}

.pg38-game-name {
  font-size: 1rem;
  text-align: center;
  line-height: 1.3;
  color: var(--pg38-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Content Card */
.pg38-card {
  background: linear-gradient(145deg, var(--pg38-dark) 0%, #252525 100%);
  border-radius: var(--pg38-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--pg38-border);
  box-shadow: 0 4px 20px var(--pg38-shadow);
}

.pg38-card-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--pg38-primary);
  margin-bottom: 1rem;
}

.pg38-card-content {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--pg38-text);
}

.pg38-card-content p {
  margin-bottom: 1rem;
}

.pg38-promo-link {
  color: var(--pg38-primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--pg38-transition);
  cursor: pointer;
}

.pg38-promo-link:hover {
  color: var(--pg38-accent);
  text-decoration: underline;
}

/* FAQ Section */
.pg38-faq-item {
  margin-bottom: 1.5rem;
  border: 1px solid var(--pg38-border);
  border-radius: var(--pg38-radius-sm);
  overflow: hidden;
}

.pg38-faq-question {
  background: linear-gradient(135deg, var(--pg38-neutral) 0%, var(--pg38-dark) 100%);
  padding: 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--pg38-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.pg38-faq-question::after {
  content: '+';
  font-size: 2rem;
  color: var(--pg38-primary);
}

.pg38-faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: var(--pg38-dark);
}

.pg38-faq-item.active .pg38-faq-answer {
  padding: 1.5rem;
  max-height: 500px;
}

.pg38-faq-item.active .pg38-faq-question::after {
  content: '−';
}

/* Feature List */
.pg38-feature-list {
  list-style: none;
}

.pg38-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--pg38-border);
}

.pg38-feature-icon {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  background: var(--pg38-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pg38-white);
  font-size: 1.5rem;
}

.pg38-feature-content {
  flex: 1;
}

.pg38-feature-title {
  font-weight: 600;
  color: var(--pg38-primary);
  margin-bottom: 0.5rem;
}

.pg38-feature-desc {
  font-size: 1.4rem;
  color: var(--pg38-text-muted);
  line-height: 1.6;
}

/* Bottom Navigation */
.pg38-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--pg38-darker) 0%, var(--pg38-dark) 100%);
  border-top: 2px solid var(--pg38-primary);
  box-shadow: 0 -2px 10px var(--pg38-shadow);
  height: 6.4rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.pg38-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--pg38-text-muted);
  min-width: 6rem;
  min-height: 6rem;
  justify-content: center;
  transition: var(--pg38-transition);
  cursor: pointer;
}

.pg38-nav-item:hover,
.pg38-nav-item.pg38-nav-active {
  color: var(--pg38-primary);
  transform: scale(1.1);
}

.pg38-nav-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.pg38-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.pg38-footer {
  background-color: var(--pg38-darker);
  padding: 3rem 0 8rem;
  margin-top: 3rem;
  border-top: 1px solid var(--pg38-border);
}

.pg38-footer-content {
  text-align: center;
  margin-bottom: 2rem;
}

.pg38-footer-description {
  font-size: 1.4rem;
  color: var(--pg38-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.pg38-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg38-footer-link {
  color: var(--pg38-text);
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--pg38-border);
  border-radius: var(--pg38-radius-sm);
  transition: var(--pg38-transition);
}

.pg38-footer-link:hover {
  background: var(--pg38-primary);
  border-color: var(--pg38-primary);
  color: var(--pg38-white);
}

.pg38-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg38-partner-logo {
  width: 5rem;
  height: 3rem;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--pg38-transition);
}

.pg38-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.pg38-copyright {
  text-align: center;
  color: var(--pg38-text-muted);
  font-size: 1.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--pg38-border);
}

/* Typography Utilities */
.pg38-h1 {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--pg38-primary);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.3;
}

.pg38-h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--pg38-text);
  margin-bottom: 1.5rem;
}

.pg38-h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--pg38-primary);
  margin-bottom: 1rem;
}

.pg38-text {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--pg38-text);
  margin-bottom: 1rem;
}

.pg38-text-small {
  font-size: 1.3rem;
  color: var(--pg38-text-muted);
}

/* Desktop Styles */
@media (min-width: 769px) {
  .pg38-bottom-nav {
    display: none;
  }

  .pg38-wrapper {
    padding-bottom: 2rem;
  }

  .pg38-hamburger {
    display: none;
  }

  .pg38-container {
    max-width: 1200px;
  }

  .pg38-game-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* Touch Device Optimizations */
.pg38-touch-device .pg38-btn {
  min-height: 4.4rem;
  min-width: 4.4rem;
}

/* Animation Keyframes */
@keyframes pg38-fadeIn {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pg38-animate-in {
  animation: pg38-fadeIn 0.5s ease forwards;
}
