/**
 * LovePH Layout Stylesheet
 * All classes prefixed with ui71- to avoid conflicts
 * Color palette: #999999 | #34495E | #008B8B | #48D1CC
 * @version 1.0.0
 */

/* === CSS Variables === */
:root {
  --ui71-dark: #34495E;
  --ui71-darker: #2C3E50;
  --ui71-teal: #008B8B;
  --ui71-teal-light: #48D1CC;
  --ui71-gray: #999999;
  --ui71-light: #E8F4F4;
  --ui71-white: #FFFFFF;
  --ui71-bg: #1A2332;
  --ui71-bg-card: #233040;
  --ui71-text: #E0E8EC;
  --ui71-text-muted: #8A9BAE;
  --ui71-accent: #48D1CC;
  --ui71-accent2: #008B8B;
  --ui71-gold: #F0C040;
  --ui71-border: #2E4052;
  font-size: 62.5%;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--ui71-bg);
  color: var(--ui71-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  -webkit-font-smoothing: antialiased;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

a { color: var(--ui71-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ui71-teal-light); }
img { max-width: 100%; height: auto; display: block; }

/* === Container === */
.ui71-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.ui71-wrapper { padding: 1.6rem 0; }

/* === Header === */
.ui71-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 5.4rem;
  background: linear-gradient(135deg, var(--ui71-darker) 0%, var(--ui71-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  z-index: 1000;
  border-bottom: 2px solid var(--ui71-teal);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.ui71-header-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
}

.ui71-header-brand img { width: 28px; height: 28px; }

.ui71-header-brand span {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ui71-teal-light);
  letter-spacing: 0.5px;
}

.ui71-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ui71-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 0.6rem;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 3.6rem;
  text-decoration: none;
}

.ui71-btn-register {
  background: linear-gradient(135deg, var(--ui71-teal) 0%, var(--ui71-teal-light) 100%);
  color: var(--ui71-darker);
}

.ui71-btn-register:hover { transform: scale(1.05); box-shadow: 0 2px 10px rgba(72,209,204,0.4); }

.ui71-btn-login {
  background: transparent;
  color: var(--ui71-teal-light);
  border: 1.5px solid var(--ui71-teal-light);
}

.ui71-btn-login:hover { background: rgba(72,209,204,0.1); }

.ui71-btn-promo {
  background: linear-gradient(135deg, var(--ui71-gold) 0%, #E0A020 100%);
  color: var(--ui71-darker);
  font-weight: 700;
  padding: 1rem 2rem;
  font-size: 1.5rem;
  border-radius: 0.8rem;
  display: block;
  width: 100%;
  text-align: center;
}

.ui71-btn-promo:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(240,192,64,0.4); }

/* === Menu Toggle === */
.ui71-menu-toggle {
  background: none;
  border: none;
  color: var(--ui71-teal-light);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

/* === Mobile Menu === */
.ui71-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--ui71-bg);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.6rem;
  overflow-y: auto;
  border-left: 2px solid var(--ui71-teal);
}

.ui71-menu-active { right: 0 !important; }

.ui71-menu-close {
  background: none;
  border: none;
  color: var(--ui71-text-muted);
  font-size: 2.4rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.ui71-mobile-menu ul { list-style: none; margin-top: 3rem; }
.ui71-mobile-menu ul li { margin-bottom: 0.4rem; }

.ui71-mobile-menu ul li a {
  display: block;
  padding: 1.2rem 1rem;
  color: var(--ui71-text);
  font-size: 1.5rem;
  border-radius: 0.6rem;
  transition: all 0.2s;
}

.ui71-mobile-menu ul li a:hover {
  background: rgba(72,209,204,0.1);
  color: var(--ui71-teal-light);
}

/* === Overlay === */
.ui71-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ui71-overlay-active { opacity: 1; pointer-events: auto; }

/* === Content spacing for fixed header === */
.ui71-main { padding-top: 6.4rem; }

/* === Carousel === */
.ui71-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: 1.6rem;
}

.ui71-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: pointer;
}

.ui71-slide:first-child { opacity: 1; }
.ui71-slide img { width: 100%; height: 100%; object-fit: cover; }

/* === Section Headings === */
.ui71-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ui71-teal-light);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--ui71-teal);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ui71-section-title .material-icons { font-size: 2.2rem; color: var(--ui71-gold); }

.ui71-h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ui71-teal-light);
  margin: 1.2rem 0 0.8rem;
}

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

.ui71-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  background: var(--ui71-bg-card);
  border-radius: 0.8rem;
  padding: 0.6rem;
  border: 1px solid var(--ui71-border);
}

.ui71-game-item:hover { transform: scale(1.05); border-color: var(--ui71-teal); }

.ui71-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.6rem;
  margin-bottom: 0.4rem;
}

.ui71-game-item span {
  font-size: 1.1rem;
  color: var(--ui71-text-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Category Label === */
.ui71-cat-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ui71-gold);
  margin: 1.6rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* === Card === */
.ui71-card {
  background: var(--ui71-bg-card);
  border-radius: 1rem;
  padding: 1.6rem;
  margin-bottom: 1.6rem;
  border: 1px solid var(--ui71-border);
}

.ui71-card p { color: var(--ui71-text-muted); font-size: 1.4rem; line-height: 2.2rem; }

/* === Features Grid === */
.ui71-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.ui71-feature-item {
  background: var(--ui71-bg-card);
  padding: 1.4rem;
  border-radius: 0.8rem;
  text-align: center;
  border: 1px solid var(--ui71-border);
}

.ui71-feature-item i,
.ui71-feature-item .material-icons {
  font-size: 2.8rem;
  color: var(--ui71-teal-light);
  margin-bottom: 0.8rem;
  display: block;
}

.ui71-feature-item h4 {
  font-size: 1.3rem;
  color: var(--ui71-teal-light);
  margin-bottom: 0.4rem;
}

.ui71-feature-item p { font-size: 1.2rem; color: var(--ui71-text-muted); }

/* === Winners Table === */
.ui71-winners-list { list-style: none; }

.ui71-winners-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--ui71-border);
  font-size: 1.3rem;
}

.ui71-winners-list .ui71-amount { color: var(--ui71-gold); font-weight: 700; }
.ui71-winners-list .ui71-game-name { color: var(--ui71-teal-light); }

/* === Payment Icons === */
.ui71-payment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.ui71-payment-item {
  background: var(--ui71-bg-card);
  padding: 0.8rem 1.4rem;
  border-radius: 0.6rem;
  font-size: 1.3rem;
  color: var(--ui71-text-muted);
  border: 1px solid var(--ui71-border);
}

/* === Testimonials === */
.ui71-testimonial {
  background: var(--ui71-bg-card);
  padding: 1.4rem;
  border-radius: 0.8rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--ui71-teal);
}

.ui71-testimonial p { font-size: 1.3rem; font-style: italic; color: var(--ui71-text-muted); }
.ui71-testimonial cite { font-size: 1.2rem; color: var(--ui71-teal-light); display: block; margin-top: 0.6rem; }

/* === Footer === */
.ui71-footer {
  background: var(--ui71-darker);
  padding: 2rem 1.2rem 8rem;
  margin-top: 2rem;
  border-top: 2px solid var(--ui71-teal);
}

.ui71-footer-brand { color: var(--ui71-text-muted); font-size: 1.3rem; line-height: 2rem; margin-bottom: 1.6rem; }

.ui71-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.ui71-footer-links a {
  background: var(--ui71-bg);
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  color: var(--ui71-text-muted);
  border: 1px solid var(--ui71-border);
  transition: all 0.2s;
}

.ui71-footer-links a:hover { color: var(--ui71-teal-light); border-color: var(--ui71-teal); }

.ui71-footer-copy {
  text-align: center;
  font-size: 1.2rem;
  color: var(--ui71-gray);
  margin-top: 1.2rem;
}

/* === Bottom Navigation === */
.ui71-bnav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: linear-gradient(180deg, var(--ui71-darker) 0%, var(--ui71-bg) 100%);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 2px solid var(--ui71-teal);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
}

.ui71-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(--ui71-text-muted);
  font-size: 1rem;
  gap: 0.2rem;
  transition: all 0.2s;
  padding: 0.4rem;
}

.ui71-bnav-btn i,
.ui71-bnav-btn .material-icons,
.ui71-bnav-btn ion-icon { font-size: 22px; transition: all 0.2s; }

.ui71-bnav-btn span { font-size: 1rem; }

.ui71-bnav-btn:hover,
.ui71-bnav-active {
  color: var(--ui71-teal-light);
}

.ui71-bnav-btn:hover i,
.ui71-bnav-active i,
.ui71-bnav-btn:hover .material-icons,
.ui71-bnav-active .material-icons {
  transform: scale(1.15);
  color: var(--ui71-teal-light);
}

/* === Promo text link === */
.ui71-promo-text {
  color: var(--ui71-teal-light);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.ui71-promo-text:hover { color: var(--ui71-gold); }

/* === Hide bottom nav on desktop === */
@media (min-width: 769px) {
  .ui71-bnav { display: none; }
  .ui71-footer { padding-bottom: 2rem; }
}

/* === Mobile bottom padding for nav === */
@media (max-width: 768px) {
  .ui71-main { padding-bottom: 80px; }
}

/* === Desktop adjustments === */
@media (min-width: 431px) {
  body { border-left: 1px solid var(--ui71-border); border-right: 1px solid var(--ui71-border); }
}

/* === Utility === */
.ui71-text-center { text-align: center; }
.ui71-mt-1 { margin-top: 0.8rem; }
.ui71-mt-2 { margin-top: 1.6rem; }
.ui71-mb-2 { margin-bottom: 1.6rem; }
.ui71-gap-1 { gap: 0.8rem; }
.ui71-hidden { display: none; }
