:root { --max: 1100px; }
* { box-sizing: border-box; }

/* フッターを下部に固定するためのレイアウト */
html, body {
  height: 100%;
  margin: 0;
}

body { 
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; 
  line-height:1.6; 
  background-color: #000000;
  color: #ffffff;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { 
  max-width: var(--max); 
  margin: 0 auto; 
  padding: 24px; 
  flex: 1;
}

main#content {
  flex: 1;
  padding-bottom: 0;
}

.site-header, .site-footer { padding: 24px; text-align: center; }
.site-header { 
  padding-bottom: 2rem;
}
.site-footer { 
  margin-top: auto;
  padding-top: 3rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.playlist-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.playlist-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60px;
}

.current-song {
  font-size: 0.9rem;
  color: #cccccc;
  margin-bottom: 4px;
  font-weight: 400;
  min-height: 1.2em;
  text-align: center;
  line-height: 1.2;
}

.playlist-name {
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  cursor: pointer;
}

.btn-nav {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  text-align: left;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

.btn-nav:first-of-type {
  left: 20px;
}

.btn-nav:last-of-type {
  right: 20px;
}

.footer-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.logo { font-weight: 700; text-decoration: none; color: inherit; }
.nav ul { list-style: none; display:flex; gap:16px; margin:0; padding:0; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:16px; }
.card { border:1px solid #eee; border-radius:10px; overflow:hidden; background:#fff; }
.card img { width:100%; display:block; }
.cover { width:100%; max-width:640px; border-radius:12px; }
.muted { color:#666; font-size: 0.9rem; }
.lead { color:#444; }

/* YouTubeプレイヤーのスタイル */
.youtube-player {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.player-container {
  max-width: 100%;
}

.player-container iframe {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.player-controls {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  background: transparent;
  color: #ffffff;
}

.btn-primary {
  background: transparent;
  color: #ffffff;
}

.btn-primary:hover {
  background: transparent;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
}

.btn-secondary:hover {
  background: transparent;
  transform: translateY(-1px);
}

.btn-danger {
  background: transparent;
  color: #ffffff;
  transform: translateY(-3px);
  font-size: 2rem;
}

.btn-danger:hover {
  background: transparent;
  color: #ffffff;
  transform: translateY(-4px);
}

/* アクティブボタンのスタイル */
.btn-active {
  background: #28a745 !important;
  color: white !important;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-active:hover {
  background: #218838 !important;
  transform: scale(1.05) translateY(-1px);
}

/* 音声制御ボタンのスタイル */
.audio-controls {
  margin-top: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.audio-controls .btn {
  padding: 8px 16px;
  font-size: 1.5rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  min-width: 120px;
}

.audio-controls .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 音声重視モードのスタイル */
iframe[style*="height: 166px"] {
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}



/* プレイリストグリッドのスタイル */
.playlist-links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.playlist-links h4 {
  margin-bottom: 1rem;
  color: #333;
}

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

.playlist-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  text-align: center;
}

.playlist-item h5 {
  margin: 0 0 0.5rem 0;
  color: #333;
}

.playlist-item p {
  margin: 0 0 1rem 0;
  color: #666;
}

/* リリースアクションセクション */
.releases-actions {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.releases-actions h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* クイックリンクセクション */
.quick-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* 動的背景のスタイル */
.dynamic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.dynamic-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* 背景がアクティブな時のコンテンツ調整 */
body.has-dynamic-background {
  position: relative;
}

body.has-dynamic-background .container {
  position: relative;
  z-index: 2;
}



/* レスポンシブ対応 */
@media (max-width: 768px) {
  .player-controls,
  .action-buttons,
  .quick-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .btn {
    width: auto;
    text-align: center;
    min-width: 60px;
  }
  
  .audio-controls .btn {
    min-width: 80px;
  }
}

/* プレイリスト名表示オーバーレイ */
.playlist-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: backgroundFadeInOut 3s ease-in-out;
}

.playlist-overlay.show {
  display: flex;
}

@keyframes backgroundFadeInOut {
  0% {
    background-color: rgba(0, 0, 0, 0);
  }
  20% {
    background-color: rgba(0, 0, 0, 0.7);
  }
  80% {
    background-color: rgba(0, 0, 0, 0.7);
  }
  100% {
    background-color: rgba(0, 0, 0, 0);
  }
}

.playlist-overlay-content {
  text-align: center;
  color: #fff;
}

.playlist-overlay-name {
  font-size: 3rem;
  font-weight: 700;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* プレイリスト選択モーダル */
.playlist-selector {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.playlist-selector.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.playlist-selector-content {
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 20px;
  max-width: 200px;
  width: auto;
  box-shadow: none;
}

.playlist-list {
  padding: 0;
}

.playlist-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 4px;
  border: none;
  background-color: transparent;
}

.playlist-item:last-child {
  margin-bottom: 0;
}

.playlist-item .playlist-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 400;
}

.playlist-item.active {
  background-color: rgba(0, 122, 204, 0.2);
  border: 1px solid #007acc;
}

.playlist-item.active .playlist-name {
  color: #007acc;
  font-weight: 600;
}

/* プレイリスト名のホバー効果 */
.playlist-name {
  cursor: pointer;
  transition: color 0.2s ease;
}

.playlist-name:hover {
  color: #007acc !important;
}

/* ヘッダーリンク */
.header-links {
  text-align: center;
  margin-top: 10px;
}

.header-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s ease;
}

.header-links a:hover {
  color: #007acc;
}

/* リンク表示モーダル */
.links-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  z-index: 1000;
}

.links-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.links-modal-content {
  background-color: transparent;
  border-radius: 8px;
  padding: 20px;
  max-width: 200px;
  width: auto;
  box-shadow: none;
}

.links-list {
  padding: 0;
}

.link-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 4px;
  border: none;
  background-color: transparent;
}

.link-item:last-child {
  margin-bottom: 0;
}

.link-item a {
  text-decoration: none;
  color: #ffffff;
}

.link-item .link-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 400;
}

.link-item:hover .link-name {
  color: #007acc;
}

/* About Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #1a1a1a;
  margin: 5% auto;
  padding: 0;
  border: none;
  border-radius: 12px;
  width: 95%;
  max-width: 1000px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 15px;
  z-index: 1001;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
}

.about-section {
  padding: 2rem;
}

.about-section h1 {
  color: #fff;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 2rem;
}

.about-description {
  color: #ccc;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0 1rem;
}

.about-content {
  margin-top: 2rem;
}

.links-section, .website-info {
  margin-top: 3rem;
}

.links-section h2, .website-info h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

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

.link-item, .website-link {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #2a2a2a;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: none;
}

.link-item:hover, .website-link:hover {
  background: #3a3a3a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.link-icon {
  font-size: 2rem;
  margin-right: 1rem;
  min-width: 3rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-placeholder {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.link-info {
  flex: 1;
}

.link-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: #fff;
}

.link-url {
  font-size: 0.9rem;
  color: #ccc;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  overflow-wrap: break-word;
  hyphens: auto;
}

.website-link {
  max-width: 400px;
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
    max-height: 85vh;
  }
  
  .about-section {
    padding: 1rem;
  }
  
  .links-grid {
    grid-template-columns: 1fr;
  }
  
  .link-item, .website-link {
    padding: 0.75rem;
  }
  
  .link-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    min-width: 2.5rem;
  }
}

/* Version info styling */
.version-info {
  font-size: 0.8rem;
  color: #888;
  margin: 0.1rem 0 0.2rem 0;
  text-align: center;
  font-family: 'Courier New', monospace;
}
