/* ==========================================================================
   一、内置标准重置（包含您的自建反代样式表，必须排在首行）
   ========================================================================== */
@import url("https://open.bilibil-sc.top/reset.min.css");
@import url("https://open.bilibil-sc.top/css2.css");

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
ol, ul {
    list-style: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", system-ui, sans-serif;
}
html {
    scroll-behavior: smooth;
}

/* 字体保护映射 */
@font-face {
  font-family: "Bebas Neue-Regular";
  src: local("Bebas Neue-Regular"), local("Bebas Neue");
}
@font-face {
  font-family: "JetBrains Mono-Bold";
  src: local("JetBrains Mono-Bold"), local("JetBrains Mono Bold"), local("JetBrains Mono");
}

/* 全局基础色调 */
body {
    background: #121214;
    color: #222;
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* 渐变标题动画 */
.title-gradient {
    background: linear-gradient(90deg, #00a1d6, #9c27b0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-flow 4s linear infinite;
}
@keyframes gradient-flow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}
.test-tag {
    font-size: 14px;
    color: #e53e3e;
}
.field-notice {
    color: #ef4444;
    font-size: 14px;
    margin: 12px 0 16px;
}
.warn-tip {
    background: #fff2e0 !important;
    border-color: #ffcc99 !important;
}
.success-tip {
    background: #e6ffe6 !important;
    border-color: #99e699 !important;
}

/* 导航系统 */
.nav-bar, .admin-nav {
    background: #1f2937;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.nav-bar a, .admin-nav a {
    color: #ddd;
    text-decoration: none;
    margin: 0 6px;
    padding: 6px 10px;
    border-radius: 5px;
    transition: background 0.25s ease;
}
.nav-bar a.active, .admin-nav a:hover {
    background: #374151;
    color: #fff;
}
.logout-btn {
    background: #dc2626;
}

/* 前台容器：增加至精致大气的 1300px，视频更宽，高度自动在 16:9 的机制下等比拉长 */
.container {
    max-width: 1300px; 
    margin: 26px auto;
    padding: 0 16px;
}
h2 {
    margin: 18px 0 10px;
    color: #ffffff;
    border-left: 4px solid #00a1d6;
    padding-left: 10px;
}
h3 {
    color: #ffffff;
}
.tip-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 14px 0;
}

/* 视频卡片 */
.top-video-box {
    background: #1e1e24;
    color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    margin-bottom: 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.top-video-box h2 {
    color: #ffffff;
    margin-bottom: 12px;
}
.top-video-box p {
    margin-top: 10px;
    color: #9ca3af;
}
.top-video-box a {
    color: #00a1d6;
}
.top-video-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.main-box {border-top:4px solid #00a1d6;}
.sub-box {border-top:4px solid #9c27b0;}

/* B站播放器长宽比绝对锁定器 */
.top-video-box .iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 物理锁定 16:9 比例 (9 / 16 = 56.25%) */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.top-video-box .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 往期按钮 */
.history-list {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:12px;
}
.period-item {
    padding:10px 18px;
    border-radius:6px;
    color:#fff;
    text-decoration:none;
    transition:opacity 0.2s ease, transform 0.2s ease;
}
.period-item:hover {opacity:0.85;transform:scale(1.03);}
.main-item {background:#00a1d6;}
.sub-item {background:#9c27b0;}
.back-btn {display:inline-block;margin-top:20px;color:#00a1d6;text-decoration:none;}

/* 登录面板专用样式 */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.login-box {
    width: 100%;
    max-width: 460px;
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.animate-box {
    animation: box-fade 0.6s ease;
}
@keyframes box-fade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.input-item {margin:18px 0;}
.input-item label {display:block;margin-bottom:6px;font-weight:500; color:#374151;}
input[type="password"],input[type="text"],input[type="number"],select {
    width:100%;
    padding:10px 12px;
    border:1px solid #ddd;
    border-radius:5px;
    font-size:16px;
    transition:border 0.2s ease;
}
input:focus,select:focus {outline:none;border-color:#00a1d6;}
.login-submit {
    width:100%;
    padding:12px;
    background:#00a1d6;
    color:white;
    border:none;
    border-radius:6px;
    font-size:16px;
    cursor:pointer;
    transition:background 0.25s ease;
}
.login-submit:hover {background:#008fc0;}
.error-msg {color:#dc2626;margin-bottom:14px; font-weight: bold;}
.back-home {display:block;text-align:center;margin-top:12px;color:#666;text-decoration:none;}
.admin-tip {margin-top:24px;padding:12px;background:#eef6ff;border-radius:6px;font-size:14px;line-height:1.8;}
.admin-period-list li {padding:8px 0;border-bottom:1px solid #eee;list-style:none;}


/* ==========================================================================
   五、卡片列表排版结构
   ========================================================================== */
.song-card-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

/* 歌曲主卡片（高度升级为141px，完美贴合您的并列面板高度） */
.song-bottom {
  width: 100%;
  min-height: 141px;
  height: auto;
  display: flex;
  background-color: #ffffff; /* 亮白卡片底色 */
  border-radius: 22.66px;
  box-shadow: 0px 2px 6px rgba(8, 12, 20, 0.06), 0px 18px 48px rgba(8, 12, 20, 0.18);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.song-bottom:hover {
  transform: translateY(-3px);
  box-shadow: 0px 4px 12px rgba(8, 12, 20, 0.12), 0px 24px 54px rgba(8, 12, 20, 0.28);
}

/* 左侧：排名指示器块 */
.song-bottom .song-info {
  margin-top: 22.7px;
  width: 126px;
  height: 96px;
  margin-left: 32px;
  display: flex;
  flex-shrink: 0;
}

.song-bottom .song-rank-big {
  width: 126px;
  height: 95.2px;
  position: relative;
}

.song-bottom .h {
  position: absolute;
  top: 49px;
  left: 0;
  width: 34px;
  font-family: "Bebas Neue-Regular", "Bebas Neue", Helvetica, sans-serif;
  font-weight: 400;
  color: #999999;
  font-size: 44px;
  letter-spacing: 0;
  line-height: 37.4px;
}

.song-bottom .num {
  position: absolute;
  top: 0;
  left: 16px;
  width: 120px;
  font-family: "Bebas Neue-Regular", "Bebas Neue", Helvetica, sans-serif;
  font-weight: 400;
  color: #79e96b;
  font-size: 112px;
  letter-spacing: -4.48px;
  line-height: 95.2px;
}

.song-bottom .num.rank-1 { color: #fca510; }
.song-bottom .num.rank-2 { color: #94a3b8; }
.song-bottom .num.rank-3 { color: #b45309; }

.song-bottom .arrow {
  position: absolute;
  top: 14px;
  left: 101px;
  width: 22px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.song-bottom .text-wrapper {
  font-family: "JetBrains Mono-Bold", "JetBrains Mono", Helvetica, monospace;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  display: inline-block;
}

.song-bottom .arrow.status-down { background-color: #e84a4a1f; }
.song-bottom .arrow.status-down .text-wrapper { color: #e84a4a; }
.song-bottom .arrow.status-up { background-color: #79e96b1f; }
.song-bottom .arrow.status-up .text-wrapper { color: #2eb01e; }
.song-bottom .arrow.status-keep { background-color: #9999991f; }
.song-bottom .arrow.status-keep .text-wrapper { color: #666666; }
.song-bottom .arrow.status-new { background-color: #00a1d61f; }
.song-bottom .arrow.status-new .text-wrapper { color: #00a1d6; font-size: 9px; }

/* 您的并列小卡片组合及投稿日期区域 */
.song-bottom .song-meta-right {
  margin-top: 6px;
  width: 100%;
  display: flex;
  gap: 24px;
  align-items: center;
}

.song-bottom .song-stats-row {
  display: flex;
  gap: 12px;
}

/* 灰色背景小卡片样式（上周排名、在榜周数） */
.song-bottom .mini-card, .song-bottom .div {
  width: 110px;
  height: 64px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: #f6f8fa;
  border-radius: 10px;
  flex-shrink: 0;
}

/* 绿色高亮背景小卡片样式（最高排名） */
.song-bottom .mini-card-2 {
  background-color: #79e96b;
  width: 110px;
  height: 64px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* 小卡片标签 */
.song-bottom .label, .song-bottom .text-wrapper {
  color: #666666;
  margin-left: 12px;
  margin-top: 8px;
  font-family: "JetBrains Mono-Bold", "Microsoft Yahei", Helvetica, sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  line-height: 12px;
}

/* 最高排名文字特殊对比色 */
.song-bottom .text-wrapper {
  color: #1e1e24;
}

/* 小卡片数值 */
.song-bottom .value {
  margin-left: 12px;
  font-family: "Bebas Neue-Regular", "Bebas Neue", Helvetica, sans-serif;
  font-weight: 400;
  color: #222222;
  font-size: 32px;
  letter-spacing: 0;
  line-height: 32px;
}

/* 投稿日期块 */
.song-bottom .song-date {
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.song-bottom .text-wrapper-2 {
  font-family: "JetBrains Mono-Bold", "Microsoft Yahei", Helvetica, sans-serif;
  font-weight: 700;
  color: #666666;
  font-size: 11px;
  letter-spacing: 1px;
  line-height: 14px;
}

.song-bottom .val {
  font-family: "JetBrains Mono-Bold", "Microsoft Yahei", Helvetica, sans-serif;
  font-weight: 700;
  color: #222222; /* 确保在亮白底色上正常渲染 */
  font-size: 15px;
  letter-spacing: 1px;
  line-height: 18px;
}

/* 去B站观看按钮样式 */
.song-bottom .bili-link-btn {
  background: #00a1d6;
  color: #ffffff !important;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.song-bottom .bili-link-btn:hover {
  background: #008fc0;
}

/* 封面图片包裹层自适应 */
.song-bottom .song-cover-wrap {
  width: 245px;
  height: 141px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 24px;
  border-radius: 8px;
  margin-top: auto;
  margin-bottom: auto;
}

.song-bottom .song-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 右侧核心详情板块 */
.song-bottom .song-details {
  flex-grow: 1;
  padding: 16px 24px 12px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.song-bottom .song-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.song-bottom .song-title-group {
  flex-grow: 1;
}

.song-bottom .song-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
  margin-bottom: 4px;
}

.song-bottom .song-up {
  font-size: 13px;
  color: #4b5563;
}

.song-bottom .song-score-group {
  text-align: right;
  flex-shrink: 0;
}

.song-bottom .song-score-val {
  font-size: 24px;
  font-weight: 800;
  color: #00a1d6;
}

.song-bottom .song-score-lbl {
  font-size: 11px;
  color: #9ca3af;
  display: block;
}

/* 四大指标展示栏 */
.song-bottom .song-stats-row-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 6px 0;
  padding: 6px 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.song-bottom .stat-item {
  font-size: 12px;
  color: #64748b;
  display: flex;
  gap: 4px;
}

.song-bottom .stat-lbl { color: #94a3b8; }
.song-bottom .stat-val { font-weight: 700; color: #334155; }

/* 移动端窄屏自适应响应规则 */
@media screen and (max-width: 992px) {
  .song-bottom .song-meta-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media screen and (max-width: 768px) {
  .song-bottom {
    flex-direction: column;
    height: auto;
  }
  .song-bottom .song-info {
    margin: 16px auto 0;
    flex-shrink: 0;
  }
  .song-bottom .song-cover-wrap {
    width: calc(100% - 32px) !important;
    height: 180px !important;
    margin: 12px auto 0 !important;
  }
  .song-bottom .song-details {
    padding: 16px;
    gap: 12px;
  }
  .song-bottom .song-header-row {
    flex-direction: column;
    gap: 8px;
  }
  .song-bottom .song-score-group {
    text-align: left;
  }
  .song-bottom .song-meta-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .song-bottom .song-stats-row {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .song-bottom .mini-card, .song-bottom .div, .song-bottom .mini-card-2 {
    width: calc(33.33% - 6px);
  }
  .song-bottom .bili-link-btn {
    width: 100%;
    text-align: center;
    padding: 8px 0;
  }
}


/* ==========================================================================
   六、后端控制台专属样式（body.admin-body 深度自适应卡片视觉重构）
   ========================================================================== */

body.admin-body {
    background: #f3f4f6;
    color: #1f2937;
}

body.admin-body h2 {
    color: #111827;
    margin-bottom: 20px;
}

body.admin-body h3 {
    color: #1f2937;
}

body.admin-body .container {
    background: #ffffff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03), 0 20px 25px -5px rgba(0,0,0,0.05);
    margin-top: 30px;
    margin-bottom: 30px;
}

body.admin-body .input-item label {
    color: #374151;
    font-weight: 600;
}

body.admin-body .admin-period-list li {
    color: #1f2937;
    font-weight: 500;
    border-bottom: 1px solid #f3f4f6;
}

body.admin-body .admin-period-list li a {
    color: #00a1d6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

body.admin-body .admin-period-list li a:hover {
    color: #008fc0;
}

body.admin-body .admin-tip {
    background: #f0fdf4;
    border-left: 4px solid #2eb01e;
    color: #166534;
    padding: 16px;
    border-radius: 8px;
    margin-top: 32px;
    font-size: 14px;
    line-height: 1.8;
}