* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #121212;
  color: #f5f5f5;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: #1f1f1f;
  border-bottom: 1px solid #333;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar p {
  margin: 4px 0 0;
  color: #aaa;
}

.user-box {
  display: flex;
  gap: 8px;
}

input,
select,
textarea,
button {
  font-family: inherit;
}

input,
select,
textarea {
  background: #181818;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px;
}

button {
  background: #d6a84f;
  color: #111;
  border: 0;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background: #f0c46b;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 90px);
}

.sidebar {
  background: #181818;
  border-right: 1px solid #333;
  padding: 20px;
  overflow-y: auto;
}

.song-search {
  width: 100%;
  margin-bottom: 12px;
}

.song-btn {
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  background: #252525;
  color: #fff;
}

.song-btn small {
  display: block;
  color: #aaa;
  margin-top: 4px;
  font-weight: normal;
}

.song-btn.active {
  background: #d6a84f;
  color: #111;
}

.song-btn.active small {
  color: #333;
}

.content {
  padding: 24px;
}

.card {
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

audio {
  width: 100%;
  margin-top: 12px;
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

#lyricsEditor {
  width: 100%;
  height: 420px;
  resize: vertical;
  line-height: 1.5;
  margin-bottom: 12px;
}

#editNote,
#newComment {
  width: 100%;
  margin-bottom: 10px;
}

#newComment {
  height: 100px;
  resize: vertical;
}

.status {
  min-height: 18px;
  margin: 8px 0 0;
  color: #aaa;
  font-size: 13px;
}

.status.ok {
  color: #8de0a6;
}

.status.error {
  color: #ff7676;
}

.comment {
  background: #252525;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}

.comment small {
  color: #aaa;
}

.comment p {
  white-space: pre-wrap;
  line-height: 1.45;
}

.reply {
  margin-left: 20px;
  border-left: 2px solid #d6a84f;
}

.reply-box {
  margin-top: 10px;
}

.reply-box textarea {
  width: 100%;
  height: 70px;
  margin-bottom: 8px;
}

.version {
  background: #252525;
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
  border: 1px solid #333;
}

.version small {
  color: #aaa;
}

.version pre {
  white-space: pre-wrap;
  background: #111;
  padding: 12px;
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.empty {
  color: #aaa;
}

@media (max-width: 900px) {
  .layout,
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .user-box {
    flex-wrap: wrap;
  }
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #121212;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 28px;
}

.login-card h1 {
  margin-top: 0;
}

.login-card input,
.login-card button {
  width: 100%;
  margin-bottom: 12px;
}