/* ==== Custom Font for Lyrics ==== */
    @font-face {
  font-family: 'NotoSansDevanagari';
  src: url('../fonts/NotoSansDevanagari-Regular.ttf') format('truetype'), 
       url('../fonts/NotoSansDevanagari-Regular.woff2') format('woff2'),
       url('../fonts/NotoSansDevanagari-Regular.woff') format('woff');
  font-display: swap;
}

.word-block {
    display: inline-block;
    padding: 0 2px;
    font-weight: inherit;
}
    /* ==== Global Styles ==== */
    * {
      box-sizing: border-box;
    }

    body {
      background-color: #2d2d2d;
      color: #ffc266;
      font-family: 'Roboto', sans-serif;
      margin: 0;
      padding: 0;
      overflow-x: hidden;
    }

    header {
      text-align: center;
      padding: 1rem 0;
      background: #373737;
      width: 100%;
      position: relative;
      z-index: 10;
    }

    header h1 {
      font-family: 'Pacifico', cursive;
      font-size: 2rem;
      font-weight: bold;
      margin: 0;
      color: #ffc266;
    }


/* Header container aligned with audio-column */
.header-inner {
  max-width: 1100px;        /* SAME as main */
  margin: 0 auto;
  padding: 0 1rem;          /* SAME as main padding */
  display: flex;
  align-items: center;
}

/* Keep title centered regardless of button width */
.header-title {
  flex: 1;
  text-align: center;
  margin: 0;
}

/* Back button: icon + text only */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #ffc266;
  font-size: 18px;
  font-weight: 500;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
}

/* Hover effect – subtle, no borders */
.back-btn:hover {
  color: #ffda85;
}

    main {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: flex-start;
      margin: 0 auto;
      width: 100%;
      max-width: 1100px;
      padding: 1rem;
      gap: 20px;
    }

    /* ==== Audio Player Column ==== */
    #audio-column {
      flex: 1 1 480px;
      min-width: 300px;
      background-color: #373737;
      border-radius: 15px;
      box-shadow: 0 0 15px rgba(0,0,0,0.4);
      padding: 5px;
      z-index: 5;
    }

    #audio-column h3 {
      text-align: center;
      color: #ffc266;
      margin-bottom: 1rem;
      justify-content: space-between; /* pushes content to edges */
  align-items: center;     /* vertically center items */
    }

/* === Chord Container Above Lyrics === */
#chord-container {
    width: 100%;
    max-width: 100%;
    height: 90px;
    background-color: #d9d9d9;
    border-radius: 10px;
    margin: 10px auto;
    padding: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Right corner container */
.right-corner-text {
  position: absolute;
  right: 10px;   /* distance from right edge */
  top: 10px;     /* distance from top edge (you can change to bottom if you prefer) */
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* aligns the text to the right edge */
  gap: 4px; /* spacing between spans */
}

.right-corner-text span {
  font-size: 0.9em;
  color: #333;
}
/* right corner end */

#chord-container #next-chord-display {
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 15px;
    color: black;
}

#chord-container #chord-display {
    font-weight: bold;
    font-size: 30px;
    color: black;
}

#chord-container #chord-progress {
    width: 100px;
    height: 6px;
    background: #555;
    border-radius: 3px;
    margin-top: 5px;
    position: relative;
}

#chord-container #chord-progress-inner {
    height: 6px;
    background: #ffc266;
    border-radius: 3px;
    width: 0%;
    position: absolute;
    top: 0;
    left: 0;
    transition: none;
}

    /* ==== Lyrics Display (Moved & Updated) ==== */
#lyrics-container {
  width: 100%;
  max-width: 100%;
  min-height: 80px;            /* Fixed height */
  background-color: #d9d9d9;   /* Light grey background (same as before) */
  border-radius: 10px;
  margin: 10px auto;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;             /* Prevent text overflow flicker */
}

    #lyrics-display {
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: black;
  font-family: 'NotoSansDevanagari', 'Noto Sans Devanagari', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern", "liga", "clig", "calt";
  transition: opacity 0.5s ease-in-out;
}

    /* When lyrics fade */
    #lyrics-display.fade {
  opacity: 0.3;
}

    #player-controls button {
      background: none;
      border: 2px solid #ffc266;
      color: #ffc266;
      border-radius: 8px;
      cursor: pointer;
      padding: 0.5rem 0.8rem;
      margin: 0.3rem;
      transition: all 0.2s ease;
      font-size: 0.95rem;
    }

    #player-controls button:hover {
      background-color: #ffc266;
      color: #2d2d2d;
    }

/* === Disabled Play / Stop buttons === */
#player-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #888;
  color: #888;
}

#player-controls button:disabled:hover {
  background: none;
  color: #888;
}

/* === Fixed-size Play / Stop / Hamburger buttons === */
#play,
#stop {
  position: relative;
  width: 50px;        /* 🔽 smaller width */
  height: 36px;       /* 🔽 smaller height */
  padding: 0;         /* important: prevents size mismatch */
}

/* Both labels occupy same space */
#play .play-label,
#play .pause-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Default state: show Play */
#play .pause-label {
  display: none;
}

/* Playing state */
#play.playing .play-label {
  display: none;
}

#play.playing .pause-label {
  display: flex;
}


    #progress-bar {
      width: 100%;
      background-color: #d9d9f2;
      border-radius: 10px;
      height: 6px;
      cursor: pointer;
      margin: 4px 0 6px;
    }

    #timer-container {
      text-align: center;
      font-size: 12px;
      margin-bottom: 10px;
      color: #ffc266;
    }

    .slider {
      width: 100%;
      accent-color: #ffc266;
      margin: 4px 0;
    }

    label {
      display: block;
      font-size: 12px;
      color: #ffc266;
      margin-top: 5px;
    }

    .circle {
      width: 15px;
      height: 15px;
      border-radius: 50%;
      background: grey;
      display: inline-block;
      margin-left: 8px;
    }

    /* ==== Playlist Column ==== */
    #playlist-column {
      flex: 1 1 480px;
      min-width: 300px;
      background: #373737;
      border-radius: 15px;
      padding: 15px;
      box-shadow: 0 0 15px rgba(0,0,0,0.4);
      overflow-y: auto;
      max-height: 80vh;
      word-wrap: break-word;
    }

    #playlist-column h2 {
      text-align: center;
      color: #ffc266;
      margin-top: 0;
    }

    .song {
      background-color: #464646;
      margin: 6px 0;
      border-radius: 6px;
      padding: 10px;
      transition: background-color 0.3s;
    }

    .song:hover {
      background-color: #4d4d4d;
    }

    .song a {
      color: #ffc266;
      text-decoration: none;
      font-weight: 500;
      display: inline-block;
      transition: transform 0.3s, color 0.3s;
      word-break: break-word;
    }

    .song a:hover {
      transform: scale(1.05);
      color: #ffda85;
    }

    .song p {
      margin: 4px 0;
      font-size: 12px;
      color: #e9cc95;
    }

    .active-track {
      background-color: #4d4d4d;
      color: #ffc266;
      font-weight: bold;
    }

    /* ==== Footer ==== */
    footer {
      width: 100%;
      text-align: center;
      padding: 15px 10px;
      background-color: #373737;
      color: #ffc266;
      font-size: 14px;
    }

    .footer-container {
      width: 50%;
      min-width: 300px;
      margin: 0 auto;
      text-align: center;
    }

    /* ==== Responsive ==== */
    @media (max-width: 768px) {
      body, html {
        height: 100%;
        overflow: hidden;
        -webkit-text-size-adjust: 100%; /* safari */
        header {
          display: none;
        }

/* Fix the height of the audio player */
  #audio-column {
      height: 425px !important;       /* You can adjust to 260px, 280px, etc. */
      overflow-y: auto !important;    /* Allows inner scrolling */
      padding: 10px !important;
  }

  /* Reduce spacing inside */
  #chord-container,
  #lyrics-container {
      margin: 6px 0 !important;
      padding: 6px !important;
  }

  /* Smaller chord and lyric text */
  #chord-display {
      font-size: 20px !important;
  }
  #lyrics-display {
      font-size: 15px !important;
  }

  /* Shrink buttons */
  #player-controls button {
      font-size: 0.75rem !important;
      padding: 0.3rem 0.5rem !important;
  }

  /* Playlist starts higher */
  #playlist-column {
      padding-top: 320px !important;   /* matches reduced audio player height */
  }
      }

      main {
        flex-direction: column;
        align-items: center;
        padding: 0;
        height: 100%;
        overflow: hidden;
      }

      #audio-column {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        border-radius: 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.5);
      }

      /* Add padding-top so playlist starts below the audio player */
      #playlist-column {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        height: 100vh;
        overflow-y: auto;
        border-radius: 0;
        position: relative;
        padding-top: 460px; /* Space for fixed audio player */
      }

      header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
      }

      header h1 {
        font-size: 1.8rem;
      }

      #audio-column h2 {
        margin-top: 0.5rem;
      }

      #player-controls button {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
      }

      #playlist-column h2 {
        font-size: 1.2rem;
      }

      .song p {
        font-size: 11px;
      }
    }

    @media (max-width: 480px) {
      #audio-column {
      height: 480px !important;  /* slightly taller for very small screens */
     }
     #playlist-column {
       padding-top: 500px; /* match new audio-column height + some margin */
     }

      header h1 {
        font-size: 1.5rem;
      }

      #player-controls button {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
      }
    }

   .song-link.disabled {
  pointer-events: none !important; /* ensures click blocking */
  opacity: 0.5 !important;         /* visual cue */
  cursor: not-allowed !important;
  filter: grayscale(0.6);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Flex layout for buttons: always one row */
.button-row {
    display: flex;
    justify-content: space-between; /* spread buttons evenly */
    align-items: center;
    gap: 5px; /* space between buttons */
    flex-wrap: nowrap; /* prevent wrapping */
}

/* Make buttons expand evenly */
.button-row button {
    flex: 1 1 auto;      /* flex-grow: 1, flex-shrink: 1, auto basis */
    min-width: 20px;     /* optional: prevent tiny buttons */
    text-align: center;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

/* Icon buttons: keep square */
.button-row button.icon-btn {
    padding: 0.3rem;
}

.button-row button.icon-btn img {
    width: 28px;
    height: 28px;
}

/* Mobile adjustments for very small screens */
@media (max-width: 480px) {
    .button-row button {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }

    .button-row button.icon-btn img {
        width: 24px;
        height: 24px;
    }
}

/* === Volume Slide-Up Drawer === */
#volume-drawer {
  position: fixed;
  bottom: -320px;               /* hidden by default */
  left: 0;
  right: 0;
  background: #373737;
  border-radius: 16px 16px 0 0;
  padding: 16px;
  z-index: 9999;
  transition: bottom 0.35s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
}

/* Open state */
#volume-drawer.open {
  bottom: 0;
}

/* Handle bar */
.drawer-handle {
  width: 42px;
  height: 6px;
  background: #aaa;
  border-radius: 3px;
  margin: 0 auto 14px;
  touch-action: none;
}

/* Drawer labels */
#volume-drawer label {
  font-size: 12px;
  margin-bottom: 6px;
  color: #ffc266;
}

/* Hide drawer button on desktop */
@media (min-width: 769px) {
  #volume-drawer {
    position: static;
    bottom: auto;
    box-shadow: none;
    border-radius: 0;
  }
}

@media (max-width: 600px) {
  #audio-column {
    height: auto !important;
    max-height: 46vh;
    overflow-y: auto;
  }

  #playlist-column {
    padding-top: 55vh;
  }
}

/* Hide mobile-only buttons on desktop */
.mobile-only {
  display: none;
}

/* Show only on small screens */
@media (max-width: 768px) {
  .mobile-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.logo-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  line-height: 1;
}

.theme-toggle:hover {
  opacity: 0.8;
}

.menu-wrapper {
  position: relative;
}

#hamburger-btn {
  font-size: 26px;
  background: none;
  border: 2px solid #ffc266;
  cursor: pointer;
  color: #ffc266;

  height: 36px;       /* ✅ same height as play/stop */
  width: auto;        /* ✅ width stays natural */
  padding: 0 14px;    /* keeps it visually balanced */
  border-radius: 8px; /* matches other buttons */
}


#hamburger-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 36px;
  background: #2f2f2f;
  border-radius: 10px;
  padding: 8px;
  z-index: 2000;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

#hamburger-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: #ffda85;
  padding: 8px 10px;
  width: 100%;
  cursor: pointer;
}

#hamburger-menu button img {
  width: 22px;
  height: 22px;
}

#hamburger-menu button:hover {
  background: rgba(255,218,133,0.15);
  border-radius: 6px;
}

#hamburger-menu.open {
  display: block;
}
