/* ==========================================================
   1. 基础样式 - 完全回退自 [styles - 副本 (2).css]
   ========================================================== */
@font-face {
  font-family: 'NewRodin';
  src: url('./FOT-NewRodin Pro EB.otf') format('opentype');
  font-weight: bold; font-style: normal; font-display: swap;
}

:root {
  --bg: #0b0f12;
  --surface: #12171c;
  --surface-2: #1c242c;
  --text: #ffffff;
  --muted: #a0a0a0;
  --accent: #5ad1ff;
  --border: #2c363f;
  --shadow: 0 10px 50px rgba(0,0,0,0.8);
}

.lv-0 { background-color: #053d87 !important; }
.lv-1 { background-color: #3e8a24 !important; }
.lv-2 { background-color: #6a6a21 !important; }
.lv-3 { background-color: #950000 !important; }
.lv-4 { background-color: #7c157c !important; }
.lv-5 { background-color: #f48df4 !important; color: #000 !important; }
.lv-6 { background-color: #cc7400 !important; }

html, body { background-color: #0b0f12; color: #ffffff; margin: 0; padding: 0; width: 100%; min-height: 100%; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'NewRodin', system-ui, sans-serif; line-height: 1.4; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

.site-header { position: relative; z-index: 100; background: rgba(11, 15, 18, 0.95); border-bottom: 1px solid var(--border); width: 100%; padding: 15px 0; }
.header-inner { max-width: 1500px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 15px; }
.brand { display: flex; flex-direction: column; width: 100%; }
.logo { font-size: 20px; font-weight: bold; letter-spacing: 1px; color: #fff; margin-bottom: 4px; }
.subtitle { font-size: 10px; color: var(--muted); line-height: 1.4; word-break: break-all; }
.subtitle a { color: var(--accent); text-decoration: underline; }

.controls-area { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bottom-row input[type="search"] { grid-column: span 2; }

.btn-tool, .tool-select, .search-bar input {
  background: var(--surface-2); border: 1px solid var(--border); color: #fff;
  padding: 10px; border-radius: 8px; font-family: 'NewRodin'; font-size: 13px; outline: none; width: 100%;
}

.video-setting { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.switch { position: relative; width: 34px; height: 18px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--border); border-radius: 34px; cursor: pointer; transition: 0.4s; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background: white; border-radius: 50%; transition: 0.4s; }
input:checked + .slider { background: var(--accent); }
input:checked + .slider:before { transform: translateX(16px); }

.content { max-width: 1500px; margin: 0 auto; padding: 16px; }
.stats-text { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

/* ==========================================================
   2. 卡片红心 (右上角 1.8x)
   ========================================================== */
.card-wrapper { position: relative; }

/* 首页红心容器 */
.card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); /* 阴影防止封面颜色干扰 */
}

/* 红心体积控制 */
.heart-icon { width: 20px; height: 20px; fill: #333; transition: fill 0.3s; }

/* 主界面 1.8倍 */
.card-fav .heart-icon {
  width: 36px; /* 20 * 1.8 */
  height: 36px;
}

.fav-click-area { cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; user-select: none; }
.fav-click-area.active .heart-icon { fill: #ff4e4e; }
.fav-click-area:active { transform: scale(1.3); }

/* ==========================================================
   3. 播放页红心 (2.0x 居中布局)
   ========================================================== */
.info-panel .fav-click-area .heart-icon {
  width: 64px; /* 32 * 2.0 */
  height: 64px;
}

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1); display: block; }
.img-container { aspect-ratio: 1; overflow: hidden; background: #000; }
.cover { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover { transform: translateY(-5px); border-color: var(--accent); }
.card:hover .cover { transform: scale(1.1); }

.meta { padding: 12px; }
.title { font-size: 13px; font-weight: bold; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: 11px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.badge { font-size: 8px; padding: 2px 6px; border-radius: 4px; font-weight: bold; color: #fff; }

/* 播放页布局 */
.player-page { display: flex; flex-direction: column; width: 100%; height: auto; }
.unity-wrapper { width: 100%; aspect-ratio: 1 / 1; background: #000; position: relative; flex-shrink: 0; }
#unity-canvas { width: 100% !important; height: 100% !important; display: block; }

.info-panel { 
  flex: 1; padding: 40px 20px; display: flex; flex-direction: column; 
  justify-content: center; align-items: center; text-align: center; gap: 24px;
}

.song-main-stats { display: flex; gap: 30px; background: var(--surface); padding: 15px; border-radius: 12px; border: 1px solid var(--border); }
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.stat-value { font-size: 18px; font-weight: bold; color: var(--accent); }

.level-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn-lv { padding: 12px 18px; border: none; border-radius: 8px; color: #fff; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-download { padding: 15px; border: 2px solid var(--accent); border-radius: 10px; background: transparent; color: var(--accent); font-weight: bold; cursor: pointer; width: 100%; max-width: 300px; }

/* Desktop 适配 */
@media (min-width: 1024px) {
  .player-page { flex-direction: row-reverse; height: calc(100vh - 70px); overflow: hidden; }
  .unity-wrapper { height: 100%; width: auto; }
  .info-panel { padding: 60px; overflow-y: auto; }
}

@media (min-width: 768px) {
  .header-inner { flex-direction: row; align-items: center; padding: 0 24px; gap: 30px; }
  .controls-area { width: auto; align-items: flex-end; margin-left: auto; }
  .bottom-row { display: flex; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
  .user-status { border-top: none; padding-top: 0; border-left: 1px solid var(--border); padding-left: 15px; margin-top: 0; margin-left: 15px; display: inline-block; }
}

.user-status { font-size: 11px; margin-top: 6px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 6px; }
.user-status a { color: var(--accent); font-weight: bold; }