﻿:root {
  --bg: #0c1020;
  --panel: #101a30;
  --panel-soft: #16233f;
  --text: #eaf0ff;
  --muted: #9cafc8;
  --accent: #68c2ff;
  --chord: #ffb86a;
  --border: #2a3654;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 28%, var(--bg) 72%), var(--bg) 42%);
}

body {
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(2px);
  z-index: -1;
}

.bg-orb-1 {
  width: 380px;
  height: 380px;
  top: -70px;
  left: -120px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.bg-orb-2 {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: -80px;
  background: color-mix(in srgb, var(--chord) 16%, transparent);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 14px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.9;
  color: color-mix(in srgb, var(--chord) 72%, #fff4bf 28%);
}

.brand p {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 2.4rem);
  font-style: italic;
  font-weight: 800;
  color: color-mix(in srgb, var(--accent) 55%, #ffffff 45%);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
}

.layout-shell {
  background: color-mix(in srgb, var(--panel) 82%, #c7d7ee 18%);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: shellIn 320ms ease-out;
  overflow: hidden;
}

.tabs-panel {
  display: flex;
  align-items: stretch;
  background: color-mix(in srgb, var(--panel) 86%, #000 14%);
  border-bottom: 1px solid var(--border);
}

.tabs {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: thin;
  flex: 1;
}

.tab {
  position: relative;
  border: 0;
  color: color-mix(in srgb, var(--text) 75%, #7d8ca9 25%);
  background: color-mix(in srgb, var(--panel) 72%, #556584 28%);
  min-width: 130px;
  padding: 10px 34px 10px 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
  white-space: nowrap;
}

.tab.active {
  background: var(--panel-soft);
  color: var(--text);
  transform: scale(1.02);
  z-index: 2;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.tab.dragging {
  opacity: 0.4;
}

.tab-close {
  position: absolute;
  right: 8px;
  top: 8px;
  border: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 70%, #8ea1c4 30%);
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: inline-block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.tab:hover .tab-close {
  opacity: 1;
  pointer-events: auto;
}

.plus-tab {
  border: 0;
  background: color-mix(in srgb, var(--accent) 28%, #ffffff 72%);
  color: color-mix(in srgb, var(--panel) 85%, #0d172d 15%);
  width: 44px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.view-container {
  padding: 18px;
  min-height: 68vh;
  background: color-mix(in srgb, var(--panel) 26%, #f4f8ff 74%);
  color: color-mix(in srgb, var(--text) 16%, #0f1a2f 84%);
  animation: viewIn 220ms ease-out;
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #8aa0be 72%);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: color-mix(in srgb, var(--panel) 8%, #ffffff 92%);
  color: color-mix(in srgb, var(--text) 14%, #101b2e 86%);
}

textarea {
  min-height: 240px;
  resize: vertical;
}

.primary-btn,
.secondary-btn,
.link-btn,
.danger-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.primary-btn {
  background: color-mix(in srgb, var(--accent) 72%, #2f5fb0 28%);
  color: #fff;
}

.secondary-btn {
  background: color-mix(in srgb, var(--accent) 22%, #ffffff 78%);
  color: color-mix(in srgb, var(--panel) 72%, #1b2f4f 28%);
}

.link-btn {
  background: transparent;
  color: color-mix(in srgb, var(--accent) 45%, #ffffff 55%);
  text-decoration: underline;
}

.danger-btn {
  background: #b83f3f;
  color: #fff;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.tag-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 10%, #ffffff 90%);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, #9bb4d4 74%);
  font-size: 0.9rem;
  cursor: pointer;
}

.tag-chip.active {
  background: color-mix(in srgb, var(--accent) 62%, #274f90 38%);
  color: white;
}

.song-list {
  width: 100%;
  border-collapse: collapse;
  background: color-mix(in srgb, var(--accent) 28%, #ffffff 72%);
}

.song-list th,
.song-list td {
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, #a9bad3 80%);
  padding: 10px;
  text-align: left;
}

.song-actions {
  display: flex;
  gap: 8px;
}

.song-actions button {
  border: 1px solid color-mix(in srgb, var(--accent) 32%, #7994b5 68%);
  background: color-mix(in srgb, var(--panel) 7%, #ffffff 93%);
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

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

.card {
  border-radius: 14px;
  padding: 16px;
  background: color-mix(in srgb, var(--panel) 12%, #ffffff 88%);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, #9fb5d3 75%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.card h3 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.song-view h2 {
  margin: 0 0 4px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.song-view .artist {
  margin: 0 0 12px;
  color: color-mix(in srgb, var(--chord) 72%, #e65d00 28%);
  font-size: 1.4rem;
  font-weight: 800;
}

.song-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.song-content {
  background: color-mix(in srgb, var(--panel) 6%, #ffffff 94%);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, #b8c8de 82%);
  border-radius: 12px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px rgba(0, 0, 0, 0.08);
}

.song-content pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Fira Code", monospace;
  font-size: 1.08rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 16%, #11161f 84%);
}

.chord {
  color: var(--chord);
  font-weight: 700;
}

.tone {
  font-weight: 800;
  color: color-mix(in srgb, var(--accent) 64%, #1d437d 36%);
}

.theme-editor {
  background: color-mix(in srgb, var(--panel) 88%, #000 12%);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
}

.theme-editor h2 {
  margin: 0 0 10px;
  color: color-mix(in srgb, var(--text) 90%, #ffffff 10%);
  font-size: 1rem;
}

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

.color-grid label {
  color: color-mix(in srgb, var(--text) 88%, #ffffff 12%);
  font-size: 0.88rem;
}

.hidden {
  display: none;
}

@media (max-width: 700px) {
  body {
    padding: 10px;
  }

  .site-header {
    flex-direction: column;
    align-items: start;
  }

  .header-actions {
    justify-content: start;
  }

  .view-container {
    padding: 12px;
  }

  .tab-close {
    opacity: 1;
    pointer-events: auto;
  }
}

@media print {
  body {
    background: white !important;
    padding: 0;
  }

  .site-header,
  .tabs-panel,
  .theme-editor,
  .bg-orb {
    display: none !important;
  }

  .layout-shell {
    box-shadow: none;
    border: 0;
  }

  .view-container {
    min-height: auto;
    padding: 0;
    background: white;
    color: black;
  }
}





.tab:hover {
  transform: translateY(-1px);
}

.plus-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.primary-btn:hover,
.secondary-btn:hover,
.link-btn:hover,
.danger-btn:hover,
.song-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.song-list tbody tr {
  transition: background 140ms ease;
}

.song-list tbody tr:hover {
  background: rgba(255, 255, 255, 0.22);
}

@keyframes shellIn {
  from {
    opacity: 0.88;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes viewIn {
  from {
    opacity: 0.92;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}





.home-search-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) auto;
}

#presentationExit {
  position: fixed;
  right: 14px;
  top: 14px;
  z-index: 1200;
}

body.presentation-mode {
  overflow: hidden;
}

body.presentation-mode .bg-orb,
body.presentation-mode .site-header,
body.presentation-mode .tabs-panel,
body.presentation-mode .theme-editor {
  display: none !important;
}

body.presentation-mode .layout-shell {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.presentation-mode .view-container {
  min-height: 100vh;
  padding: 18px 12px 34px;
}

body.presentation-mode .song-view h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

body.presentation-mode .song-view .artist {
  font-size: clamp(1.2rem, 3.6vw, 1.9rem);
}

body.presentation-mode .song-controls {
  position: sticky;
  top: 10px;
  z-index: 5;
}

body.presentation-mode .song-content pre {
  font-size: clamp(1.25rem, 3.7vw, 2rem);
  line-height: 1.95;
}

@media (max-width: 820px) {
  .home-search-grid {
    grid-template-columns: 1fr;
  }

  body.presentation-mode .song-content pre {
    font-size: clamp(1.1rem, 4.7vw, 1.55rem);
  }
}


.menu-wrap {
  position: relative;
}

.quick-menu.hidden {
  display: none !important;
}

.quick-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 88%, #000 12%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 8px;
  z-index: 1000;
}

.menu-item {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #8aa0be 72%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 8%, #ffffff 92%);
  color: color-mix(in srgb, var(--text) 14%, #101b2e 86%);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.menu-item.static-item {
  cursor: default;
}

.menu-item.static-item label {
  display: block;
  margin-bottom: 6px;
}

.menu-item.static-item select {
  width: 100%;
}

.import-inline {
  display: grid;
  gap: 8px;
  align-items: start;
}

.import-inline small {
  opacity: 0.8;
}

@media (max-width: 700px) {
  .menu-wrap {
    width: 100%;
  }

  .quick-menu {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hamburger-lines {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
}

.hamburger-lines span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}





.advanced-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px));
  gap: 8px;
  margin-bottom: 8px;
}

@media (max-width: 820px) {
  .advanced-filters {
    grid-template-columns: 1fr;
  }
}

.icon-btn {
  min-width: 40px;
  padding: 6px 10px;
  font-size: 1rem;
  line-height: 1;
}

.lyrics-editor {
  border: 1px solid color-mix(in srgb, var(--accent) 24%, #aab9cf 76%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 4%, #ffffff 96%);
  padding: 10px;
}

.lyrics-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 700;
}

#lyricsField {
  min-height: 260px;
}

.lyrics-editor.expanded {
  position: fixed;
  z-index: 1500;
  inset: 14px;
  margin: 0;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 10%, #ffffff 90%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.lyrics-editor.expanded #lyricsField {
  min-height: calc(100vh - 120px);
}

@media (max-width: 700px) {
  .lyrics-editor.expanded {
    inset: 8px;
  }

  .lyrics-editor.expanded #lyricsField {
    min-height: calc(100vh - 110px);
  }
}
