/**
 * 9777 dbt - Core Stylesheet
 * All classes use prefix: pg87-
 * Color palette: #DEB887 #1A1A1A #FAF0E6 #E9ECEF #BC8F8F #98FB98
 */

/* CSS Variables */
:root {
  --pg87-primary: #DEB887;
  --pg87-bg: #1A1A1A;
  --pg87-text: #FAF0E6;
  --pg87-surface: #2A2A2A;
  --pg87-accent: #BC8F8F;
  --pg87-success: #98FB98;
  --pg87-border: #3A3A3A;
  --pg87-muted: #E9ECEF;
  --pg87-font-size: 62.5%;
}

/* Reset & Base */
html { font-size: var(--pg87-font-size); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--pg87-bg);
  color: var(--pg87-text);
  line-height: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--pg87-primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.pg87-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #1A1A1A 0%, #2D2520 100%);
  border-bottom: 2px solid var(--pg87-primary);
  max-width: 430px;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pg87-logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pg87-logo-area img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}
.pg87-logo-area span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pg87-primary);
  letter-spacing: 0.5px;
}
.pg87-header-btns {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.pg87-btn-register {
  background: linear-gradient(135deg, var(--pg87-primary), #C4A265);
  color: var(--pg87-bg);
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pg87-btn-register:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(222,180,135,0.4); }
.pg87-btn-login {
  background: transparent;
  color: var(--pg87-primary);
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--pg87-primary);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}
.pg87-btn-login:hover { background: rgba(222,180,135,0.15); }
.pg87-menu-toggle {
  background: none;
  border: none;
  color: var(--pg87-primary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

/* Mobile Menu */
.pg87-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
}
.pg87-overlay-active { display: block; }
.pg87-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #1E1E1E;
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}
.pg87-menu-active { right: 0; }
.pg87-menu-close {
  background: none;
  border: none;
  color: var(--pg87-primary);
  font-size: 2.4rem;
  cursor: pointer;
  float: right;
  margin-bottom: 1rem;
}
.pg87-mobile-menu nav a {
  display: block;
  padding: 1rem 0;
  font-size: 1.4rem;
  color: var(--pg87-text);
  border-bottom: 1px solid var(--pg87-border);
  transition: color 0.2s, padding-left 0.2s;
}
.pg87-mobile-menu nav a:hover {
  color: var(--pg87-primary);
  padding-left: 0.5rem;
}

/* Main Content */
.pg87-main {
  padding-top: 5.5rem;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .pg87-main { padding-bottom: 8rem; }
}

/* Banner Slider */
.pg87-slider {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.pg87-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: pointer;
}
.pg87-slide img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.pg87-slide-active { opacity: 1; }

/* Section Headings */
.pg87-section {
  padding: 1.5rem 1rem;
}
.pg87-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg87-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pg87-accent);
}
.pg87-section-title i {
  margin-right: 0.5rem;
}

/* Game Grid */
.pg87-cat-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pg87-success);
  margin: 1.5rem 0 0.8rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--pg87-success);
}
.pg87-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.pg87-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0.4rem;
  border-radius: 8px;
  background: var(--pg87-surface);
}
.pg87-game-item:hover { transform: translateY(-2px); }
.pg87-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}
.pg87-game-item span {
  display: block;
  font-size: 1rem;
  color: var(--pg87-text);
  margin-top: 0.3rem;
  line-height: 1.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Info Cards */
.pg87-card {
  background: var(--pg87-surface);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--pg87-border);
}
.pg87-card h3 {
  font-size: 1.5rem;
  color: var(--pg87-primary);
  margin-bottom: 0.8rem;
}
.pg87-card p {
  font-size: 1.3rem;
  line-height: 1.6rem;
  color: var(--pg87-muted);
  margin-bottom: 0.6rem;
}

/* Promo Buttons */
.pg87-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--pg87-primary), #C4A265);
  color: var(--pg87-bg);
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
  margin: 0.5rem 0;
}
.pg87-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(222,180,135,0.5);
}

/* Promo Text Link */
.pg87-promo-link {
  color: var(--pg87-primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}
.pg87-promo-link:hover { color: #F0D090; }

/* Footer */
.pg87-footer {
  background: #111;
  padding: 2rem 1rem 1rem;
  border-top: 2px solid var(--pg87-border);
}
.pg87-footer-brand {
  font-size: 1.3rem;
  color: var(--pg87-muted);
  line-height: 1.6rem;
  margin-bottom: 1rem;
}
.pg87-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.pg87-footer-links a {
  background: var(--pg87-surface);
  color: var(--pg87-text);
  font-size: 1.1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--pg87-border);
  transition: background 0.2s;
}
.pg87-footer-links a:hover { background: var(--pg87-accent); color: var(--pg87-bg); }
.pg87-footer-copy {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  padding-top: 1rem;
  border-top: 1px solid var(--pg87-border);
}

/* Bottom Navigation */
.pg87-bnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #2D2520 0%, #1A1A1A 100%);
  border-top: 2px solid var(--pg87-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  max-width: 430px;
  margin: 0 auto;
}
.pg87-bnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 56px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pg87-muted);
  transition: color 0.2s, transform 0.15s;
  padding: 0.3rem;
  -webkit-tap-highlight-color: transparent;
}
.pg87-bnav-btn:hover,
.pg87-bnav-btn.pg87-bnav-active {
  color: var(--pg87-primary);
  transform: scale(1.08);
}
.pg87-bnav-touch { transform: scale(0.92); }
.pg87-bnav-btn i,
.pg87-bnav-btn .material-icons,
.pg87-bnav-btn ion-icon,
.pg87-bnav-btn bi {
  font-size: 22px;
  margin-bottom: 0.15rem;
}
.pg87-bnav-btn span {
  font-size: 1rem;
  line-height: 1.1rem;
}

/* Utility Classes */
.pg87-container { max-width: 430px; margin: 0 auto; padding: 0 0.5rem; }
.pg87-text-center { text-align: center; }
.pg87-mt-1 { margin-top: 0.5rem; }
.pg87-mt-2 { margin-top: 1rem; }
.pg87-mb-1 { margin-bottom: 0.5rem; }
.pg87-mb-2 { margin-bottom: 1rem; }
.pg87-hidden { display: none; }

/* Responsive */
@media (min-width: 769px) {
  .pg87-bnav { display: none; }
  .pg87-main { padding-bottom: 0; }
}
@media (max-width: 320px) {
  .pg87-game-grid { grid-template-columns: repeat(3, 1fr); }
  .pg87-slider { height: 150px; }
  .pg87-slide img { height: 150px; }
}
