/* --- 全域設定 Global Settings --- */
:root {
  --primary-color: #00e0ff; /* 霓虹青 */
  --bg-dark: #000000;
  --bg-card: #121212;
  --text-main: #ffffff;
  --text-dim: #bbbbbb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Helvetica Neue', Noto Sans TC, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* --- 頂部導覽列 Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #222;
  padding: 15px 0;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-logo {
  font-family: Impact, sans-serif;
  font-size: 1.8rem;
  color: var(--primary-color);
  text-decoration: none;
  border: 2px solid var(--primary-color);
  padding: 0 10px;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* --- 英雄區塊 Hero --- */
.hero{
  position: relative;
  min-height: 100svh;        /* ✅ 手機/平板高度更準 */
  background: #000;          /* ✅ 黑底由 hero 控制 */
  overflow: hidden;          /* ✅ logo 不跑出 hero */

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: clamp(40px, 8vw, 120px) 20px; /* ✅ RWD spacing 穩定 */
}

/* DVD bouncing only inside hero */
#dvd-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero > *:not(#dvd-bg){
  position: relative;
  z-index: 2; /* ✅ LABEL P/按鈕都會蓋住 logo */
}

#dvd-logo{
  position: absolute;
  width: min(110px, 16vw);
  height: auto;
  opacity: .12;            /* ✅ 平常淡 */
  will-change: transform, opacity;
}

.logo {
  font-family: Impact, sans-serif;
  font-size: clamp(3rem, 10vw, 6rem);
  margin: 0;
  color: #fff;
  letter-spacing: 4px;
}

.tagline {
  margin: 20px 0 40px;
  font-family: 'Roboto Condensed', sans-serif;
  color: var(--text-dim);
  font-size: 1.2rem;
  letter-spacing: 2px;
}

/* --- 按鈕樣式 Buttons --- */
.btn-hero, .btn {
  padding: 12px 30px;
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  border-radius: 50px;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-hero:hover, .btn:hover {
  background: var(--primary-color);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.5);
}

/* ✅ 只在首頁 hero：按鈕有不透明底色，完整遮住底下 DVD logo（不影響其他頁） */
.hero .btn-hero,
.hero .btn {
  background: rgba(0,0,0,0.92);
  box-shadow: 0 10px 28px rgba(0,0,0,0.38);
}

/* 保險：按鈕區塊更高一層（即使未來你改其他 z-index 也穩） */
.hero-actions{
  position: relative;
  z-index: 3;
}

/* --- 網格佈局 Grid --- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 20px;
}

.section-title {
  font-family: Impact, sans-serif;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: 2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 22px 20px;
  text-align: center;
  border: 1px solid #222;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-10px);
  border-color: #444;
  box-shadow: 0 10px 35px rgba(0,0,0,0.45);
}

.card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}

/* --- 搜尋輸入框（Songs Search UI） --- */
.input, .textarea {
  width: 100%;
  background: rgba(26,26,26,0.9);
  color: #fff;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 14px 14px;
  margin-top: 5px;
  margin-bottom: 20px;
  outline: none;
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(255,255,255,0.55);
}

.input:focus,
.textarea:focus {
  border-color: rgba(0, 224, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 224, 255, 0.12);
}

/* --- 搜尋結果卡片：更像音樂平台的排版 --- */
.song-meta {
  margin-top: 2px;
}

.song-artist {
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.65);
  margin: 0 0 6px 0;
}

.song-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 18px 0;
  letter-spacing: 0.5px;
}

.song-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.song-actions .btn {
  min-width: 110px;
}

/* --- 表單區塊 Form --- */
.suggestion {
  background: #080808;
  padding: 100px 20px;
}

.form-card {
  background: #111;
  max-width: 500px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.25s ease;
}

.btn-submit:hover {
  filter: brightness(0.95);
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.25);
}

/* --- 重新設計的精簡頁尾 Footer --- */
.footer {
  background: #050505;
  padding: 60px 20px 30px;
  border-top: 1px solid #1a1a1a;
  margin-top: 100px;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* 連結群組置中 */
}

.footer-nav {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-group h4 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  text-align: center;
}

/* 標題下裝飾線置中 */
.footer-group h4::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  width: 15px;
  height: 2px;
  background: var(--primary-color);
}

.footer-group a {
  display: block;
  color: #666;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 12px;
  transition: 0.3s;
  text-align: center;
}

.footer-group a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  max-width: 1100px;
  margin: 50px auto 0;
  padding-top: 25px;
  border-top: 1px solid #1a1a1a;
  text-align: center;
}

.footer-bottom p {
  color: #333;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

/* --- 響應式設計 Responsive Design --- */
@media (max-width: 768px) {
  .footer-nav {
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none; /* 手機版隱藏文字連結 */
  }

  .logo {
    font-size: 3rem;
  }

  .tagline {
    font-size: 0.9rem;
    white-space: normal;
  }

  /* 手機上字級稍微收斂，卡片更耐看 */
  .song-title {
    font-size: 1.35rem;
  }

  .song-actions .btn {
    min-width: 100px;
    padding: 11px 22px;
  }
}

/* =========================
   SONGS PAGE ONLY
   只影響 songs.html 的搜尋頁
========================= */

/* songs.html 的 hero 搜尋區 */
.search-hero {
  background: radial-gradient(900px 450px at 50% 18%, rgba(0,224,255,0.12), transparent 60%);
  border-bottom: 1px solid #111;
}

/* 讓 songs.html 的 hero container 不要用全站的 80px padding（避免手機跑版） */
.search-hero .container {
  padding: 55px 20px 40px;
}

/* Complex 感小標 */
.hero-kicker {
  text-align: center;
  color: rgba(255,255,255,0.55);
  letter-spacing: 2px;
  font-size: 0.78rem;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* 副標 */
.search-sub {
  max-width: 760px;
  margin: 0 auto 18px;
  text-align: center;
  color: rgba(255,255,255,0.68);
}

/* 搜尋框 */
.search-bar {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* ✅ songs.html 用的是 .search-input，不是 .input */
.search-input {
  width: 100%;
  max-width: 760px;
  padding: 18px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18,18,18,0.92);
  color: #fff;
  font-size: 1.08rem;
  outline: none;
  transition: 0.2s ease;
  box-shadow: 0 10px 28px rgba(0,0,0,0.38);
}

.search-input::placeholder {
  color: rgba(255,255,255,0.45);
}

.search-input:focus {
  border-color: rgba(0,224,255,0.65);
  box-shadow: 0 0 0 4px rgba(0,224,255,0.14), 0 10px 28px rgba(0,0,0,0.38);
}

/* Trending chips */
.trending {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.trending-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18,18,18,0.88);
  color: rgba(255,255,255,0.9);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.chip:hover {
  border-color: rgba(0,224,255,0.55);
  box-shadow: 0 0 0 3px rgba(0,224,255,0.10);
  transform: translateY(-1px);
}

.chip:active {
  transform: translateY(0px) scale(0.98);
}

/* 搜尋頁分段標題（左大右小） */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-title-left {
  font-family: Impact, sans-serif;
  font-size: 1.8rem;
  letter-spacing: 1.5px;
  margin: 0;
}

.section-hint {
  margin: 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
}

/* ✅ 手機版：讓搜尋區真的看起來「有變」 */
@media (max-width: 600px) {
  .search-hero .container {
    padding: 40px 16px 28px;
  }

  .search-input {
    padding: 16px 14px;
    font-size: 1.02rem;
    border-radius: 14px;
  }

  .chip {
    padding: 9px 12px;
    font-size: 0.92rem;
  }

  .section-title-left {
    font-size: 1.55rem;
  }
}

/* =========================
   SAFE OVERRIDES
   防呆與跨設備穩定，不改你原本風格
========================= */

/* 防止任何水平爆版（手機最常見） */
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }

/* 任何媒體都不要超出容器 */
img, video, iframe { max-width: 100%; height: auto; }

/* 超窄螢幕不要硬塞 280px 卡片（避免左右滑動） */
@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
}

/* ✅ 修正「紅框」：只對互動元素顯示 focus 外框（不會讓 hero/背景出框） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(0,224,255,0.65);
  outline-offset: 3px;
}

/* =========================
   HERO TITLE SYSTEM (songs.html)
   兩行同字級 + 永遠置中 + 自適應
========================= */

:root{
  /* 兩行共同字級（桌機～平板） */
  --hero-title: clamp(2.0rem, 6.2vw, 4.2rem);
  --hero-line-height: 1.05;
  --hero-letter: 2px;
  --hero-max: 760px;

  /* 動畫 */
  --hero-dur: 260ms;
  --hero-shift: 6px;
}

/* 主標容器 */
.search-title{
  text-align: center;
  line-height: var(--hero-line-height);
  letter-spacing: var(--hero-letter);
  margin: 0 0 12px 0;
}

/* 第一行 */
.search-title .title-line{
  display: inline-block;
  font-size: var(--hero-title);
  font-family: Impact, sans-serif;
  font-weight: 400;
}

/* 第二行容器：用 flex 永遠置中，不吃字長影響 */
.dynamic-wrap{
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(var(--hero-max), 100%);
  margin: 0 auto;
  overflow: hidden;
}

/* 第二行：同字級 + 不換行 + 清掉任何舊鎖寬 */
.dynamic-line{
  display: inline-block;
  font-size: var(--hero-title);
  font-family: Impact, sans-serif;
  font-weight: 400;
  white-space: nowrap;

  width: auto !important;
  max-width: 100%;
  text-align: center;

  will-change: opacity, transform;
  transition: opacity var(--hero-dur) ease, transform var(--hero-dur) ease;
}

.dynamic-line.is-out{ opacity:0; transform: translateY(var(--hero-shift)); }
.dynamic-line.is-in { opacity:1; transform: translateY(0); }

@media (max-width: 820px){
  :root{ --hero-letter: 1.4px; }
}

/* 手機：兩行一起縮（同一個變數） */
@media (max-width: 600px){
  :root{
    --hero-title: clamp(1.35rem, 7.2vw, 2.2rem);
    --hero-letter: 1px;
    --hero-shift: 5px;
  }
}

/* 小手機（iPhone SE 類） */
@media (max-width: 390px){
  :root{
    --hero-title: clamp(1.25rem, 7.6vw, 2.0rem);
    --hero-letter: 0.9px;
  }
}

/* 極小螢幕保底 */
@media (max-width: 340px){
  :root{
    --hero-title: clamp(1.15rem, 8.0vw, 1.85rem);
    --hero-letter: 0.8px;
  }
}

@media (prefers-reduced-motion: reduce){
  .dynamic-line{ transition:none; }
}

/* =========================
   SEARCH STATE (songs.html)
   搜尋時：Recently 真正消失 + 結果區塊上移（消除留白）
========================= */

/* 搜尋中：整段 Recently 不佔位 */
body.searching #recently-section{
  display: none !important;
}

/* Results head 預設距離（你原本想要 70px） */
.results-head{
  margin-top: 70px;
}

/* 搜尋中：把結果往上拉，消掉空白 */
body.searching .results-head{
  margin-top: 18px;
}

/* 額外防呆：避免某些瀏覽器/舊 CSS 仍對 recently 做 opacity/pointer-events */
body.searching #recently-section *{
  pointer-events: none;
}

/* ========================= 官方帳號頁（品牌版） ========================= */
.official { max-width: 820px; margin: 0 auto; padding-bottom: 30px; }

.official-hero{
  text-align: center;
  padding: 26px 10px 6px;
}

.official-avatar{
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18,18,18,0.92);
  box-shadow: 0 0 0 6px rgba(0,224,255,0.08);
}

.official-title{
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: 0.8px;
}

.official-sub{
  margin: 10px auto 0;
  max-width: 560px;
  color: rgba(255,255,255,0.68);
  line-height: 1.7;
  font-weight: 600;
}

.official-grid{
  display: grid;
  gap: 14px;
  margin: 22px auto 0;
  padding: 0 6px;
}

.official-btn{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px;
  border-radius: 18px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18,18,18,0.92);
  transition: 0.2s ease;
}

.official-btn:hover{
  border-color: rgba(0,224,255,0.6);
  box-shadow: 0 0 0 5px rgba(0,224,255,0.12);
  transform: translateY(-1px);
}

.btn-left{ display: grid; gap: 4px; }
.btn-title{
  color: rgba(255,255,255,0.92);
  font-weight: 900;
  letter-spacing: 0.4px;
  font-size: 1.05rem;
}
.btn-desc{
  color: rgba(255,255,255,0.58);
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-arrow{
  color: rgba(0,224,255,0.9);
  font-weight: 900;
  font-size: 1.1rem;
}

.official-note{
  text-align: center;
  margin-top: 18px;
  padding: 0 10px;
}

.official-divider{
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 18px auto 14px;
  max-width: 520px;
}

.official-mini{
  margin: 0;
  color: rgba(255,255,255,0.55);
  font-weight: 650;
  line-height: 1.7;
}

.official-avatar-img{
  width: 56px;
  height: 56px;
  object-fit: contain;   /* ⭐ 這行很重要 */
  display: block;
  margin: 0 auto 14px;
}

/* =========================
   Official Accounts (Minimal)
   ========================= */

.official-hero{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 0 24px;
}

.official-avatar-img{
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 14px;
}

.official-title{
  font-size: 28px;
  letter-spacing: 0.6px;
  margin: 0;
}

/* Grid */
.official-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

/* Button */
.official-btn{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px;
  border-radius: 16px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.official-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

/* Typography */
.official-btn .btn-title{
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.official-btn .btn-arrow{
  font-size: 16px;
  opacity: 0.75;
  transition: transform 160ms ease, opacity 160ms ease;
}

.official-btn:hover .btn-arrow{
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Mobile */
@media (max-width: 640px){
  .official-grid{
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .official-hero{
    padding: 40px 0 18px;
  }
}
