/**
 * Pagtaya Layout Styles
 * All classes use v158- prefix for namespace isolation
 */

/* CSS Variables */
:root {
  --v158-primary: #DB7093;
  --v158-secondary: #A0522D;
  --v158-bg-light: #F0FDFF;
  --v158-bg-gray: #F5F5F5;
  --v158-dark: #141414;
  --v158-white: #FFFFFF;
  --v158-text: #333333;
  --v158-text-light: #666666;
  --v158-border: #E0E0E0;
  --v158-shadow: rgba(0, 0, 0, 0.1);
}

/* 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.6rem;
  line-height: 1.5;
  color: var(--v158-text);
  background-color: var(--v158-bg-gray);
  overflow-x: hidden;
}

/* Container */
.v158-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
  background-color: var(--v158-white);
  min-height: 100vh;
}

/* Header */
.v158-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, var(--v158-primary) 0%, var(--v158-secondary) 100%);
  padding: 1rem;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px var(--v158-shadow);
  transition: transform 0.3s ease;
}

.v158-header.hidden {
  transform: translateX(-50%) translateY(-100%);
}

.v158-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--v158-white);
}

.v158-logo-icon {
  width: 32px;
  height: 32px;
  margin-right: 0.8rem;
}

.v158-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v158-white);
  text-decoration: none;
}

.v158-header-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.v158-btn-header {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border: 2px solid var(--v158-white);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.v158-btn-register {
  background-color: var(--v158-white);
  color: var(--v158-primary);
}

.v158-btn-register:hover {
  background-color: var(--v158-bg-light);
  transform: scale(1.05);
}

.v158-btn-login {
  background-color: transparent;
  color: var(--v158-white);
}

.v158-btn-login:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Mobile Menu Toggle */
.v158-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.v158-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--v158-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.v158-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.v158-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.v158-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.v158-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.v158-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background-color: var(--v158-white);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 5rem 0 2rem;
  box-shadow: -2px 0 10px var(--v158-shadow);
 pointer-events: none;}

.v158-mobile-menu.active {
  right: 0;
}

.v158-mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--v158-text);
  padding: 0.5rem;
}

.v158-mobile-menu-nav {
  list-style: none;
}

.v158-mobile-menu-nav li {
  border-bottom: 1px solid var(--v158-border);
}

.v158-mobile-menu-nav a {
  display: block;
  padding: 1.2rem 2rem;
  color: var(--v158-text);
  text-decoration: none;
  font-size: 1.6rem;
  transition: all 0.3s ease;
}

.v158-mobile-menu-nav a:hover {
  background-color: var(--v158-bg-light);
  color: var(--v158-primary);
  padding-left: 2.5rem;
}

/* Main Content */
.v158-main {
  padding-top: 6rem;
  padding-bottom: 8rem;
  min-height: 100vh;
}

/* Carousel */
.v158-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.v158-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.v158-carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

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

.v158-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem 1.5rem 1rem;
  color: var(--v158-white);
}

.v158-carousel-caption h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.v158-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.v158-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.v158-carousel-dot.active {
  background-color: var(--v158-white);
  width: 20px;
  border-radius: 4px;
}

/* Cards */
.v158-card {
  background-color: var(--v158-white);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px var(--v158-shadow);
}

.v158-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v158-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--v158-bg-light);
}

/* Game Grid */
.v158-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.v158-game-item {
  position: relative;
  background-color: var(--v158-bg-gray);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.v158-game-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px var(--v158-shadow);
}

.v158-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.v158-game-name {
  padding: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--v158-text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: var(--v158-white);
}

/* Buttons */
.v158-btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.v158-btn-primary {
  background: linear-gradient(135deg, var(--v158-primary) 0%, var(--v158-secondary) 100%);
  color: var(--v158-white);
}

.v158-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(219, 112, 147, 0.4);
}

.v158-btn-secondary {
  background-color: var(--v158-bg-light);
  color: var(--v158-primary);
  border: 2px solid var(--v158-primary);
}

.v158-btn-secondary:hover {
  background-color: var(--v158-primary);
  color: var(--v158-white);
}

.v158-btn-block {
  display: block;
  width: 100%;
}

/* Section */
.v158-section {
  padding: 2rem 0;
}

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

/* Footer */
.v158-footer {
  background-color: var(--v158-dark);
  color: var(--v158-white);
  padding: 2rem 1rem;
  text-align: center;
}

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

.v158-footer-links a {
  color: var(--v158-white);
  text-decoration: none;
  font-size: 1.4rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

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

.v158-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.v158-partner img {
  height: 30px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.v158-partner img:hover {
  opacity: 1;
}

.v158-copyright {
  font-size: 1.2rem;
  color: var(--v98-text-light);
}

/* Bottom Navigation */
.v158-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, var(--v158-dark) 0%, #2a2a2a 100%);
  padding: 0.5rem 0;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -2px 10px var(--v158-shadow);
}

@media (min-width: 769px) {
  .v158-bottom-nav {
    display: none;
  }
}

.v158-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--v158-white);
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.v158-nav-item:hover {
  background-color: rgba(219, 112, 147, 0.2);
}

.v158-nav-item.active {
  color: var(--v158-primary);
}

.v158-nav-icon {
  font-size: 24px;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v158-nav-text {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .v158-main {
    padding-bottom: 80px;
  }
}

/* Utility Classes */
.v158-text-center {
  text-align: center;
}

.v158-mt-1 {
  margin-top: 1rem;
}

.v158-mt-2 {
  margin-top: 2rem;
}

.v158-mb-1 {
  margin-bottom: 1rem;
}

.v158-mb-2 {
  margin-bottom: 2rem;
}

.v158-p-1 {
  padding: 1rem;
}

.v158-p-2 {
  padding: 2rem;
}

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

.v158-animate-fadeIn {
  animation: v158-fadeIn 0.5s ease;
}
