/* 全站通用样式 */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --radius: 12px;
  --blur: 30px;
  --card-light: rgba(255, 255, 255, 0.55);
  --card-dark: rgba(30, 30, 40, 0.5);
  --text-light: #111;
  --text-dark: #eee;
  --accent-light: #6366f1;
  --accent-dark: #818cf8;
}

@media (prefers-color-scheme: dark){
  :root{--bg: #0f0f11; --card: var(--card-dark); --text: var(--text-dark); --accent: var(--accent-dark);}
}
@media (prefers-color-scheme: light){
  :root{--bg: #f3f4f6; --card: var(--card-light); --text: var(--text-light); --accent: var(--accent-light);}
}

*, *::before, *::after { box-sizing: border-box; margin:0; padding: 0; }
body{
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  overflow-x: hidden;
}

.bg-gradient{
  position: fixed;
  inset:0;
  z-index: -2;
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
  background-size: 400% 400%;
  animation: grad 20s ease infinite;
}
@keyframes grad{0%{background-position: 0% 50%}50%{background-position: 100% 50%}100%{background-position: 0% 50%}}

.bg-noise{
  position: fixed;
  inset:0;
  z-index: -1;
  background: url('noise.svg') repeat;
  opacity: 0.04;
  mix-blend-mode: overlay;
  animation: noise 1s steps(2) infinite;
}
@keyframes noise{to { background-position: 100% 100%; }}

header { text-align: center; margin-bottom: 60px; }
.logo { width: 48px; height: auto; margin: 0 auto 16px; }
h1 { font-size: 2rem; font-weight: 700; }
.gradient { background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.btn-honor{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transition: all .3s ease;
}
.btn-honor:hover{background: #fff;color: #000;border-color: #fff}

.glass{
  background: var(--card);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 40px;
  max-width: 720px;
  width: 100%;
  animation: fadeIn .8s ease;
}
@keyframes fadeIn{from{opacity: 0;transform: translateY(20px)}to{opacity: 1;transform: translateY(0)}}

section { margin-bottom: 40px; }
h2, h3 { margin-bottom: 14px; font-weight: 600; }
.plugin-tip { margin-bottom: 15px; font-size: 0.95rem; line-height: 1.5; }
.plugin-tip code { background: rgba(255, 255, 255, 0.15); padding: 2px 6px; border-radius: 4px; }

.url-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  border-radius: 8px;
}
.url-box input, .url-box select { border: none; outline: none; background: transparent; font-family: inherit; color: var(--text); }
.url-box input { min-width: 110px; }
.copy-btn { font-size: 1.3rem; padding: 4px 8px; border-radius: 6px; transition: transform .2s, background .2s; cursor: pointer; }
.copy-btn:hover { transform: scale(1.15); background: rgba(255, 255, 255, 0.25); }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list li { background: rgba(255, 255, 255, 0.15); padding: 6px 12px; border-radius: 20px; font-size: 0.9rem; transition: transform .2s; }
.tag-list button { all: unset; cursor: pointer; }

.search-glass { display: flex; flex-direction: column; gap: 12px; background: var(--card); backdrop-filter: blur(var(--blur)); border-radius: var(--radius); padding: 25px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.2); }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-row label { font-weight: 600; flex-shrink: 0; }
.search-row select, .search-row input { flex: 1 1 200px; min-width: 0; }
.search-row .btn-honor { flex: 1 1 80px; height: 40px; font-size: 1rem; margin: 0; }

.results-scroll { max-height: 40vh; overflow-y: auto; border-radius: var(--radius); background: rgba(255, 255, 255, 0.05); padding: 10px; }
.result-card { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: rgba(255, 255, 255, 0.08); border-radius: 8px; margin-bottom: 6px; font-size: 0.9rem; }
.result-card .info { flex: 1; }
.result-card .btns { display: flex; gap: 6px; }
.btn-open, .btn-down { background: var(--accent); color: #fff; border: none; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; transition: .2s; }
.btn-open:hover, .btn-down:hover { filter: brightness(1.15); }

@media (max-width: 600px) {
  .search-row { flex-direction: column; align-items: stretch; }
  .url-box { flex-direction: column; align-items: flex-start; }
}

/* 网页内确认弹窗 */
.modal-overlay {
  position:fixed;inset:0;background:rgba(0,0,0,.7);
  display:flex;align-items:center;justify-content:center;
  z-index:9999;opacity:0;pointer-events:none;transition:.3s;
}
.modal-overlay.show{opacity:1;pointer-events:auto}
.modal-box{
  background:var(--card);padding:25px 30px;border-radius:var(--radius);
  box-shadow:0 12px 40px rgba(0,0,0,.3);text-align:center;max-width:320px
}
.modal-btns{margin-top:15px;display:flex;gap:10px;justify-content:center}

/* 修复复制按钮样式 */
.copy-btn {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.copy-btn:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.25);
}

/* 修复立即跳转按钮样式 */
.demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transition: all .3s ease;
}
.demo:hover {
  filter: brightness(1.15);
}

/* 平台按钮 & 输入框美化 */
.search-row input[type="checkbox"] {
  display: none;               /* 隐藏原生复选框 */
}
.search-row .platform-tag {
  cursor: pointer;
  user-select: none;
  transition: background .25s, transform .15s;
}
.search-row .platform-tag:has(input:checked) {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}
.search-row input[type="text"] {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text);
  font-family: inherit;
  outline: none;
}
.search-row input[type="text"]::placeholder {
  color: rgba(255,255,255,.6);
}

/* 增大按钮间距，避免拥挤 */
.tag-list {
  gap: 12px;
}
.tag-list .tag {
  padding: 8px 14px;   /* 原来 6px 12px */
  font-size: 0.95rem;
}

/* 搜索输入框高亮 */
#searchInput {
  width: 100%;
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.2);
  color: var(--text);
  transition: border .3s, background .3s;
  outline: none;
}
#searchInput:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,.3);
}
#searchInput::placeholder {
  color: rgba(255,255,255,.7);
}

/* 输入框黑色文字 + 默认黑色边框 */
#searchInput {
  color: #000;                         /* 输入文字黑色 */
  border: 1px solid #000;             /* 黑色边框 */
  background: #fff;                   /* 背景白色，更显眼 */
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 4px;                 /* 与提示文字留空隙 */
}
#searchInput::placeholder {
  color: #333;                        /* placeholder 黑色 */
}

/* 平台选择提示文字 */
.platform-count {
  display: block;
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 8px;
}

/* 平台参数 / 可选格式按钮点击动效 */
.tag[data-p],
.tag[data-f]{
  cursor: pointer;
  transition: transform .15s ease, background .25s ease, color .25s ease;
  user-select: none;
}
.tag[data-p]:active,
.tag[data-f]:active{
  transform: scale(.92);                /* 点击缩放 */
}
.tag[data-p]:hover,
.tag[data-f]:hover{
  background: var(--accent);            /* 悬停高亮 */
  color: #fff;
}

/* 高亮时保持圆角 */
.tag[data-p],
.tag[data-f] {
  border-radius: 12px !important;   /* 与默认圆角统一 */
}

/* 搜索歌词平台按钮高亮圆角统一 */
.search-row .platform-tag {
  border-radius: 12px !important;
  transition: background .25s, color .25s;
}
.search-row .platform-tag:has(input:checked) {
  background: var(--accent);
  color: #fff;
  border-radius: 12px;          /* 确保高亮背景也是圆角 */
}

/* 搜索结果卡片按钮靠右 */
.result-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-card .info {
  flex: 1 1 auto;
  margin-right: 12px;
}
.result-card .btns {
  flex-shrink: 0;
}

/* 搜索结果容器宽度锁定 */
.results-scroll {
  width: 100%;
  box-sizing: border-box;
}

/* 单条结果卡片 */
.result-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 文字区域自适应，剩余空间全给文字 */
.result-card .info {
  flex: 1 1 0;
  min-width: 0;
  word-break: break-all;
  margin-right: 12px;
}

/* 按钮区域不压缩 */
.result-card .btns {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}

.btn-play{
  background:#1db954;
  color:#fff;
  border:none;
  padding:4px 8px;
  border-radius:6px;
  cursor:pointer;
  font-size:0.9rem;
}

/* 搜索按钮排版还原 */
.search-glass {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.search-glass h2 {
  width: 100%;                 /* 标题独占一行 */
  margin-bottom: 8px;
}

.search-row {
  width: 100%;                 /* 平台选择独占一行 */
  margin-bottom: 8px;
}

#searchInput {
  flex: 1 1 200px;
  min-width: 0;
}

#searchBtn {
  flex: 0 0 auto;
  height: 40px;
  font-size: 1rem;
  margin: 0;
}

#resultCount,
#platformCount {
  flex-shrink: 0;
  margin-left: 6px;
  white-space: nowrap;
}

.plugin-tip .copy-btn {
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 0.9rem;
  vertical-align: middle;
}