:root {
  --bg: #0b0d17;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #eef1f8;
  --text-dim: #9aa3b8;
  --accent: #5b8cff;
  --accent2: #a259ff;
  --success: #35d0a5;
  --danger: #ff6b81;
  --radius: 18px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景光球 */
.bg-orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb1 { width: 420px; height: 420px; background: #3b5bff; top: -140px; left: -100px; }
.orb2 { width: 380px; height: 380px; background: #a259ff; bottom: -120px; right: -80px; }
.orb3 { width: 300px; height: 300px; background: #00d4a0; top: 45%; left: 55%; opacity: 0.28; }

/* 顶栏 */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  max-width: 900px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 26px; }
.logo-text { font-size: 20px; font-weight: 700; letter-spacing: 1px; }

.icon-btn {
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text); width: 38px; height: 38px; border-radius: 12px;
  cursor: pointer; font-size: 16px; transition: 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.14); }

.container {
  position: relative; z-index: 2;
  max-width: 900px; margin: 0 auto; padding: 0 20px 60px;
}

/* Hero */
.hero { text-align: center; margin: 26px 0 24px; }
.hero h1 {
  font-size: 34px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(120deg, #fff, #a9c0ff 60%, #d7b3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-dim); margin-top: 10px; font-size: 15px; }
.hero strong { color: var(--success); }

/* 平台标签 */
.platforms {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px;
}
.chip {
  padding: 7px 15px; border-radius: 999px; font-size: 13px;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text-dim);
}
.chip.active { color: #fff; border-color: rgba(91,140,255,0.6); background: rgba(91,140,255,0.18); }

/* 输入卡片 */
.input-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 16px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}
.input-wrap { position: relative; }
#urlInput {
  width: 100%; background: rgba(0,0,0,0.28); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 14px 40px 14px 14px; color: var(--text);
  font-size: 15px; font-family: inherit; resize: vertical; line-height: 1.6;
  transition: 0.2s;
}
#urlInput:focus { outline: none; border-color: var(--accent); background: rgba(0,0,0,0.4); }
#urlInput::placeholder { color: #6b7590; }
.clear-btn {
  position: absolute; top: 10px; right: 10px; background: none; border: none;
  color: var(--text-dim); cursor: pointer; font-size: 14px; padding: 4px 8px; border-radius: 8px;
}
.clear-btn:hover { color: var(--text); background: rgba(255,255,255,0.08); }

.actions { display: flex; gap: 10px; margin-top: 14px; }
.btn {
  border: none; border-radius: 13px; padding: 13px 22px; font-size: 15px;
  font-weight: 600; cursor: pointer; transition: 0.2s; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary {
  flex: 1; color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 24px rgba(91,140,255,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(91,140,255,0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--card-border); }
.btn-ghost:hover { background: rgba(255,255,255,0.15); }

.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.err {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  background: rgba(255,107,129,0.12); border: 1px solid rgba(255,107,129,0.3); color: #ffb3bf;
}

/* 结果区 */
.result {
  margin-top: 22px; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  animation: fadeUp 0.35s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.res-head { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid var(--card-border); }
.res-cover {
  width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  background: rgba(0,0,0,0.3);
}
.res-meta { flex: 1; min-width: 0; }
.res-title {
  font-size: 16px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.res-sub { color: var(--text-dim); font-size: 13px; margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.res-badge {
  display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px;
  background: rgba(91,140,255,0.2); color: #b8ccff; margin-right: 6px;
}

.res-body { padding: 16px; }
.preview-box {
  width: 100%; max-height: 380px; background: #000; border-radius: 12px; display: block;
}
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.img-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in;
  transition: 0.2s; background: rgba(0,0,0,0.3);
}
.img-grid img:hover { transform: scale(1.03); }

.res-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-download {
  flex: 1; min-width: 150px; color: #04231b; font-weight: 700;
  background: linear-gradient(120deg, #2fe3b0, #35d0a5);
  box-shadow: 0 8px 22px rgba(53,208,165,0.3);
}
.btn-download:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(53,208,165,0.4); }
.btn-short { flex: 0 0 auto; min-width: 110px; }

.url-row {
  margin-top: 14px; font-size: 12px; color: var(--text-dim);
  background: rgba(0,0,0,0.25); padding: 10px 12px; border-radius: 10px;
  word-break: break-all; line-height: 1.6;
}
.url-row b { color: #b8ccff; font-weight: 600; }

/* 说明 */
.tips {
  margin-top: 28px; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px 20px;
}
.tips h3 { font-size: 15px; margin-bottom: 12px; }
.tips ol { padding-left: 20px; color: var(--text-dim); font-size: 14px; line-height: 1.9; }
.tips strong { color: var(--text); }
.disclaimer { margin-top: 12px; font-size: 12px; color: #6b7590; border-top: 1px solid var(--card-border); padding-top: 12px; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); padding: 20px;
}
.modal-card {
  width: 100%; max-width: 460px; background: #141828; border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px; animation: fadeUp 0.25s ease;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { font-size: 17px; }
.field { display: block; margin-bottom: 8px; }
.field span { display: block; font-size: 14px; margin-bottom: 8px; }
.field input {
  width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--card-border);
  border-radius: 11px; padding: 11px 13px; color: var(--text); font-size: 14px; font-family: inherit;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field small { display: block; margin-top: 7px; color: var(--text-dim); font-size: 12px; line-height: 1.6; }
.field code { background: rgba(91,140,255,0.18); padding: 1px 5px; border-radius: 4px; color: #b8ccff; }
.modal-actions { margin-top: 18px; }
.modal-actions .btn { width: 100%; }

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(20,24,40,0.95); border: 1px solid var(--card-border);
  padding: 12px 22px; border-radius: 12px; font-size: 14px; z-index: 100;
  animation: fadeUp 0.25s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

@media (max-width: 560px) {
  .hero h1 { font-size: 27px; }
  .topbar { padding: 14px 16px; }
  .container { padding: 0 14px 40px; }
  .res-head { flex-direction: column; }
  .res-cover { width: 100%; height: 180px; }
  .actions { flex-wrap: wrap; }
  .btn { font-size: 14px; padding: 12px 16px; }
}

/* 底部版权 */
.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  padding: 28px 15px 40px;
  line-height: 1.9;
}
.site-footer p { margin: 0; }
