  /* support new browser (android chrome) feature */
  /* android chrome fallback font is google costum font*/
  /* to avoid google font fallback, you must set font-family in * selector */
  * {
    font-family: system-ui, sans-serif;
  }

  body {
    max-width: 90%;
    margin: 0 auto;
  }

  /* Top decoration styles */
.top-banner {
  position: relative;
  padding: 4rem 2rem 2rem;
  text-align: center;
  overflow: hidden;
}

.banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  z-index: -1;
  transform: scale(1.05);
  filter: blur(1px);
}

.banner-title {
  font-size: 1.8rem;
  margin: 0 0 .5rem;
  letter-spacing: 1px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-weight: 600;
}

.banner-subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.app-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding: 1rem;
  margin-bottom: 2rem;
}

.app-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.25);
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.app-icon {
  font-size: 2.5rem;
  margin-right: 1.25rem;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.app-info {
  flex: 1;
  position: relative;
  z-index: 2;
}

.app-title {
  margin: 0 0 .25rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.app-desc {
  margin: 0 0 .75rem;
  font-size: .9rem;
  line-height: 1.4;
}

.app-download {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #feb47b;
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 500;
}

.app-download:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.arch-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.custom-select {
  position: relative;
  width: 140px;
  user-select: none;
}

.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  font-weight: 500;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.select-trigger::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

.select-trigger:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.select-trigger.active {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.selected-value {
  color: inherit;
}

.select-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.select-trigger.active .select-arrow {
  transform: rotate(180deg);
}

.select-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 100;
}

.select-options.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.select-option {
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  color: #333;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.select-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  pointer-events: none;
}

.select-option:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.select-option.selected {
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.3);
}

.last-updated {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: #666;
  margin: 1rem 1.5rem 0;
}

.update-icon {
  width: 1.1em;
  height: 1.1em;
  animation: rotate 1.2s linear infinite;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.recent-updates {
  padding: 2rem 1.5rem;
  max-width: 500px;   /* 限制最大宽度 */
  margin: 0 auto;     /* 水平居中 */
}

.updates-title {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  text-align: center;
  font-weight: 600;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.update-item {
  padding: 1.2rem;
}

.update-badge {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0 0 .75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.android-version,
.update-data {
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  color: #888;
  margin-bottom: 0.75rem;
}

.update-list {
  font-size: .95rem;
  line-height: 1.7;
  list-style-type: disc;
  margin-left: 1.5rem;
}

.update-list strong {
  color: #4CAF50;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  html, body {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: rgba(255, 255, 255, 0.9);
  }

  .app-grid {
    background: transparent;
  }
  .app-card {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .app-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    border-color: rgba(255, 255, 255, 0.2);
  }
  .app-title {
    color: white;
  }
  .app-desc {
    color: rgba(255, 255, 255, 0.8);
  }
  .app-download {
    border-color: rgba(255, 255, 255, 0.2);
  }
  .app-download:hover {
    border-color: rgba(255, 255, 255, 0.4);
  }
  
  .arch-select {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .arch-select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
  }

  .arch-select:focus {
    border-color: rgba(255, 255, 255, 0.5);
  }
  
  .select-trigger {
    background: rgba(200, 200, 200, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
      0 4px 12px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  }

  .select-trigger:hover {
    background: rgba(220, 220, 220, 0.25);
    border-color: rgba(255, 255, 255, 0.45);
  }

  .select-trigger.active {
    border-color: rgba(255, 255, 255, 0.55);
  }

  .select-options {
    background: rgba(90, 90, 95, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }

  .select-option {
    color: rgba(255, 255, 255, 0.9);
  }

  .select-option:hover {
    background: rgba(200, 200, 200, 0.3);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  }

  .select-option.selected {
    background: rgba(76, 175, 80, 0.35);
    color: #81C784;
    box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.5);
  }
  
  .last-updated {
    color: rgba(255, 255, 255, 0.7);
  }
  .update-item {
    color: rgba(255, 255, 255, 0.9);
  }
  .update-badge {
    color: rgba(255, 255, 255, 0.95);
  }
  
  /* App icon dark mode adjustments */
  /* For SVG icons, apply filter directly to the SVG element */
  
  /* Special handling for favicon.ico to make it more visible in dark mode */
  .app-icon img {
    filter: invert(1) brightness(1.1);
  }
}

/* 更新内容弹窗样式 */
.updates-button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.updates-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

.updates-button:active {
  transform: translateY(-1px);
}

/* Modal styles */
.modal {
  display: none; /* 默认隐藏 */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  /* 支持脚本修改背景色的平滑过渡 */
  transition: background-color 260ms ease;
  animation: fadeIn 0.3s ease;
}

/* Modal content */
.modal-content {
  background: rgba(255, 255, 255, 0.75);
  padding: 2rem;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: none; /* 我们用 JS 控制动画 */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);

  /* 隐藏滚动条 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  /* 使 transform 动画更平滑、并允许脚本设置初始 translate */
  transform-origin: center center;
  will-change: transform;
}

/* 隐藏滚动条 - Chrome, Safari */
.modal-content::-webkit-scrollbar {
  display: none;
}

/* Close button (重构为 macOS 风格缩小窗口按钮，保留液态玻璃质感) */
.close {
  position: absolute;
  left: 1.25rem;
  top: 1.25rem;

  /* 小型圆形，贴近 macOS 最小化按钮尺寸 */
  width: 14px;
  height: 14px;
  border-radius: 50%;

  /* 典型的 macOS 黄橘色视觉 */
  background: linear-gradient(180deg, #ffefb8 0%, #ffbf4d 60%);
  border: 1px solid rgba(0, 0, 0, 0.13);

  /* 保留液态玻璃/模糊视觉，但更轻量 */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  /* 光泽与内阴影，营造立体感 */
  box-shadow: 0 1px 0 rgba(255,255,255,0.45) inset, 0 3px 8px rgba(0,0,0,0.22);

  /* 隐藏文本（若按钮在 HTML 中含短横号）并保留可访问性 */
  color: transparent;
  text-indent: -9999px;

  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  display: inline-block;
  vertical-align: middle;
}

.close:hover,
.close:focus {
  transform: scale(1.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.55) inset, 0 5px 12px rgba(0,0,0,0.28);
  outline: none;
  filter: brightness(1.02);
}

/* 小横线图标（伪元素） */
.close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 2px;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 1px;
  transition: background 120ms ease, transform 120ms ease;
  pointer-events: none; /* 不影响点击 */
}

.close:hover::after,
.close:focus::after {
  background: rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%) scaleX(1.05);
}

  /* 底部用户代理信息 */
  #user-agent {
    display: block;
    padding: 1rem 0;
    text-align: center;
    opacity: 0.7;
    font-size: 0.8rem;
    user-select: none;
    position: relative;
    margin-top: 2rem;
    z-index: 1;
  }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
}

/* Dark mode adjustments for modal */
@media (prefers-color-scheme: dark) {
  .modal-content {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
  
  .close {
    /* 深色模式下保持黄色按钮的可见性与微调边框 */
    background: linear-gradient(180deg, #ffefb8 0%, #ffb44a 60%);
    border: 1px solid rgba(0, 0, 0, 0.22);
    box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 4px 10px rgba(0,0,0,0.35);
    color: transparent;
  }

  .close:hover,
  .close:focus {
    transform: scale(1.08);
    box-shadow: 0 1px 0 rgba(255,255,255,0.55) inset, 0 6px 14px rgba(0,0,0,0.38);
    outline: none;
  }

  /* 深色模式下伪元素颜色调整 */
  .close::after {
    background: rgba(0, 0, 0, 0.78);
  }

  .close:hover::after,
  .close:focus::after {
    background: rgba(0, 0, 0, 0.92);
  }
  
  .updates-button {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
  }

  .android-version,
  .update-data {
    color: #bbb;
  }
  
  .updates-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
  }
}

@media (max-width: 768px) {
  #updatesModal .modal-content {
    max-width: 90%;
    margin: 10% auto;
    padding: 1.5rem 1rem;
  }
  
  .recent-updates {
    padding: 1rem 0.5rem;
  }
  
  .update-item {
    padding: 1rem 0.5rem;
  }
  
  .update-list {
    margin-left: 1rem;
    font-size: 0.9rem;
  }
  
  .update-list ul {
    margin-left: 0.75rem;
  }
  
  .close {
    left: 1rem;
    top: 1rem;
  }
}