:root {
  --bg: #0f172a;
  --card: #111827;
  --card-2: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --line: #334155;
  --accent: #22c55e;
  --accent-2: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #020617, #0f172a);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, .92);
  backdrop-filter: blur(10px);
}
.topbar-inner, .footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0;
}
.brand { font-size: 24px; font-weight: 700; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a { color: var(--muted); }
.nav a:hover, .active { color: white; }
.hero {
  padding: 48px 0 20px;
}
.hero-box, .card, .admin-card, .search-box {
  background: rgba(17,24,39,.88);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.hero-box { padding: 28px; display: grid; gap: 24px; grid-template-columns: 1.2fr .8fr; }
.hero h1 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 52px); }
.hero p { color: var(--muted); line-height: 1.6; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.section { padding: 18px 0 28px; }
.card { padding: 20px; }
.card h3, .card h2 { margin-top: 0; }
.badge {
  display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px;
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.22); color: #bbf7d0;
}
.meta { color: var(--muted); font-size: 14px; }
.btn, button, .button-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; border: 0; cursor: pointer; font-weight: 600;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary { background: var(--card-2); color: white; border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: white; }
.input, textarea, select {
  width: 100%; background: #0b1220; color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; font: inherit;
}
textarea { min-height: 200px; resize: vertical; }
label { display: block; margin: 0 0 8px; font-weight: 600; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.form-group { margin-bottom: 16px; }
.search-box { padding: 18px; margin: 18px 0; }
.search-inline { display: grid; gap: 12px; grid-template-columns: 1fr auto; }
.song-card pre {
  white-space: pre-wrap;
  background: #020617;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 12px;
  overflow: visible;   /* FIX hover */
  line-height: 1.6;
}

.flash {
  padding: 14px 16px; border-radius: 14px; margin: 14px 0; border: 1px solid;
}
.flash-success { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.35); color: #dcfce7; }
.flash-error { background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.35); color: #fee2e2; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.footer { border-top: 1px solid var(--line); margin-top: 28px; color: var(--muted); }
.alphabet { display: flex; flex-wrap: wrap; gap: 10px; }
.alphabet a { padding: 8px 12px; border-radius: 10px; background: #0b1220; border: 1px solid var(--line); color: var(--muted); }
.alphabet a:hover { color: white; border-color: #64748b; }
.sidebar-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.sidebar { padding: 18px; position: sticky; top: 86px; height: fit-content; }
.sidebar a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--muted); }
.sidebar a:hover, .sidebar .current { background: #0b1220; color: white; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.center { text-align: center; }
@media (max-width: 900px) {
  .hero-box, .grid-3, .grid-2, .form-row, .sidebar-layout { grid-template-columns: 1fr; }
  .topbar-inner, .footer-inner { flex-direction: column; align-items: flex-start; }
  .search-inline { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}



/* ===== CHORD LYRICS CLEAN FINAL ===== */

.song-card,
.song-card pre,
.card {
    overflow: visible !important;
}

.lyrics-with-chords {
    white-space: pre-wrap;
    font-family: monospace;
    line-height: 1.8;
    background: #020617;
    padding: 16px;
    border-radius: 12px;
}

.section-label {
    color: #facc15 !important;
    font-weight: bold;
    display: block;
    margin: 10px 0 5px;
}

.chord {
    display: inline-block;
    position: relative;
    color: #38bdf8;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
}

.chord-popup {
    display: none;
    position: absolute;
    top: -185px;
    left: 0;
    background: #ffffff;
    color: #111827;
    padding: 10px;
    border-radius: 10px;
    z-index: 999999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    min-width: 130px;
}

.chord:hover .chord-popup {
    display: block;
}

.chord-popup svg {
    width: 120px;
    height: auto;
    display: block;
}

.chord-popup-text {
    background: #111827;
    color: #ffffff;
    top: -42px;
    min-width: auto;
    white-space: nowrap;
}

/* ===== YOUTUBE VIDEO ===== */

.video-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  margin: 25px auto;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
