/* =========================================
GLOBAL DARK SITE
========================================= */

html,
body {
  background:#000 !important;
  color:#ddd;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  scroll-behavior: smooth;
}

/* =========================================
JOOMLA LAYOUT CONTAINERS
========================================= */

.site,
.site-grid,
.site-body,
.wrapper,
main {
  background:#000 !important;
}

/* =========================================
ARTICLE AREA
========================================= */

.com-content,
.com-content-article,
.com-content-article__body {
  background:#000 !important;
  border:none;
  box-shadow:none;
}

/* =========================================
MODULES
========================================= */

.moduletable,
.module,
.card,
.card-body {
  background:#0f0f0f !important;
  border:none;
  box-shadow:none;
}

/* =========================================
HEADER
========================================= */

header,
.header,
.site-header {
  background:#000 !important;
  border:none;
  box-shadow:none;
}

/* =========================================
TEXT COLORS
========================================= */

h1,h2,h3,h4,h5 {
  color:#fff;
}

p {
  color:#d6d6d6;
}

a {
  color:#ff7a00;
}

a:hover {
  color:#ffb347;
}

/* =========================================
HERO SECTION
========================================= */

.hero-premium {
  background:#0b0b0b;
  padding:60px 0;
  border-radius:20px;
}

.hero-premium h1 {
  font-size:3rem;
  font-weight:700;
}

.hero-premium .subtext {
  font-size:1.2rem;
  color:#d6d6d6;
}

/* =========================================
LESSON PAGE LAYOUT
========================================= */

.lesson-layout {
  display:flex;
  max-width:1300px;
  margin:auto;
  gap:40px;
}

/* Sidebar */
.lesson-sidebar {
  width:240px;
  background:#0f0f0f;
  padding:22px;
  border-radius:12px;
  position:sticky;
  top:100px;
  height:max-content;
}

.sidebar-nav {
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sidebar-nav a {
  text-decoration:none;
  color:#ddd;
  padding:8px 10px;
  border-radius:6px;
  font-size:.9rem;
}

.sidebar-nav a:hover {
  background:#1c1c1c;
  color:#ff7a00;
}

.sidebar-nav a.active {
  background:#ff7a00;
  color:#000;
  font-weight:700;
  box-shadow:0 0 10px rgba(255,122,0,.5);
}

/* Lesson content */
.song-lesson {
  flex:1;
  padding:40px;
  max-width:900px;
}

.song-intro {
  font-size:18px;
  line-height:1.7;
  margin-bottom:25px;
}

/* =========================================
LESSON CARDS
========================================= */

.lesson-card {
  background:#141414;
  border-radius:14px;
  padding:20px;
  margin-bottom:30px;
  border:1px solid #222;
  box-shadow:0 4px 15px rgba(0,0,0,0.6);
  transition: transform .2s ease, box-shadow .2s ease;
}

.lesson-card:hover {
  transform:translateY(-3px);
  box-shadow:0 8px 30px rgba(0,0,0,0.8);
}

.lesson-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:15px;
  background:#1c1c1c;
  padding:10px 14px;
  border-radius:8px;
  border-left:4px solid #ff7a00;
}

.lesson-header h2 {
  margin:0;
}

.lesson-length {
  font-size:.85rem;
  opacity:.7;
}

/* Lesson progress bar */
.lesson-progress {
  width:100%;
  height:6px;
  background:#222;
  border-radius:3px;
  margin-bottom:12px;
  overflow:hidden;
}

.progress-fill {
  width:0%;
  height:100%;
  background:#ff7a00;
  border-radius:3px;
  transition:width .3s ease;
}

.lesson-card.watched .progress-fill {
  background:#00ff88;
}

/* =========================================
VIDEO WRAPPER
========================================= */

.video-wrapper {
  background:#080808;
  padding:14px;
  border-radius:10px;
}

.video-container {
  position:relative;
  width:100%;
  padding-bottom:56.25%;
  height:0;
}

.video-container iframe {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  border-radius:8px;
  border:0;
}

/* =========================================
VIDEOS / RUNTIME TEXT BELOW YOUTUBE
========================================= */

.lesson-info {
  font-size:0.65rem;
  color:#aaa;
  margin-top:5px;
  line-height:1.4;
}

/* =========================================
METRONOME BOX SINGLE ROW
========================================= */

.metronome-box {
  background:#222;
  padding:8px 12px;
  border-radius:6px;
  display:flex;
  align-items:center;
  gap:8px;
  max-width:380px;
  margin-top:5px;   /* smaller space above */
  margin-bottom:15px; /* small space below first lesson */
  flex-wrap:nowrap;
}

.metronome-box span,
.metronome-box button,
.metronome-box input {
  flex-shrink:0;
}

#metronomeSlider {
  flex:1 1 auto;
  min-width:100px;
  max-width:200px;
  height:6px;
}

#bpmValue {
  font-weight:700;
  color:#ff7a00;
  min-width:35px;
  text-align:center;
  font-size:0.7rem;
}

#metroDot {
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#ff7a00;
  opacity:0;
  transition:opacity 0.05s;
}

#metronomeStart {
  padding:4px 10px;
  background:#ff7a00;
  color:#000;
  border:none;
  border-radius:6px;
  cursor:pointer;
  font-weight:700;
  font-size:0.7rem;
  transition:all .2s ease;
  flex-shrink:0;
}

#metronomeStart:hover {
  background:#ffb347;
}

/* =========================================
YOUTUBE LINK (TINY + SUBTLE)
========================================= */

.song-youtube {
  font-size: 0.65rem;
  color: #888;
  text-decoration: none;
  display: inline-block;
  margin:0 0 2px 0;
}

.song-youtube:hover {
  color: #ffcc00;
  text-decoration: underline;
}

/* =========================================
BACK TO TOP / SCROLL PROGRESS
========================================= */

#backToTop {
  position:fixed;
  bottom:30px;
  right:30px;
  width:44px;
  height:44px;
  border:none;
  background:transparent;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  transition:all .25s ease;
  z-index:9999;
}

#backToTop.show {
  opacity:1;
  visibility:visible;
}

#backToTop svg {
  position:absolute;
  top:0;
  left:0;
  transform:rotate(-90deg);
}

#backToTop .bg {
  fill:none;
  stroke:#1c1c1c;
  stroke-width:3;
}

#backToTop .progress {
  fill:none;
  stroke:#ff7a00;
  stroke-width:3;
  stroke-dashoffset:113;
  transition:stroke-dashoffset .1s linear;
}

#backToTop .arrow {
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  font-size:14px;
  color:#fff;
}

#backToTop:hover .progress {
  stroke:#ffb347;
}

/* =========================================
MOBILE / TABLET FIXES
========================================= */

@media (max-width:1024px) {
  .lesson-layout {
    flex-direction: column;
  }
  .lesson-sidebar {
    width: 100%;
    position: relative;
    border-right: none;
    margin-bottom: 15px;
    top: auto;
  }
  .sidebar-nav a {
    padding: 8px 0;
    font-size: 0.95rem;
  }
  .back-archive {
    font-size: 0.85rem;
  }
  #metronomeSlider {
    width: 90%;
    max-width:200px;
  }
  #bpmValue {
    font-size: 0.7rem;
  }
  #metronomeStart {
    font-size: 0.7rem;
    padding: 5px 8px;
  }
}

@media (max-width:768px) {
  .lesson-layout {
    flex-direction: column;
  }
  .lesson-sidebar {
    display:none;
  }
  .song-lesson {
    padding:20px;
  }
  .lesson-card {
    padding:15px;
  }
  .lesson-header h2 {
    font-size:1rem;
  }
  #metronomeSlider {
    width: 100%;
  }
  #bpmValue {
    font-size: 0.65rem;
  }
  #metronomeStart {
    font-size: 0.65rem;
    padding: 4px 6px;
  }
  #backToTop {
    bottom:20px;
    right:20px;
    width:40px;
    height:40px;
    z-index:9999;
  }
}