/* ================= 基础重置 ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6; min-height: 100vh; width: 100%;
    background-color: #111 !important; overflow: hidden !important; 
}

.huge-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    object-fit: cover; object-position: center center; z-index: -1; pointer-events: none; 
}

/* ================= 绝对居中大外壳 ================= */
.absolute-center-wrapper {
    position: relative; width: 100% !important; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: flex-start; padding-top: 20px;
}

.app-container {
    width: 100%; max-width: 1600px; margin: 0 auto; display: flex; flex-direction: column;
    padding: 0 40px; box-sizing: border-box;
}

/* ================= 核心：网格布局 ================= */
.grid-layout {
    display: grid; grid-template-columns: 340px 720px 360px; grid-template-rows: 90px 60px 540px; 
    gap: 20px 30px; width: fit-content; margin: 0 auto; 
}

.grid-toolbar { grid-column: 1 / 4; grid-row: 1 / 2; } 

.grid-title { 
    grid-column: 1 / 4; grid-row: 2 / 3; display: flex; align-items: center; justify-content: center; padding: 0 20px;
}

.grid-notice { grid-column: 1 / 2; grid-row: 3 / 4; height: 100%; min-height: 0; } 
.grid-playlist { grid-column: 3 / 4; grid-row: 3 / 4; height: 100%; min-height: 0; } 

.grid-player { grid-column: 2 / 3; grid-row: 3 / 4; align-self: center; } 

/* ================= 通用透明卡片 ================= */
.white-card {
    background: rgba(0, 0, 0, 0.45); border: 1.5px solid #d81e5b; border-radius: 20px; 
    box-shadow: 0 0 18px rgba(216, 30, 91, 0.55), inset 0 0 10px rgba(216, 30, 91, 0.25); overflow: hidden; 
}

/* ================= 1. 工具栏 ================= */
.toolbar-box { display: flex; flex-direction: column; justify-content: center; width: 100%; overflow: hidden; }
.toolbar { display: flex; gap: 15px; align-items: center; width: 100%; }
.tool-group { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.search-group { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; position: relative; }
.search-container { position: relative; flex: 1; }
.search-container input { 
    width: 100%; padding: 12px 20px; border: 1.5px solid rgba(216, 30, 91, 0.7); border-radius: 12px; 
    background: rgba(255, 255, 255, 0.15); color: #fff; outline: none; box-sizing: border-box; 
    transition: all 0.2s; font-size: 16px; box-shadow: 0 0 12px rgba(216, 30, 91, 0.35), inset 0 0 6px rgba(216, 30, 91, 0.1);
}
.search-container input:focus { border-color: #ff4d85; background: rgba(255, 255, 255, 0.25); box-shadow: 0 0 18px rgba(216, 30, 91, 0.7), inset 0 0 8px rgba(216, 30, 91, 0.2); }
.search-container input::placeholder { color: rgba(255, 255, 255, 0.6); }

.dropdown-list { 
    position: absolute; top: 100%; left: 0; width: 100%; max-height: 250px; overflow-y: auto; 
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); 
    border-radius: 12px; box-shadow: 0 0 20px rgba(216, 30, 91, 0.5); z-index: 99999; display: none; 
    margin: 8px 0 0 0; padding: 10px 0; list-style: none; border: 1.5px solid #d81e5b; 
}
.dropdown-list li { padding: 12px 20px; cursor: pointer; font-size: 15px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown-list li:hover { background-color: rgba(216, 30, 91, 0.6); }

.right-tools { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }

.toolbar button, .toolbar .btn-avatar, .toolbar .btn-back { 
    border: 1.5px solid rgba(216, 30, 91, 0.7); border-radius: 12px; background: rgba(255, 255, 255, 0.15); 
    color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; 
    text-decoration: none; flex-shrink: 0; transition: all 0.2s; box-shadow: 0 0 12px rgba(216, 30, 91, 0.4);
}
.toolbar button:hover, .toolbar .btn-avatar:hover, .toolbar .btn-back:hover { 
    background: rgba(255, 255, 255, 0.3); transform: translateY(-2px); box-shadow: 0 0 20px rgba(216, 30, 91, 0.8);
}

.btn-sync { 
    width: 48px; height: 48px; border-radius: 50% !important; font-size: 22px; 
    background: #c2185b !important; border: 1.5px solid #e91e63 !important; color: #fff; 
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.7), inset 0 0 8px rgba(255, 255, 255, 0.3) !important; transition: all 0.2s; 
}
.btn-sync:hover { background: #e91e63 !important; box-shadow: 0 0 20px rgba(233, 30, 99, 0.95) !important; transform: translateY(-2px); }

.btn-play { padding: 0 20px; height: 48px; font-size: 16px; font-weight: bold; background: rgba(255, 255, 255, 0.15) !important; }

.btn-link { 
    padding: 0 20px !important; height: 48px; font-size: 15px; font-weight: bold; white-space: nowrap; 
    background: #c2185b !important; border: 1.5px solid #e91e63 !important; color: #fff; border-radius: 12px; 
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.7), inset 0 0 8px rgba(255, 255, 255, 0.3) !important; transition: all 0.2s; 
}
.btn-link:hover { background: #e91e63 !important; box-shadow: 0 0 20px rgba(233, 30, 99, 0.95) !important; transform: translateY(-2px); }

.btn-back { padding: 0 20px; height: 48px; font-size: 16px; font-weight: bold; }

.avatar-wrapper { display: flex; flex-direction: column; align-items: center; }
.btn-avatar { 
    width: 48px; height: 48px; border-radius: 50% !important; overflow: hidden; padding: 0; 
    border: 2px solid rgba(216, 30, 91, 0.8) !important; 
    box-shadow: 0 0 15px rgba(216, 30, 91, 0.8), inset 0 0 8px rgba(216, 30, 91, 0.5) !important; transition: box-shadow 0.2s ease; 
}
.btn-avatar:hover { box-shadow: 0 0 22px rgba(216, 30, 91, 1), inset 0 0 10px rgba(216, 30, 91, 0.7) !important; }
.btn-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ================= 标题与时间 ================= */
#play-status { justify-content: center; text-align: center; overflow: hidden; }
#play-status-text { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; color: #fff; font-weight: bold; font-size: 16px; transition: font-size 0.2s ease; }
#time-display { font-size: 16px; font-family: monospace; color: #fff; opacity: 1; white-space: nowrap; text-shadow: 0 0 6px #e91e63, 0 0 12px #e91e63, 0 0 18px #e91e63; }
.white-card.time-display { border: 1.5px solid #d81e5b !important; box-shadow: 0 0 15px rgba(216, 30, 91, 0.6) !important; }

/* ================= 3. 播放列表 ================= */
.playlist-container { display: flex; flex-direction: column; height: 100%; width: 100%; }
.playlist-header { padding: 18px 22px; font-size: 18px; font-weight: bold; color: #fff; border-bottom: 1px solid rgba(216, 30, 91, 0.4); flex-shrink: 0; text-shadow: 0 0 6px #d81e5b, 0 0 12px #d81e5b; }
.playlist-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
.playlist-scroll::-webkit-scrollbar { width: 8px; background: transparent; }
.playlist-scroll::-webkit-scrollbar-track { background: transparent; }
.playlist-scroll::-webkit-scrollbar-thumb { background: rgba(216, 30, 91, 0.5); border-radius: 4px; }

.playlist-inner { display: flex; flex-direction: column; width: 100%; } 
.playlist-item { display: flex; font-size: 19px; color: #fff; cursor: pointer; border-bottom: 1px solid rgba(216, 30, 91, 0.2); transition: background 0.2s; width: 100%; align-items: center; }
.playlist-item:hover, .playlist-item.active { background-color: rgba(216, 30, 91, 0.6); }
.playlist-item.active { font-weight: bold; }
.playlist-item .index { color: rgba(255, 255, 255, 0.9); width: 48px; padding: 12px 0 12px 18px; flex-shrink: 0; position: sticky; left: 0; z-index: 2; font-size: 19px; text-shadow: 0 0 1.5px #d81e5b, 0 0 3px #d81e5b; }
.playlist-item .title-wrap { flex: 1; overflow: hidden; white-space: nowrap; padding: 12px 18px 12px 0; display: flex; }
.playlist-item .title { display: inline-block; transition: transform 0.3s ease; text-shadow: 0 0 1.5px #d81e5b, 0 0 3px #d81e5b; font-size: 19px; }
.playlist-item:hover .title { transform: translateX(calc(-100% + 180px)); transition: transform 5s linear; }
.playlist-item:not(:hover) .title { transform: translateX(0); transition: transform 0.3s ease-out; }

/* ================= 4. 播放器 ================= */
.player-flex-box { width: 100%; position: relative; }
#player-wrapper { width: 100%; aspect-ratio: 16 / 9; position: relative; border-radius: 20px; overflow: hidden; border: 1.5px solid #d81e5b; box-shadow: 0 0 20px rgba(216, 30, 91, 0.7), inset 0 0 10px rgba(216, 30, 91, 0.3); background: transparent; }
#player-loading { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; z-index: 2; text-shadow: 0 0 8px rgba(216, 30, 91, 0.9); }
iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; background: transparent; opacity: 0; transition: opacity 0.5s ease; display: block; }

/* ================= 5. 公告栏 ================= */
.message-board { display: flex; flex-direction: column; height: 100%; width: 100%; }
.message-header { padding: 18px 22px; font-size: 18px; font-weight: bold; color: #fff; border-bottom: 1px solid rgba(216, 30, 91, 0.4); flex-shrink: 0; text-shadow: 0 0 6px #d81e5b, 0 0 12px #d81e5b; }
.message-list { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.message-list::-webkit-scrollbar { width: 8px; }
.message-list::-webkit-scrollbar-thumb { background: rgba(216, 30, 91, 0.5); border-radius: 4px; }
.message-item, .message-list p { font-size: 17px; color: #fff; line-height: 1.6; word-break: break-all; text-shadow: 0 0 1.5px #d81e5b, 0 0 3px #d81e5b; }

/* ================= 底部导航 ================= */
.bottom-nav-wrapper { margin-top: 35px; margin-bottom: 15px; }
.icon-item { text-decoration: none !important; display: flex; flex-direction: column; align-items: center; transition: transform 0.2s ease-in-out; gap: 12px; }
.icon-item:hover { transform: scale(1.1); }
.icon-circle { width: 72px; height: 72px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.15); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; border: 1.5px solid rgba(216, 30, 91, 0.5); box-shadow: 0 0 15px rgba(216, 30, 91, 0.5), inset 0 0 8px rgba(216, 30, 91, 0.2); transition: box-shadow 0.2s ease; }
.icon-item:hover .icon-circle { box-shadow: 0 0 22px rgba(216, 30, 91, 0.9), inset 0 0 10px rgba(216, 30, 91, 0.4); }
.icon-label { font-size: 18px; font-weight: 600; white-space: nowrap; text-shadow: 0 0 6px #d81e5b, 0 0 12px #d81e5b; }
.icon-item.active .icon-circle { background-color: #d81e5b; border-color: #d81e5b; box-shadow: 0 0 22px rgba(216, 30, 91, 0.95), inset 0 0 10px rgba(255, 255, 255, 0.3); }
.icon-item.active .icon-label { color: #fff; font-weight: bold; font-size: 20px; }

/* ================= 等比缩放控制 ================= */
#scale-wrapper { width: 1920px; height: 1080px; position: absolute; top: 0; left: 50%; transform-origin: top center; transition: transform 0.1s ease-out; display: flex; flex-direction: column; }

/* ==========================================================================
   👇 移动端预留布局 (适用于手机屏幕) 👇
   ========================================================================== */
@media screen and (max-width: 768px) {
    #scale-wrapper { position: relative; width: 100% !important; height: auto !important; min-height: 100vh; left: auto; transform: none !important; }
    html, body { overflow: auto !important; }
    .app-container { padding: 0 15px; }
    .grid-layout { display: flex; flex-direction: column; width: 100%; gap: 15px; }
    .grid-toolbar, .grid-title, .grid-player, .grid-notice, .grid-playlist { width: 100% !important; height: auto !important; }
    .toolbar { flex-wrap: wrap; gap: 10px; }
    .search-group { order: 3; width: 100%; flex: auto; margin-top: 5px; }
    .right-tools { flex-wrap: wrap; justify-content: space-between; width: 100%; }
    .btn-link, .time-display, .btn-back { display: none !important; }
    #player-wrapper { border-radius: 12px; }
    .grid-notice, .grid-playlist { height: 250px !important; flex: none; }
    .message-list, .playlist-scroll { height: 200px; }
    .bottom-nav-wrapper { margin-top: 20px; padding-bottom: 20px; }
    .bottom-nav-wrapper > nav > div { justify-content: flex-start !important; overflow-x: auto; padding-bottom: 10px; gap: 30px !important; -ms-overflow-style: none; scrollbar-width: none; }
    .bottom-nav-wrapper > nav > div::-webkit-scrollbar { display: none; }
    .icon-circle { width: 50px; height: 50px; font-size: 24px; }
    .icon-label { font-size: 14px; }
    .icon-item.active .icon-label { font-size: 15px; }
}