/* ================================================================
   layout.css — グリッド・ヘッダー・サイドバー・メイン・ナビ
   ================================================================ */

/* ---- アプリグリッド ---- */
.app {
  display: grid;
  grid-template-rows: var(--header-h) 1fr 140px;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* ---- ヘッダー ---- */
header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(5,10,20,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,212,255,0.1);
  gap: 24px;
  z-index: 100;
}

.logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.header-search {
  flex: 1;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}
.header-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 36px 8px 40px;
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.header-search input:focus {
  border-color: var(--accent);
  box-shadow: var(--glow2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.btn-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--glow2);
}

/* ---- サイドバー ---- */
.sidebar {
  background: rgba(8,15,30,0.95);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
}

.sidebar-section { padding: 0 16px; margin-bottom: 32px; }
.sidebar-label {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 15px; font-weight: 600; letter-spacing: 0.5px;
  transition: all 0.2s;
  position: relative; overflow: hidden;
}
.nav-item:hover  { color: var(--text); background: rgba(0,212,255,0.06); }
.nav-item.active { color: var(--accent); background: rgba(0,212,255,0.1); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px var(--accent);
}
.nav-icon { font-size: 18px; width: 22px; text-align: center; }

.song-item-side {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.song-item-side:hover   { background: rgba(0,212,255,0.06); }
.song-item-side.playing { background: rgba(0,212,255,0.1); }

.song-thumb {
  width: 38px; height: 38px; border-radius: 6px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.song-info-side  { flex: 1; min-width: 0; }
.song-title-side  { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist-side { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- メインコンテンツ ---- */
.main {
  background: var(--bg2);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
  padding: 32px;
  position: relative;
}

.view { display: none; }
.view.active { display: block; }

.section-header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section-title {
  font-family: 'Orbitron', monospace;
  font-size: 14px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
}
.section-subtitle { font-size: 13px; color: var(--text-muted); }
