@charset "UTF-8";

:root {
  --bg-main: #f7f7f7;
  --bg-card: #334155;
  --bg-viewer: #e2e8f0;
  --text-main: #2b2b2b;
  --text-sub: #666666;
  --text-muted: #888888;
  --border-color: #334155;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/*スクロールバーしね*/
html, body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}
body {
  background-color: var(--bg-main);
  background-image: url('../img/wall.png');
  background-repeat: repeat-x;
  background-size: auto 100vh;
  background-position: top left;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* レイアウト全体 */
.layout-container {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  gap: 28px;
  min-height: 100vh;
}

/* 左サイドバー */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: #334155;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.2);
  color: #f8fafc;
}

.sidebar-card .profile-name {
  color: #ffffff;
}

.sidebar-card .profile-id,
.sidebar-card .profile-bio,
.sidebar-card .qr-label,
.sidebar-card .sidebar-section-title {
  color: #cbd5e1;
}

.sidebar-divider {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: left;
}

.profile-box {
  text-align: center;
}

.profile-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  display: block;
  border: none;
  background: transparent;
}

.profile-name {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 10px;
  margin-bottom: 2px;
}

.profile-id {
  font-size: 0.8rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.profile-bio {
  font-size: 0.85rem;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* 外部リンクボタン */
.social-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 1rem;
  color: #334155;
  transition: background 0.2s, opacity 0.55s, color 0.2s, transform 0.15s;
}

.social-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-2px);
}

/* QRコードエリア */
.qr-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.qr-thumb {
  display: inline-block;
  padding: 8px;
  background: #8B99AD;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  overflow: hidden;
}

.qr-thumb img {
  display: block;
  border-radius: 0px;
  mix-blend-mode: multiply;
  opacity: 0.55;
  transition: opacity 0.2s;
}
.qr-thumb:hover {
  background: #fff;
}
.qr-thumb:hover img {
  opacity: 1;
}


.qr-label {
  display: block;
  font-size: 0.72rem;
  margin-top: 4px;
}

/* サイドバー内セクション（タグ・検索） */
.sidebar-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  font-size: 0.8rem;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.15s;
}

.tag-chip:hover,
.tag-chip.active:hover {
  background: #ffffff;
  color: #000000;
}

.tag-chip.active {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
}

/* 検索フォーム */
#search-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #0f172a;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background 0.2s;
}

#search-input::placeholder {
  color: #64748b;
}

#search-input:focus {
  outline: none;
  background: #ffffff;
}

/* 管理者ボタン領域 */
.admin-action-wrap {
  width: 100%;
}

/* 管理者ボタン */
.admin-toggle-btn {
  width: 100%;
  padding: 10px 14px;
  background: #2b384a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  color: #7b8c9d;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.admin-toggle-btn:hover {
  background: #334155;
  color: #cbd5e1;
}

/* メインエリア */
.main-content {
  flex: 1;
  min-width: 0;
}

/* 管理ドロップゾーン */
.drop-zone {
  border: 3px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  background: #cbd5e1;
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 24px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.drop-zone.dragover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.8);
}
.drop-zone-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 4px;
}
.drop-zone-sub {
  font-size: 0.8rem;
  color: #3b82f6;
}

/* 音楽プレイヤーカード群 */
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.music-card {
  background: #334155;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.2);
  color: #f8fafc;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.music-card:hover {
  transform: translateY(-2px);
  background: #38475d;
}

.music-jacket {
  width: 140px;
  height: 140px;
  max-width: 140px;
  max-height: 140px;
  border-radius: 8px;
  object-fit: cover;
  background: #1e293b;
  flex-shrink: 0;
  cursor: pointer;
}

.music-body {
  flex-grow: 1;
  min-width: 0;
}

.music-meta {
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.music-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.3;
}

/* ひとこと・歌詞エリア全体 */
.music-comment {
  font-size: 0.78rem;
  margin-bottom: 8px;
  margin-left: 16px;
  padding-left: 0;
  border-left: none;
}

/* 1行目（ひとこと・説明） */
.comment-first {
  color: #cbd5e1;
  line-height: 1.4;
  height: 1.4em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

/* 2行目以降（歌詞部分） */
.comment-rest {
  display: none;
  color: #ffffff;
  line-height: 1.6;
  margin-top: 10px;
}

/* カード展開時のスタイル */
.music-card.expanded .comment-first {
  white-space: pre-wrap;
  height: auto;
}

.music-card.expanded .comment-rest {
  display: block;
}

.music-card.expanded .music-comment {
  margin-bottom: 36px;
}

/* プレイヤー部分 */
.audio-player-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  padding: 2px 0;
  border: none;
}

/* 再生ボタン */
.play-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s, color 0.2s;
}

.play-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1px);
}

.audio-range {
  flex-grow: 1;
  accent-color: #f43f5e;
  cursor: pointer;
  height: 4px;
}

/* 音量コントロール部分 */
.volume-control-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #cbd5e1;
  padding: 2px;
  transition: color 0.2s;
}

.volume-btn:hover {
  color: #ffffff;
}

.volume-range {
  width: 50px;
  accent-color: #cbd5e1;
  cursor: pointer;
  height: 4px;
}

.duration {
  font-size: 0.75rem;
  color: #cbd5e1;
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* いいねボタン */
.badge-like {
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.badge-like:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 管理者用カード操作ボタン */
.admin-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.admin-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: background 0.15s;
}

.admin-icon-btn:hover { background: var(--accent-color); }
.admin-icon-btn.danger:hover { background: #dc2626; }
.drag-handle { cursor: grab; }

/* モーダル共通 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #334155;
  color: #f8fafc;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #1e293b;
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #60a5fa;
}

textarea.form-control {
  resize: vertical;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-primary:hover { background: #1d4ed8; }

.btn-secondary {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .layout-container {
    flex-direction: column;
    padding: 16px;
  }
  .sidebar {
    width: 100%;
  }
}