/* ===== 复刻 VioletBlue 原站配色与排列方式（去自定义字体依赖） ===== */
:root {
    --title: #FFF;               /* 大背景卡片已变黑，面板文字需白色才可读 */
    --line-color: blueviolet;
    --all-text: #FFF;            /* 同上：面板文字（签名/介绍）需白字 */
    --scroll-bar: rgba(138, 43, 226, .2);
    --tag-text: rgb(86, 35, 133);   /* 歌单内容文字：浅底深紫（还原） */
    --tag-background: rgba(138, 43, 226, .2);
    --song-card: rgba(249, 216, 255, .55);  /* 歌单小卡片：浅紫（还原） */
    --song-card-claim: rgba(249, 216, 255, .85);
    --type: #D8BFD8;
    --type-selected: #9370DB;
    --button-color: #9370DB;
}

html, body {
    width: 100vw;
    height: 100vh;
    min-width: 720px;
    margin: 0;
    padding: 0;
}
body {
    background-color: #000;
    font-family: "站酷", "狮尾", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
/* 固定背景图层：脱离文档流钉在视口，滚动歌单时背景不动（苹果/安卓均生效） */
#bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: url(../img/background.png) center / cover no-repeat;
}
body, .copy {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.title {
    font-size: 1.2vw;
    font-family: "站酷", sans-serif;
    color: var(--title);
    position: relative;
    font-weight: bolder;
    height: 2vh;
    line-height: 2vh;
    top: 2.8vh;
    left: 1vw;
}
.title::after {
    position: absolute;
    content: "";
    width: 5vw;
    height: 0.6vh;
    background: var(--line-color);
    left: -0.4vw;
    opacity: .5;
    bottom: -1.2vh;
}

.view {
    position: relative;
    overflow: hidden;
    width: 90vw;
    height: 92vh;
    top: 3vh;
    left: 5vw;
}
.card {
    border-radius: 2px;
    box-shadow: 1px 1px 5px #dcdcdc;
    background-color: rgba(0, 0, 0, .35);
}
.view_bio, .view_song {
    height: 92vh;
    position: absolute;
    top: 0;
}
.view_song { width: 67.6vw; left: 0; }
.view_bio { width: 22vw; right: 0; padding-top: 6vh; }

.bio, .search_box, .notice, .type_box { width: 22vw; }
.nickname, .sign, .notice, .user_data_title, .user_title_value {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    word-break: break-all;
}
.bio { height: 40vh; }
/* 桌面端：搜索框定位到右栏顶部，但右栏 .view_bio 同为 absolute 且后渲染会盖住它
   导致搜索/随机点不到，这里给更高 z-index 让它浮在上面可点击（手机端 search_box 为 static，z-index 无效无副作用） */
.search_box { position: absolute; right: 0; top: 0; margin-top: 0.5vh; height: 5.5vh; overflow: hidden; z-index: 5; }
.notice_box { margin-top: 0.5vh; height: 14vh; overflow: hidden; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.type_box { margin-top: 0.5vh; height: 34vh; overflow: hidden; }

.face {
    width: 12vh;
    height: 12vh;
    margin: 5vh calc(11vw - 6vh) 0 calc(11vw - 6vh);
    border-radius: 50%;
}
.nickname {
    font-size: 1.2vw;
    font-family: "站酷";
    font-weight: 750;
    color: var(--title);
    width: 16vw;
    text-align: center;
    margin: 0.4vh 3vw 0 3vw;
    -webkit-line-clamp: 1;
}
.user_data_box { width: 20vw; height: 5vh; margin: 1.5vh 1vw 0 1vw; overflow: hidden; }
.user_data_part { width: calc((20vw - 1px) / 2); height: 5vh; float: left; text-align: center; }
.user_data_cutline { width: 1px; height: 5vh; float: left; background-color: #dcdcdc; }
.user_data_title, .user_data_value {
    font-family: "站酷";
    font-weight: 750;
    color: var(--title);
    line-height: 2.45vh;
    width: calc((20vw - 1px) / 2);
    -webkit-line-clamp: 1;
}
.user_data_title { margin-top: 0.1vh; font-size: 1vw; }
.user_data_value { font-size: 0.9vw; }
.sign { font-size: 1.1vw; width: 20vw; margin: 1.3vh 1vw 0 1vw; line-height: 1.6; -webkit-line-clamp: 3; color: var(--all-text); text-align: center; }

.search_form { display: flex; align-items: center; gap: 0.5vw; height: 3.7vh; margin: 0.85vh 0.5vw; overflow: hidden; }
.search_input {
    flex: 1; min-width: 0; height: 3.7vh; line-height: 3vh; font-size: 0.8vw;
    border: 0; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,.1);
    padding-left: 8px; font-family: inherit;
}
.search_input:focus { outline: 0; box-shadow: 0 4px 8px rgba(0,0,0,.1); }
.search_button {
    flex: 0 0 auto; min-width: 4vw; padding: 0 0.9vw; height: 3.7vh; line-height: 3vh; font-size: 0.8vw;
    background-color: var(--button-color); color: white; border: 0; border-radius: 5px;
    cursor: pointer; outline: 0; font-family: inherit; white-space: nowrap;
}
#randomBtn { background-color: var(--type-selected); }
.search_button:hover { background-color: var(--type-selected); }

/* 公告栏：桌面端与手机版欢迎页均居中（仅改此处，不动其他桌面布局） */
.notice { width: 20vw; height: auto; max-height: 12vh; margin: 1vh 1vw; -webkit-line-clamp: 8; line-height: 1.7; font-size: 1.1vw; color: var(--all-text); text-align: center; }

.type_list { overflow: auto; width: 20vw; height: 29vh; margin: 4vh 0 0 0.1vw; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; column-gap: 6px; }
.type, .type_selected {
    text-align: center; line-height: 3.5vh; min-width: 2.5vh; font-size: large; letter-spacing: 5px;
    border-radius: 5px; border: solid; border-width: 0.3vh 0.8vw; margin: 5px 0 0 0;
    overflow: hidden; float: left; list-style-type: none; cursor: pointer;
}
.type { background-color: var(--type); border-color: var(--type); color: #000; }
.type_selected { background-color: var(--type-selected); border-color: var(--type-selected); color: #fff; }

.song_list {
    width: 64vw; height: 84vh; padding: 0; margin: 4.6vh 1.8vw 0 1.8vw; overflow: auto;
}
.song_list::-webkit-scrollbar { width: 0.7vw; height: 1px; }
.song_list::-webkit-scrollbar-thumb {
    border-radius: 10px; background-color: var(--scroll-bar);
    background-image: -webkit-linear-gradient(45deg, rgba(255,255,255,.2)25%, transparent 25%, transparent 50%, rgba(255,255,255,.2)50%, rgba(255,255,255,.2)75%, transparent 75%, transparent);
}
.song_list::-webkit-scrollbar-track { box-shadow: inset 0 0 5px rgba(255,255,255,.2); background: #ededed; border-radius: 10px; }

.song_item {
    float: left; position: relative; margin: 0.5vh 0.5vw;
    width: 20vw; min-width: 330px; height: 9vh;
    background: var(--song-card); list-style-type: none; border-radius: 5px;
    cursor: pointer;
}
.song_item_claim { background: var(--song-card-claim); }
.claim { position: absolute; right: 0.3vw; top: 0.5vh; font-size: 0.8vw; color: var(--tag-text); }
.info_tag_area { position: absolute; margin: 0.5vh 0.5vw; width: 18vw; display: inline-block; bottom: 0.5vh; }
.info_tag {
    text-align: center; line-height: 2.5vh; min-width: 20px; font-size: 0.7vw; font-weight: 600;
    padding: 0 10px 0 10px; letter-spacing: 5px; border-radius: 5px; margin: 5px 10px 0 0;
    overflow: hidden; float: left; list-style-type: none; background-color: var(--tag-background); color: var(--tag-text);
}
.song_info {
    position: absolute; width: 70%; padding-left: 20px; overflow: hidden;
    white-space: nowrap; text-overflow: ellipsis; word-break: break-all; top: 15px; font-size: large;
}
.song_info::after {
    position: absolute; content: ""; width: 4px; height: 100%;
    background: var(--line-color); left: 12px; border-radius: 5px; opacity: .4;
}
.song_name { color: var(--tag-text); font-weight: 600; }
.face_link { display: block; cursor: pointer; }
.face_link:hover .face { opacity: .85; }
.nickname_link { display: block; text-align: center; text-decoration: none; }
.nickname_link:hover .nickname { color: var(--type-selected); }

/* 空状态 */
.empty {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
    color: var(--all-text); font-size: 1vw; display: none;
}

/* 复制提示 */
.toast {
    position: fixed; left: 50%; bottom: 9vh; transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 8px;
    font-size: 14px; opacity: 0; transition: .3s; pointer-events: none; z-index: 99; max-width: 80vw;
}

/* 页脚 */
footer {
    position: fixed; overflow: hidden; width: 100%; height: 4vh; bottom: 0;
    border-radius: 2px; border: 0; box-shadow: 1px 1px 5px #dcdcdc;
    background-color: rgba(0, 0, 0, .6); text-align: center; padding: 0;
}
nav ul { margin: 0; list-style-type: none; color: gray; line-height: 4vh; font-size: smaller; }
nav ul li { display: inline; margin-right: 10px; }
nav ul li a { color: gray; text-decoration: none; }
nav ul li a:hover { color: var(--type-selected); }

/* ===== 手机版专用结构（桌面端默认隐藏/无影响） ===== */
/* 包裹层：桌面端仅作占位（搜索框绝对定位脱离它），手机端变吸顶容器 */
.mobile_head { position: static; }
/* 手机版顶部横向标签栏：桌面端隐藏 */
.mobile_tags { display: none; }
/* 手机版欢迎页：桌面端隐藏 */
.welcome { display: none; }

/* ===== 手机版适配（≤768px） ===== */
@media (max-width: 768px) {
  html, body { min-width: 0; }

  .view {
    position: static;
    width: 100vw; height: auto;
    top: 0; left: 0;
    padding: 118px 8px 8px; box-sizing: border-box;  /* 顶部留给 fixed 顶栏，app.js 会按实高修正 */
    overflow: visible;
  }

  /* 搜索栏 + 标签栏 始终置顶：改用 fixed 钉死视口（部分移动浏览器 sticky 叠加
     backdrop-filter 会失效，下拉多了顶栏跟着滚走）；app.js 按顶栏实高给 .view 预留空间 */
  .mobile_head {
    position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    display: flex; flex-direction: column; gap: 8px;
    margin: 0; padding: 8px; box-sizing: border-box;
    background: rgba(0,0,0,.35);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
  }
  .search_box {
    position: static; width: 100%; height: auto; overflow: visible;
    margin: 0; padding: 8px; box-sizing: border-box; border-radius: 12px;
  }
  .mobile_tags {
    display: flex; gap: 8px; width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 4px 8px; box-sizing: border-box; border-radius: 12px;
    white-space: nowrap;
  }
  .chip {
    flex: 0 0 auto; display: inline-block;
    padding: 6px 14px; border-radius: 999px;
    background: var(--type); color: #000;
    font-size: 14px; line-height: 1.4; cursor: pointer; user-select: none;
    border: 1px solid transparent;
  }
  .chip_on { background: var(--type-selected); color: #fff; }

  /* 歌单 */
  .view_song {
    position: static; width: 100%; left: auto; right: auto;
    border-radius: 12px;
  }
  /* 右栏介绍/标签在手机端隐藏：介绍进欢迎页，标签进顶部 chip 栏 */
  .view_bio { display: none; }

  .bio, .search_box, .notice_box, .type_box { width: 100%; }
  .title {
    font-size: 18px; left: 6px; top: 0;
    height: auto; line-height: 1.4;
    margin-top: 6px;
  }
  .title::after { left: 4px; bottom: -6px; height: 0.4vh; width: 40px; }

  /* 歌单列表改为整页滚动，确保无限加载在手机上可用 */
  .song_list {
    width: 100%; height: auto; max-height: none;
    margin: 12px 0 0 0; padding: 0;
    overflow: visible;
  }
  /* 手机端：歌名与风格标签同一行（歌名左、标签右）；歌名过长自动省略，标签区限宽不挤压 */
  .song_item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; min-width: 0;
    height: auto; min-height: 0;
    margin: 8px 0;
    padding: 10px 12px; box-sizing: border-box;
    border-radius: 10px;
  }
  .song_info {
    position: static; order: 1;
    flex: 1 1 auto; min-width: 0;
    width: auto; top: auto;
    font-size: 15px; padding-left: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal;
  }
  .song_info::after { left: 2px; }
  /* 修复：手机端 .info_tag 原 font-size:0.7vw≈2.7px，风格标签会变成“两个点”，这里放大 */
  .info_tag { font-size: 12px; letter-spacing: 1px; padding: 2px 8px; line-height: 1.9; float: none; margin: 0; }
  .claim { font-size: 12px; order: 3; flex: 0 0 100%; position: static; margin: 6px 0 0; }
  .info_tag_area {
    position: static; order: 2;
    flex: 0 0 auto; width: auto; max-width: 42%;
    margin: 0;
    display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px;
  }
  .face { width: 76px; height: 76px; margin: 10px auto 0; }
  .nickname { font-size: 16px; }
  .sign { font-size: 13px; line-height: 1.7; -webkit-line-clamp: 4; width: auto; margin: 6px 12px 0; word-break: normal; overflow-wrap: break-word; }
  .notice { font-size: 13px; line-height: 1.8; }

  .user_data_box { width: 100%; margin: 1.5vh 0 0; }
  .user_data_part, .user_data_title, .user_data_value { width: calc((100% - 1px) / 2); }

  .search_form { height: auto; flex-wrap: wrap; gap: 8px; margin: 0.6vh 0.5vw; }
  .search_input { font-size: 16px; height: 40px; line-height: 40px; }
  .search_button { height: 40px; line-height: 40px; min-width: 64px; font-size: 14px; }

  footer { height: auto; padding: 4px 0; }
  nav ul { line-height: 1.6; font-size: 12px; }

  /* ===== 手机版欢迎页 ===== */
  .welcome {
    display: flex; align-items: center; justify-content: center;
    position: fixed; inset: 0; z-index: 200;
    padding: 20px; box-sizing: border-box;
    background: rgba(0,0,0,.55);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  html.entered .welcome { display: none !important; }
  .welcome_inner {
    width: 100%; max-width: 360px;
    background: rgba(0,0,0,.45);
    border-radius: 16px; padding: 22px 18px;
    text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.4);
  }
  .welcome_head { display: flex; flex-direction: column; align-items: center; }
  .welcome .face { width: 84px; height: 84px; margin: 0 auto 10px; }
  .welcome .nickname { font-size: 18px; margin: 0 0 10px; }
  /* 关注/粉丝 改 flex 均分：修掉 float+vw 宽度导致的左右不对称 */
  .welcome .user_data_box {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: auto; margin: 0 0 10px; overflow: visible;
  }
  .welcome .user_data_part { float: none; flex: 1 1 0; width: auto; height: auto; text-align: center; }
  .welcome .user_data_title, .welcome .user_data_value { width: auto; }
  .welcome .user_data_cutline { float: none; flex: 0 0 1px; width: 1px; height: 34px; background: rgba(255,255,255,.45); }
  /* 放大欢迎页「关注/粉丝」字号（原 1vw/0.9vw 在手机上约 3~4px 太小） */
  .welcome .user_data_title { font-size: 13px; }
  .welcome .user_data_value { font-size: 17px; font-weight: 750; }
  /* 个签：修掉桌面 20vw 窄宽 + break-all 导致的"歌单-dagel.li/ve"断行 */
  .welcome .sign { -webkit-line-clamp: 3; margin: 0 0 14px; width: auto; word-break: normal; overflow-wrap: break-word; }
  .welcome .notice_box { width: 100%; height: auto; margin: 16px 0 18px; border-radius: 12px; }
  .welcome .notice { width: auto; height: auto; margin: 1vh 0; -webkit-line-clamp: 8; }
  .enter_btn {
    display: block; width: 100%; padding: 14px 0;
    font-size: 16px; font-weight: 700; color: #fff;
    background: var(--type-selected); border: 0; border-radius: 999px;
    cursor: pointer; font-family: inherit;
  }
  .enter_btn:active { background: var(--button-color); }
}

/* ===== 超窄屏（≤380px，如 iPhone SE / 旧款安卓）微调，避免个签/标签被挤压换行 ===== */
@media (max-width: 380px) {
  .welcome_inner { padding: 16px 13px; }
  .welcome .face { width: 68px; height: 68px; }
  .welcome .nickname { font-size: 16px; }
  .welcome .sign { font-size: 12px; -webkit-line-clamp: 2; }
  .welcome .notice { font-size: 12px; }
  .welcome .user_data_title, .welcome .user_data_value { white-space: nowrap; }
  .chip { font-size: 13px; padding: 5px 12px; }
  /* 搜索框字号保持 ≥16px：低于 16px 移动浏览器聚焦输入框时会自动放大页面 */
  .search_input { height: 38px; line-height: 38px; }
  .search_button { min-width: 56px; font-size: 13px; }
}
