/**
 * PhGames Main Stylesheet
 * All classes use s152- prefix for namespace isolation
 */

/* ===== CSS Variables ===== */
:root {
  --s152-primary: #DC143C;
  --s152-secondary: #CD853F;
  --s152-accent: #F4A460;
  --s152-light: #FFB6C1;
  --s152-bg: #0F0F23;
  --s152-bg-dark: #0a0a18;
  --s152-text: #ffffff;
  --s152-text-muted: #b0b0c0;
  --s152-border: #2a2a40;
  --s152-shadow: rgba(220, 20, 60, 0.3);
  --s152-radius: 12px;
  --s152-radius-sm: 8px;
  --s152-transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
  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, Oxygen, Ubuntu, sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  background-color: var(--s152-bg);
  color: var(--s152-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Container ===== */
.s152-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 16px;
}

.s152-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.s152-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, var(--s152-bg-dark) 0%, var(--s152-bg) 100%);
  border-bottom: 2px solid var(--s152-primary);
  z-index: 1000;
  transition: var(--s152-transition);
}

.s152-header-hidden {
  transform: translateY(-100%);
}

.s152-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 16px;
}

.s152-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--s152-text);
}

.s152-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.s152-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--s152-primary), var(--s152-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.s152-header-buttons {
  display: flex;
  gap: 8px;
}

.s152-header-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--s152-radius-sm);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--s152-transition);
}

.s152-btn-register {
  background: linear-gradient(135deg, var(--s152-primary), var(--s152-secondary));
  color: var(--s152-text);
}

.s152-btn-login {
  background: transparent;
  color: var(--s152-text);
  border: 1px solid var(--s152-primary) !important;
}

.s152-header-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--s152-shadow);
}

.s152-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--s152-text);
  cursor: pointer;
  font-size: 2rem;
}

/* ===== Mobile Menu ===== */
.s152-mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 15, 35, 0.98);
  backdrop-filter: blur(10px);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.s152-menu-open {
  transform: translateX(0);
}

.s152-menu-list {
  list-style: none;
  padding: 20px 0;
}

.s152-menu-item {
  border-bottom: 1px solid var(--s152-border);
}

.s152-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: var(--s152-text);
  text-decoration: none;
  font-size: 1.6rem;
  transition: var(--s152-transition);
}

.s152-menu-link:hover {
  background: rgba(220, 20, 60, 0.1);
  color: var(--s152-primary);
}

.s152-menu-link.s152-active {
  color: var(--s152-primary);
  background: rgba(220, 20, 60, 0.15);
}

.s152-menu-icon {
  width: 24px;
  text-align: center;
}

.s152-no-scroll {
  overflow: hidden;
}

/* ===== Main Content ===== */
.s152-main {
  padding-top: 80px;
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .s152-main {
    padding-bottom: 20px;
  }
}

/* ===== Carousel ===== */
.s152-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  margin-bottom: 24px;
  border-radius: var(--s152-radius);
  overflow: hidden;
  box-shadow: 0 8px 24px var(--s152-shadow);
}

.s152-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.s152-carousel-slide.s152-active {
  opacity: 1;
}

.s152-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s152-carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(15, 15, 35, 0.9));
}

.s152-carousel-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--s152-text);
  margin-bottom: 8px;
}

.s152-carousel-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--s152-primary), var(--s152-secondary));
  color: var(--s152-text);
  text-decoration: none;
  border-radius: var(--s152-radius-sm);
  font-weight: 600;
  transition: var(--s152-transition);
}

.s152-carousel-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--s152-shadow);
}

/* ===== Section ===== */
.s152-section {
  margin-bottom: 32px;
}

.s152-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--s152-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.s152-section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--s152-primary), var(--s152-secondary));
  border-radius: 2px;
}

.s152-section-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--s152-secondary);
  margin-bottom: 12px;
}

/* ===== Game Grid ===== */
.s152-game-category {
  margin-bottom: 40px;
}

.s152-category-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--s152-text);
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.15), rgba(205, 133, 63, 0.1));
  border-left: 4px solid var(--s152-primary);
  border-radius: var(--s152-radius-sm);
}

.s152-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.s152-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--s152-transition);
}

.s152-game-item:hover {
  transform: scale(1.05);
}

.s152-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--s152-radius-sm);
  margin-bottom: 6px;
  background: var(--s152-bg-dark);
  border: 1px solid var(--s152-border);
}

.s152-game-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--s152-text);
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* ===== Cards ===== */
.s152-card {
  background: var(--s152-bg-dark);
  border: 1px solid var(--s152-border);
  border-radius: var(--s152-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.s152-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--s152-text);
  margin-bottom: 12px;
}

.s152-card-text {
  font-size: 1.4rem;
  color: var(--s152-text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ===== Buttons ===== */
.s152-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--s152-primary), var(--s152-secondary));
  color: var(--s152-text);
  text-decoration: none;
  border: none;
  border-radius: var(--s152-radius);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--s152-transition);
}

.s152-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px var(--s152-shadow);
}

.s152-btn-outline {
  background: transparent;
  border: 2px solid var(--s152-primary);
}

.s152-btn-outline:hover {
  background: rgba(220, 20, 60, 0.15);
}

/* ===== Links ===== */
.s152-link {
  color: var(--s152-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--s152-transition);
}

.s152-link:hover {
  color: var(--s152-secondary);
  text-decoration: underline;
}

/* ===== FAQ ===== */
.s152-faq-item {
  background: var(--s152-bg-dark);
  border: 1px solid var(--s152-border);
  border-radius: var(--s152-radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.s152-faq-question {
  padding: 16px;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--s152-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.s152-faq-answer {
  padding: 0 16px 16px;
  font-size: 1.3rem;
  color: var(--s152-text-muted);
  line-height: 1.6;
}

/* ===== Footer ===== */
.s152-footer {
  background: var(--s152-bg-dark);
  border-top: 2px solid var(--s152-primary);
  padding: 32px 0;
  margin-top: 40px;
}

.s152-footer-content {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 16px;
}

.s152-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.s152-footer-link {
  color: var(--s152-text-muted);
  text-decoration: none;
  font-size: 1.3rem;
  transition: var(--s152-transition);
}

.s152-footer-link:hover {
  color: var(--s152-primary);
}

.s152-footer-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.s152-partner-logo {
  width: 60px;
  height: 30px;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--s152-transition);
}

.s152-partner-logo:hover {
  opacity: 1;
}

.s152-footer-text {
  font-size: 1.2rem;
  color: var(--s152-text-muted);
  text-align: center;
  line-height: 1.6;
}

.s152-footer-copy {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--s152-border);
  text-align: center;
  font-size: 1.2rem;
  color: var(--s152-text-muted);
}

/* ===== Bottom Navigation ===== */
.s152-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(180deg, var(--s152-bg-dark) 0%, var(--s152-bg) 100%);
  border-top: 2px solid var(--s152-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

@media (min-width: 769px) {
  .s152-bottom-nav {
    display: none;
  }
}

.s152-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--s152-transition);
  text-decoration: none;
}

.s152-nav-item:hover {
  transform: scale(1.1);
}

.s152-nav-item.s152-active .s152-nav-icon {
  color: var(--s152-primary);
}

.s152-nav-icon {
  font-size: 24px;
  color: var(--s152-text-muted);
  margin-bottom: 4px;
  transition: var(--s152-transition);
}

.s152-nav-text {
  font-size: 10px;
  color: var(--s152-text-muted);
  font-weight: 500;
}

.s152-nav-item.s152-active .s152-nav-text {
  color: var(--s152-primary);
}

/* ===== Promotional Links ===== */
.s152-promo-link {
  color: var(--s152-primary);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--s152-transition);
}

.s152-promo-link:hover {
  color: var(--s152-secondary);
  text-decoration: underline;
}

.s152-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--s152-primary), var(--s152-secondary));
  color: var(--s152-text);
  text-decoration: none;
  border: none;
  border-radius: var(--s152-radius);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--s152-transition);
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.4);
}

.s152-promo-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(220, 20, 60, 0.6);
}

/* ===== Utility Classes ===== */
.s152-text-center {
  text-align: center;
}

.s152-mb-1 {
  margin-bottom: 8px;
}

.s152-mb-2 {
  margin-bottom: 16px;
}

.s152-mb-3 {
  margin-bottom: 24px;
}

.s152-mt-1 {
  margin-top: 8px;
}

.s152-mt-2 {
  margin-top: 16px;
}

.s152-mt-3 {
  margin-top: 24px;
}
