:root {
  --day-bg: url('https://bu.dusays.com/2025/07/20/687ca73cf27ad.jpeg');
  --night-bg: url('https://bu.dusays.com/2025/07/20/687ca740d9e24.jpeg');

  /* ✅ 移动端专用背景图 */
  --mobile-day-bg: url('https://bu.dusays.com/2025/07/20/687cb9bd73be7.jpeg');
  --mobile-night-bg: url('https://bu.dusays.com/2025/07/20/687cb9bad47a1.jpeg');
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-image 0.5s ease-in-out;
}

body.theme-day {
  background-image: var(--day-bg);
}

body.theme-night {
  background-image: var(--night-bg);
}

.overlay {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(17, 25, 40, 0.3);
  border-radius: 16px;
  padding: 40px 30px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  max-height: 90vh;
}

h1 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
}

input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  outline: none;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

input::placeholder {
  color: #ccc;
}

.note {
  font-size: 12px;
  color: #aaa;
  text-align: center;
  margin-bottom: 20px;
}

/* ✅ 标题样式：无边框、无背景、纯文字 */
.section-title {
  margin-top: 20px;
  font-size: 15px;
  color: #fff;
  background: none;
  border: none;
  padding: 8px 0;
  width: 100%;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  position: relative;
  font-weight: 500;
}

/* 移除原箭头 */
.section-title::after {
  content: none;
}

/* 独立箭头按钮 */
.toggle-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(180deg); /* 默认向下 */
  transition: transform 0.3s ease;
  font-size: 14px;
  display: none; /* 默认隐藏，移动端显示 */
}

/* 展开时箭头向上 */
.accordion-section.open .toggle-btn {
  transform: translateY(-50%) rotate(0deg);
}

/* 折叠区域 */
.accordion-section .platforms {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.accordion-section.open .platforms {
  max-height: 600px;
  opacity: 1;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.platforms button {
  flex: 1 1 auto;
  padding: 10px 14px;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.platforms button:hover {
  background: #007aff;
}

.toggle-dark {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 18px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
  z-index: 9999;
}

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

/* ✅ 移动端样式 */
@media (max-width: 600px) {
  .platforms {
    flex-direction: column;
  }

  .overlay {
    padding: 20px 15px;
  }

  h1 {
    font-size: 20px;
  }

  input[type="text"] {
    padding: 10px 14px;
  }

  .note,
  .section-title {
    font-size: 14px;
  }

  .toggle-btn {
    display: inline-block;
  }

  /* ✅ 移动端背景图覆盖 */
  body.theme-day {
    background-image: var(--mobile-day-bg);
  }

  body.theme-night {
    background-image: var(--mobile-night-bg);
  }
}

/* ✅ PC 端始终展开，隐藏箭头 */
@media (min-width: 768px) {
  .accordion-section .platforms {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    transition: none !important;
  }

  .toggle-btn {
    display: none !important;
  }

  /* ✅ 当移动端输入框聚焦时，整体 overlay 上移 50vh */
@media (max-width: 600px) {
  .overlay:has(input[type="text"]:focus) {
    transform: translateY(-50vh);
  }

  .overlay {
    transition: transform 0.3s ease;
  }
}

}
