/* Base styles */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll */
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../images/bg.png") center/cover no-repeat;
  z-index: -1;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Layout container */
#app {
  margin: 0 auto;
}

/* Common styles */
.section {
  margin: 14px 10px;
}

.banner {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.tip-box {
  border: 1px solid #9496a3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 14px 10px;
  text-align: center;
  line-height: 1.6;
}

.tip-box .big {
  font-size: 22px;
  font-weight: 700;
}
.tip-box div {
  margin-bottom:10px ;
}
.card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.card h2 {
  margin: 8px 0 6px;
  font-size: 18px;
  text-align: center;
}

.divider {
  height: 1px;
  background: #9496a3;
  border: 0;
  margin: 6px 0 12px;
}

/* Grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.grid-item {
  text-align: center;
  text-decoration: none;
  color: #222;
  transition: transform .08s ease;
}

.grid-item:active {
  transform: scale(0.97);
}

.grid-item img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #eee;
  display: block;
  margin: 0 auto 8px;
  background: #f5f5f5;
}

.grid-item span {
  display: block;
  font-size: 13px;
}

/* Two-column layout */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.row-2 a {
  text-decoration: none;
  color: #222;
  text-align: center;
}

.row-2 img {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  display: block;
  margin: 0 auto 8px;
  object-fit: cover;
  background: #f5f5f5;
}

.white-img {
  width: 100%;
  display: block;
  background: #fff;
  border-radius: 8px;
}

.footer {
  text-align: center;
  font-size: 12px;
  color: #333;
  padding: 16px 0 24px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Page specific styles (from page.css) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  padding: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0 0 12px 12px;
}

.back-btn {
  display: inline-block;
  background: #000;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  text-decoration: none;
}

.wrap {
  padding: 14px 10px;
}

.title-big {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  margin: 16px 0 8px;
  color: #222;
}

.title-sub {
  text-align: center;
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

.full-img {
  width: 100%;
  display: block;
  border-radius: 8px;
  background: #f5f5f5;
}

/* Responsive design */
/* Mobile: 100% width, no horizontal scroll */
@media (max-width: 767.98px) {
  html, body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  #app {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }
  
  body {
    touch-action: pan-y; /* Allow vertical scroll, prevent horizontal */
  }
  
  /* Ensure all content fits within viewport */
  .section {
    margin: 14px 0;
  }
  
  .banner, .white-img, .full-img {
    max-width: 100%;
    height: auto;
  }
  
  /* Prevent any element from causing horizontal overflow */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Desktop: 80% width */
@media (min-width: 768px) {
  #app {
    width: 80%;
    max-width: 1200px; /* Optional: set a max-width for very large screens */
  }
}


