@charset "UTF-8";
/* base.css - 基础重置与通用工具类(每个页面都引用) */

* { margin: 0; padding: 0; }
/* html 留确定高度, body 用 min-height —— 这里不能用 height。
 * body 一旦被钉死成 height:100%, 内容比它高时就会"溢出"到自己的 padding 区域上面,
 * 底部那条留白(见 player.css 的 body{padding-bottom})就白留了, 页脚最后一行
 * 照样被常驻播放条盖住。min-height 让盒子跟着内容长, padding 才真正占位。 */
html { height: 100%; }
body {
    min-height: 100%;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, "宋体", sans-serif;
    font-size: 14px;
    color: #333;
    background: #e8f4ee url(/bj.jpg) no-repeat fixed;
    background-image: url(/bj.jpg), url(/bj.jpg);
    background-position: left center, right center;
    background-size: 50% auto;
    background-repeat: no-repeat;
    background-attachment: fixed;
    line-height: 1.6;
}
/* 背景图减淡遮罩:半透明白色覆盖在背景图之上、内容之下(IE8+ 生效,IE7 退化为原色背景) */
body:before {
    content: "";
    position: fixed;
    _position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    opacity: 0.55;
    filter: alpha(opacity=55);
    z-index: -1;
}
ul, ol, li { list-style: none; }
a { color: #338066; text-decoration: none; }
a:hover { color: #2a6b52; text-decoration: underline; }
img { border: 0; vertical-align: middle; }
input, textarea, select, button { font-family: inherit; font-size: 100%; outline: none; }
table { border-collapse: collapse; border-spacing: 0; }

/* 通用容器与工具类 */
.wrap { width: 1200px; margin: 0 auto; }
.clearfix:after { content: ""; display: block; clear: both; height: 0; visibility: hidden; }
.clearfix { *zoom: 1; }
.fl { float: left; }
.fr { float: right; }
.hide { display: none; }
.tc { text-align: center; }
.tr { text-align: right; }
.rel { position: relative; }
.abs { position: absolute; }
.mt10 { margin-top: 10px; } .mt20 { margin-top: 20px; }
.mb10 { margin-bottom: 10px; } .mb20 { margin-bottom: 20px; }
.ml10 { margin-left: 10px; } .mr10 { margin-right: 10px; }

/* 通用按钮 */
.btn {
    display: inline-block; *display: inline; *zoom: 1;
    padding: 6px 18px;
    border: 1px solid #7fbd9f;
    background: #fff;
    color: #338066;
    cursor: pointer;
    line-height: 1.5;
    vertical-align: middle;
    text-align: center;
    text-decoration: none;
}
.btn:hover { background: #a8d6c1; color: #2c4a3e; text-decoration: none; }
.btn-primary { background: #a8d6c1; color: #2c4a3e; border-color: #a8d6c1; }
.btn-primary:hover { background: #7fbd9f; color: #2c4a3e; }
.btn-default { background: #fff; color: #333; border-color: #ddd; }
.btn-default:hover { background: #f5f5f5; color: #333; }
.btn-lg { padding: 10px 30px; font-size: 16px; }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-block { display: block; width: 100%; }
.btn-disabled { background: #ccc !important; border-color: #ccc !important; color: #fff !important; cursor: not-allowed; }

/* 通用输入框 */
.input {
    border: 1px solid #ddd;
    padding: 6px 10px;
    background: #fff;
    color: #333;
    vertical-align: middle;
    line-height: 1.5;
}
.input:focus { border-color: #338066; }
.input-block { display: block; width: 100%; box-sizing: border-box; *width: 96%; }
textarea.input { resize: vertical; min-height: 80px; }

/* 二级页面通用 */
.page-title {
    font-size: 22px; color: #333; font-weight: bold;
    padding: 16px 0; border-bottom: 2px solid #a8d6c1; margin-bottom: 20px;
}
.section-title {
    font-size: 18px; color: #333; font-weight: bold;
    margin: 20px 0 14px; padding-left: 10px; border-left: 4px solid #a8d6c1;
}
.breadcrumb { padding: 12px 24px; color: #999; font-size: 13px; }
.breadcrumb a { color: #338066; }
.breadcrumb .sep { margin: 0 6px; color: #ccc; }

/* 文字颜色工具 */
.text-cyan { color: #338066; }
.text-red { color: #e74c3c; }
.text-blue { color: #3498db; }
.text-green { color: #2ecc71; }
.text-gray { color: #999; }
.fw-bold { font-weight: bold; }
.fs-12 { font-size: 12px; } .fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; } .fs-24 { font-size: 24px; }

/* ============ 弹窗与遮罩(通用,每页都可能用) ============ */
.modal-mask {
    position: fixed; _position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    opacity: 0.5; filter: alpha(opacity=50);
    z-index: 9998;
    display: none;
}
.modal-mask.show { display: block; }
.modal {
    position: fixed; _position: absolute;
    top: 50%; left: 50%;
    background: #fff;
    z-index: 9999;
    display: none;
    /* 通过 margin 居中,不依赖 transform(IE7/8 不支持) */
    margin-left: -210px;       /* 默认弹窗宽 420px 的一半 */
    margin-top: -200px;        /* 默认高度估算,占位 */
}
.modal.show { display: block; }
.modal .modal-header {
    background: #a8d6c1;
    color: #2c4a3e;
    padding: 12px 20px;
    position: relative;
    height: 24px; line-height: 24px;
}
.modal .modal-header h3 { font-size: 16px; font-weight: bold; color: #2c4a3e; }
.modal .modal-header .close-x {
    position: absolute;
    right: 12px; top: 10px;
    color: #2c4a3e; font-size: 22px;
    text-decoration: none; line-height: 1;
}
.modal .modal-header .close-x:hover { color: #eff8f3; }
.modal .modal-body { padding: 20px; }
.modal .modal-footer {
    padding: 0 20px 20px;
    text-align: right;
}
.modal .modal-footer .btn { margin-left: 10px; }

/* ============ 封面 / 头像的通用表现 ============
 * 素材只有 500x500 方图, 所以统一用"容器 + object-fit"裁切,
 * 拉成横幅或缩成小方块都不会变形。
 * 没图时退化成彩色底 + 首字, 颜色由 R.palette() 按名字哈希选, 同一首歌永远同色。
 */
.cover-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #4e9c7c;
}
/* 用 > img 而不是具体类名: 各处传进来的类名不统一(cover-img / avatar-img / pl-img),
 * 漏掉一个就会出大问题 —— 图按原始 500px 溢出, 再被 .cover-wrap 的 overflow:hidden
 * 裁掉大半, 看起来就像"图片没显示完全"。 */
.cover-wrap > img {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
}
.cover-wrap .ph-txt {
    display: block;
    width: 100%; height: 100%;
    text-align: center;
    color: #fff;
    font-weight: bold;
    /* 用 line-height 无法在未知高度里垂直居中, 交给 flex */
    display: flex;
    align-items: center;
    justify-content: center;
}

.ph-c1 { background: #a8d6c1; }
.ph-c1 .ph-txt { color: #2c4a3e; }
.ph-c2 { background: #4e9c7c; }
.ph-c3 { background: #e74c3c; }
.ph-c4 { background: #3498db; }
.ph-c5 { background: #2ecc71; }
.ph-c6 { background: #f39c12; }
.ph-c7 { background: #9b59b6; }
.ph-c8 { background: #34495e; }
.ph-c9 { background: #16a085; }
.ph-c10 { background: #d35400; }

/* ============ 列表 / 网格通用 ============ */
.grid { font-size: 0; }
.grid .cell {
    display: inline-block;
    font-size: 14px;
    vertical-align: top;
    padding: 8px;
    box-sizing: border-box;
}
.grid-g2 .cell { width: 50%; }
.grid-g3 .cell { width: 33.33%; }
.grid-g4 .cell { width: 25%; }
.grid-g5 .cell { width: 20%; }
.grid-g6 .cell { width: 16.66%; }

/* 歌单/歌手卡片外面那层(取代裸 cell) */
.pl-cell, .artist-cell {
    display: inline-block;
    font-size: 14px;
    vertical-align: top;
    padding: 8px;
    box-sizing: border-box;
    width: 20%;
}
.grid-wrap { font-size: 0; }
.grid-wrap.pl-g4 .pl-cell { width: 25%; }

/* ============ 空态 / 加载中 / 轻提示 ============ */
.empty {
    padding: 40px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}
.loading {
    padding: 30px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}
.loading:before {
    content: "";
    display: inline-block;
    width: 14px; height: 14px;
    margin-right: 8px;
    border: 2px solid #ddd;
    border-top-color: #7fbd9f;
    border-radius: 50%;
    vertical-align: -2px;
    animation: zl-spin 0.8s linear infinite;
}
@keyframes zl-spin { to { transform: rotate(360deg); } }

.zl-toast {
    position: fixed;
    left: 50%; bottom: 110px;
    transform: translateX(-50%);
    max-width: 80%;
    padding: 10px 22px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.zl-toast.show { opacity: 1; visibility: visible; }
.zl-toast.ok { background: rgba(47, 125, 95, 0.95); }

/* ============ 表单行 ============ */
.form-row { display: table; width: 100%; margin-bottom: 14px; }
.form-row .label {
    display: table-cell; width: 90px; text-align: right;
    padding-right: 12px; color: #666; vertical-align: middle;
}
.form-row .label .req { color: #e74c3c; margin-right: 4px; }
.form-row .control { display: table-cell; vertical-align: middle; }
.form-row .control .input { width: 280px; }
.form-row .hint { color: #999; font-size: 12px; margin-top: 4px; }

/* ============ 歌曲列表(多页共用) ============ */
.song-list { width: 100%; }
.song-list .row {
    display: table; width: 100%; height: 40px; line-height: 40px;
    border-bottom: 1px solid #f0f0f0;
}
.song-list .row:hover { background: #f9f9f9; }
.song-list .row.playing { background: #eff8f3; }
.song-list .row .col { display: table-cell; vertical-align: middle; padding: 0 10px; }
.song-list .row .col-rank { width: 40px; text-align: center; font-weight: bold; color: #999; font-size: 16px; }
.song-list .row .col-name { font-weight: bold; color: #333; }
.song-list .row .col-artist { width: 130px; color: #999; font-size: 13px; }
.song-list .row .col-artist a { color: #999; }
.song-list .row .col-artist a:hover { color: #338066; }
.song-list .row .col-dur { width: 60px; color: #999; font-size: 13px; text-align: right; }
.song-list .row .col-op { width: 70px; text-align: right; font-size: 14px; }
.song-list .row .col-op a { color: #bbb; margin-left: 8px; }
.song-list .row .col-op a:hover { color: #338066; }
/* 已收藏: 爱心变红(文字版 ♥ 走 .fav.on, 图标版走 .op-fav.on) */
.song-list .row .col-op a.fav.on { color: #f00; }
.song-list .row .col-op a.op-fav.on { color: #e74c3c; }
/* 点击列表行: 歌名放大一下再弹回, 0.5 秒动效(js/render.js 加/去 name-pop) */
@keyframes zl-name-pop {
    0%   { font-size: 14px; }
    35%  { font-size: 16px; }
    100% { font-size: 14px; }
}
.song-list .row .col-name.name-pop { animation: zl-name-pop .5s ease; }
.song-list .rank-1 { color: #e74c3c !important; }
.song-list .rank-2 { color: #3498db !important; }
.song-list .rank-3 { color: #2ecc71 !important; }

/* 歌单/歌手卡片 */
.playlist-card { text-align: center; margin-bottom: 16px; }
/* 歌单封面: 素材是 500x500 方图, 框子必须也是正方形, 否则 object-fit:cover 会把
 * 图上下裁掉一截。用 padding-top 撑高度, 图绝对定位铺满, 上下左右都居中。 */
.playlist-card .pl-box {
    position: relative;
    width: 100%; height: 0;
    padding-top: 100%;
}
/* height:0 + padding-top 撑出的方框, 内容高度是 0, 所以图必须绝对定位
 * (百分比高度只认内容盒, 直接写 height:100% 会变成 0) */
.playlist-card .pl-box > img,
.playlist-card .pl-box .ph-txt {
    position: absolute; left: 0; top: 0;
    width: 100%; height: 100%;
}
.playlist-card .pl-img { font-size: 15px; }
.playlist-card .title { margin-top: 8px; font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; }

.artist-card { text-align: center; margin-bottom: 16px; }
.artist-card .avatar-link { display: block; }
.artist-card .avatar-box {
    width: 90px; height: 90px;
    margin: 0 auto;
    border-radius: 50%;
    border: 2px solid #a8d6c1;
}
.artist-card .name { margin-top: 8px; font-size: 13px; color: #333; }

/* ============ 滑块拼图验证码 ============
 * 结构约定(见 js/common.js 的 SliderCaptcha):
 *   .captcha > .cap-frame(背景图 + 缺口 + 拼图块)
 *            > .cap-track(滑道) > .cap-fill / #cap-tip / #cap-handle
 */
.captcha { margin-bottom: 16px; }
/* 尺寸必须等于 api/captcha.php 里的坐标系(CAP_W×CAP_H = 320×160), 而且图片要 1:1 显示。
 * 这里原来是 width:100%, 卡片内容区是 346px, 于是背景图被横向放大 346/320 = 1.081 倍:
 * 缺口跟着右移, 拼图块却是按 1:1 的 left 走的 —— 用户眼睛对准了, 上报出去的横坐标
 * 却比服务端的目标大了 8%~20%, 超过 ±8px 容差, 怎么拖都是"验证失败"。
 * 改成固定 320×160 后, 图片像素 = CSS 像素, 对齐了就等于报对了。 */
.cap-frame {
    position: relative; width: 320px; height: 160px;
    margin: 0 auto;
    background: #eef2f5; overflow: hidden; user-select: none;
}
/* 用 fill 不用 cover: 万一以后有人把框改成非 2:1, fill 会明显变形(一眼能看出来),
 * cover 则是悄悄裁切 —— 缺口位置偏了却看不出来, 又变成上面那个 bug */
.cap-frame #cap-bg { display: block; width: 100%; height: 100%; object-fit: fill; }
.cap-frame #cap-piece {
    position: absolute; top: 58px; left: 0;
    width: 53px; height: 44px; z-index: 3;
    filter: drop-shadow(0 0 3px rgba(0,0,0,.6));
}
.cap-frame .cap-mask {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    background: rgba(168,214,193,.5); z-index: 2;
}
.cap-track {
    /* 和上面的图同宽, 滑块的行程才对得上图片的宽度 */
    position: relative; width: 320px; height: 40px; margin: 10px auto 0;
    background: #f1f4f6; border: 1px solid #e2e6e9;
    cursor: pointer; user-select: none;
    /* 手机上拖滑块时别让浏览器把这一下当成滚动, 否则 touchmove 会被吞掉 */
    touch-action: none;
}
.cap-track .cap-fill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    background: #d3eadf;
}
.cap-track .cap-fill.ok { background: #cdebd6; }
.cap-track #cap-handle {
    position: absolute; left: 0; top: -1px; bottom: -1px;
    width: 48px; background: #fff; border: 1px solid #ddd;
    text-align: center; line-height: 40px; font-size: 18px; color: #338066;
    cursor: grab; z-index: 2;
    touch-action: none;
}
.cap-track #cap-handle:active { cursor: grabbing; }
.cap-track #cap-tip {
    position: absolute; left: 0; right: 0; top: 0; bottom: 0;
    text-align: center; line-height: 40px;
    font-size: 13px; color: #999; z-index: 1; pointer-events: none;
}
.captcha.ok .cap-track { border-color: #2ecc71; }
