* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* åŸºç¡€æ ·å¼ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #0c0c0c;
    padding-bottom: 60px; 
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    overflow: hidden;
    background-color: var(--bg-color);
}

.content-area {
    padding: 0;
}


.fixed-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000; 
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.responsive-img.loaded {
    opacity: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes visitButtonPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.floating-service {
    position: fixed;
    right: 15px;
    bottom: 50%;
    transform: translateY(50%);
    z-index: 1001; /* ç¡®ä¿æ˜¾ç¤ºåœ¨bannerä¸Šæ–¹ */
    cursor: pointer;
    transition: all var(--transition-normal);
}

.floating-service:hover {
    transform: translateY(50%) scale(1.05);
}

.floating-service a {
    display: block;
    text-decoration: none;
}

.service-icon {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    animation: pulse 2s infinite ease-in-out;
}


/* iPhone SE, 5, 5S (320px) */
@media only screen and (max-width: 320px) {
    body {
        padding-bottom: 50px;
    }
    .service-icon {
        width: 50px;
    }
    .floating-service {
        right: 10px;
    }
    .overlay-links {
        width: 90%;
        padding: 10px;
    }
    .overlay-links .link-item {
        height: 30px;
    }
    .overlay-links .speed-badge {
        min-width: 40px;
        font-size: 12px;
    }
    .overlay-links .url {
        font-size: 12px;
    }
    .overlay-links .visit-button {
        font-size: 11px;
        padding: 3px 6px;
        width: 60px;
    }
}

/* iPhone 6, 7, 8 (375px) */
@media only screen and (min-width: 321px) and (max-width: 375px) {
    /* å·²ç»é€‚é…è‰¯å¥½ */
}

/* iPhone X, XS, 11 Pro, 12 mini (375px but taller) */
@media only screen and (min-width: 321px) and (max-width: 375px) and (min-height: 812px) {
    body {
        padding-bottom: 65px;
    }
}

/* iPhone 6+, 7+, 8+ (414px) */
@media only screen and (min-width: 376px) and (max-width: 414px) {
    /* å·²ç»é€‚é…è‰¯å¥½ */
}

/* iPhone XR, XS Max, 11, 11 Pro Max (414px but taller) */
@media only screen and (min-width: 376px) and (max-width: 414px) and (min-height: 896px) {
    body {
        padding-bottom: 70px;
    }
}

/* æ›´å¤§å°ºå¯¸æ‰‹æœºå’Œå°å¹³æ¿ */
@media only screen and (min-width: 415px) {
    .container {
        max-width: 100%;
    }
    .service-icon {
        width: 70px;
    }
    body {
        padding-bottom: 80px;
    }
}

/* 链接列表部分 */
.image-with-overlay {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ä¸‹è½½æŒ‰é’®æ ·å¼ */
.download-btn {
    cursor: pointer;
}

.download-btn:hover {
    /* transform: scale(1.02); */
}

.download-btn:active {
    /* transform: scale(0.98); */
} 


.jsBox {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: var(--overlay-max-width);
    max-height: var(--overlay-max-height);
    overflow-y: auto; 
    border-radius: var(--border-radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-md);
    z-index: 10;
   max-width: 720px; /* 最大寬度限制 */
   min-width: 320px; /* 最小寬度限制（可選） */
}

  .jsBox ul {
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .jsBox li {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    min-width: 0; /* 重要 */
  }

  .jsBox li .lineInfo {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  min-width: 0;
  }

  .jsBox li .ms {
  width: 5rem;
  height: 2.6rem;
  padding: 0.8rem;
  font-size: 16px;
  background-color: #fcdb00;
  border-top-left-radius: 22px;
  border-bottom-left-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

  .jsBox li .url {
  flex-grow: 1;      /* 撐滿剩餘寬度 */
  flex-shrink: 1;    /* 可縮小 */
  flex-basis: auto;  /* 基礎寬度由內容決定 */
  /* 其他維持你原本設定 */
  width: auto;       /* 改成 auto，flex 控制寬度 */
  max-width: 50rem;  
  min-width: 8rem;
  height: 2.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.7rem;
  border: 0.125rem solid #fcdb00;
  background-color: transparent;
  border-top-right-radius: 1.375rem;
  border-bottom-right-radius: 1.375rem;
  font-size: 0.9375rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  }

  .jsBox li a {
  margin-left: 12px;  /* 按鈕左邊留間距 */
  padding: 10px 16px;
  border-radius: 20px;
  color: white;
  text-decoration: none;
  background: linear-gradient(45deg, #ff0000, #ff7f00);
  font-size: 15px;
  flex-shrink: 0;
  animation: pulseScale 1.5s infinite ease-in-out;
  }

  @keyframes pulseScale {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.1);
    }
  }