* {
  box-sizing: border-box;
  font-family:
    "Noto Serif Telugu",
    "Noto Sans Telugu",
    "Kohinoor Telugu",
    "Pothana2000",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/*** ==========================================================================
     For all html
=========================================================================== ***/

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  background: #f7f7f7;
}

.appHeader {
    padding: 0px 10px;
}

.appLogo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}

.appLogo2 {
    display: none;
    margin-right: 5px;
    width: 12%;
}


.appTitle {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
}

.card-container {
  display: none; /* Aligns items side-by-side */
  align-items: center; /* Vertically centers the text and image */
  justify-content: center;
  gap: 2px; /* Puts clean spacing between image and text */
}

/*** ==========================================================================
     Authentication (index.html)
=========================================================================== ***/

.authContainer{
    display: flex;
    justify-content:center;
    padding:5px;
    text-align: center;
    margin: 5px;
}


[hidden]{
    display:none !important;
}


.authContainer input{
    width:280px;
    max-width:100%;
    box-sizing:border-box;
}

.authPwd{
    margin-top: 10px;
}

.authBtn{
    display:block;
    width:200px;
    max-width:90%;
    margin:15px auto;
    font-size:18px;
    color:white;
    border:none;
    border-radius:4px;
    padding:10px;
    transition: background-color 0.2s ease;
}

.authBtn:disabled {
  background-color: #64748b; /* Muted gray */
  cursor: not-allowed;
}

.spinning-hourglass {
  display: inline-block;
  animation: flip 1.5s infinite linear;
}

@keyframes flip {
  0% {
    transform: rotate(0deg);
  }
  80% {
    transform: rotate(0deg); /* Pauses briefly before flipping */
  }
  100% {
    transform: rotate(180deg);
  }
}

#loginBtn{
    background:#44CCFF;
}

#registerBtn{
    background:#4DF552;
}

#forgotBtn{
    background:#F3624F;
}

/** Password Controls **/
.password-wrapper{
    position:relative;
    width:320px;
    max-width:90%;
    margin:10px auto;
}

.password-wrapper input{
    width:100%;
    margin:0;
    padding-right:42px;
    box-sizing:border-box;
}

.password-toggle{
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    width:32px;
    height:32px;
    border:none;
    background:transparent;
    cursor:pointer;
    color:#666;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
}

.password-toggle:hover{
    color:#000;
}

/** Form controls **/
.authCard{
    width:360px;
    max-width:95%;
    background:#ffffff;
    border:1px solid #ddd;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(0,0,0,.15);
    padding:24px;
    text-align:center;
}

#loginForm,
#registerForm,
#forgotForm{
    text-align:center;
}

#loginForm input,
#registerForm input,
#forgotForm input{
    width:254px;
    max-width:90%;
    box-sizing:border-box;
    margin:10px auto;
    display:block;
}

#showForgot {
    color: red;
}

#showRegister{
    color: green;
}

/*** ==========================================================================
     Search in index.html
=========================================================================== ***/

.searchBox{
    justify-content:center;
    padding:5px;
    text-align: center;
    margin: 5px;
}

.searchBtn{
    background:#44CCFF;
    transition: background-color 0.2s ease;
}

.searchBtn:disabled {
  background-color: #64748b; /* Muted gray */
  cursor: not-allowed;
}

.searchBox input,
.searchBox select,
.searchBox button {
  width: 80%;
  padding: 8px;
  margin: 6px 0;
  font-size: 16px;
}

.radioGroup {
  display: flex;
  justify-content: space-around;
}

/*** ==========================================================================
     Results (results.html)
=========================================================================== ***/

/*
.topBar {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #eee;
  align-items: center;
}
*/

#results {
  height: 75vh;
  overflow-y: auto;
}

.resultRow {
  display: grid;
  grid-template-columns: 75% 25%;
  background: white;
  margin: 6px;
  padding: 8px;
  border-radius: 6px;
}

.score {
  display: flex;
  gap: 20px;
  align-items: center;
}

.scoreValue {
  font-weight: bold;
  color: #e03dd5;
}

.playCount {
  font-weight: bold;
  color: #1766e6;
}

.lyricsPanel {
  height: 30vh;
  overflow-y: auto;
  background: #fff3e0;
  padding: 8px;
}

.pallavi {
  font-weight: bold;
  color: #6a1b9a;
}

#pallaviBlock {
    white-space: pre-wrap;
}

.charanam {
  color: #333;
}

#charanamBlock {
    white-space: pre-wrap;
}

#toast {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  display: none;
}

/* Horizontal lyrics container */
.lyricsHorizontal {
  height: 5vh;
  overflow: hidden;
  background: #fff3e0;
  border-top: 1px solid #ddd;
  position: relative;
}

/* Moving lyrics text */
#lyricsHorizontalInner {
  position: absolute;
  white-space: nowrap;
  padding-left: 100vw;
  animation: lyricScroll linear infinite;
  animation-duration: 35s;
  font-size: 16px;
  font-weight: 500;
}

@keyframes lyricScroll {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-100%);
  }
}

/* Font controls */
.fontControls {
  display: flex;
  gap: 4px;
}

.fontControls button {
  width: 22px;
  height: 22px;
  padding: 0;
}

.resultRow.playing {
  background: rgba(173, 216, 230, 0.45); /* light blue, transparent */
}

.favBtn {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  font-size: 30px;
  color: #777 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  display: inline-block;
}

.favBtn.favActive {
  color: #e53935 !important;
}

.favBtn:hover {
  transform: scale(1.2);
}

.favBtn.favActive {
  color: red !important;
}

input,
select,
textarea {
  font-size: 16px !important;
}

.playMsg {
  display: block;
  font-size: 0.85rem;
  color: #1565c0;
  margin-top: 4px;
}

.linkBtn {
  margin: 2px 0;
  padding: 6px;
  font-size: 1.1rem;
  border-radius: 6px;
}

#playPreference {
  padding: 6px;
  font-size: 0.9rem;
}

.hl {
  background-color: yellow;
  color: black;
  font-weight: bold;
  padding: 1px 2px;
  border-radius: 3px;
}

.chgBtn {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  font-size: 14px;
  color: #777 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  display: inline-block;
}

.topplayBtn {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  font-size: 14px;
  color: #345 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  display: inline-block;
}

.playBtn {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  font-size: 30px;
  color: #345 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  display: inline-block;
}


#youtubePlayer {
    width: 100%;
    height: 420px;
}

#nowPlayingPanel{
    display:none;
    max-width:900px;
    margin:0px auto;
    border:1px solid #ccc;
    border-radius:10px;
    background:#fafafa;
}

.songInfo {
    width: 100%;
    overflow: hidden;
    background: #f4f4f4;
    border: 1px solid #ddd;
    font-family: sans-serif;
    font-size: 12px;
    color: #6a1b9a;
}

.songIBlock {
    display: inline-block;
    white-space: nowrap;      /* Prevents text from breaking into rows */
    padding-left: 100%;       /* Starts animation completely off-screen */
    animation: scroll-left 45s linear infinite;
}

/* The animation path */
@keyframes scroll-left {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Target mobile devices and small screens up to tablet sizes */
/*
@media screen and (max-width: 1024px) and (orientation: landscape) {
  .npToolbar {
    display: none !important;
  }
  .songInfo {
    display: none !important;
  }
  .progressInfo {
    display: none !important;
  }
  .lyricsPanel {
    display: none !important;
  }
  .toggleBtn {
    display: none !important;
  }
}
*/
/* 1. STRUCTURAL WRAPPER (Keeps each tooltip anchored to its button) */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
    margin: 1px 10px;        /* Spacing around buttons for layout breathing room */
}

/* 2. BASE BUTTON CLASS (Shared sizing/fonts) */
.action-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-family: sans-serif;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

/* 3. MULTIPLE COLOR LAYER CLASSES (Assigned individually) */
.btn-success { background-color: #28a745; color: white; }
.btn-warning { background-color: #ffc107; color: #333; }
.btn-danger  { background-color: #dc3545; color: white; }

/* 4. BASE TOOLTIP TEXT (Shared layout for help boxes) */
.tooltip-text {
    visibility: hidden;
    width: 150px;
    background-color: #7bdcdc;   
    color: #fff;              
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    font-size: 11px;
    font-family: sans-serif;
    font-weight: normal;
    
    /* Positioning logic above button */
    position: absolute;
    z-index: 1;
    bottom: -100%;             
    left: 150%;
    margin-left: -30px;       /* Keeps box perfectly centered (Half of 150px width) */
    
    /* Fade effect */
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

/* 5. DYNAMIC REVEAL TRIGGER (Only active on desktop mice) */
@media (hover: hover) {
    .tooltip-wrapper:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }
}

/* Mobile Tap Trigger: Keeps text hidden until the helper wrapper is actively touched */
@media (hover: none) {
    .tooltip-wrapper:active .tooltip-text {
        visibility: visible;
        opacity: 1;
    }
}

.progressOuter {

    width:100%;
    height:6px;

    background:#ddd;

    border-radius:3px;

    overflow:hidden;

}

.progressInner {

    width:0%;

    height:100%;

    background:#4CAF50;

    transition:width .3s linear;

}

.nowPlaying.flash {
    animation: flashPlayer 0.7s ease;
}

@keyframes flashPlayer {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.topBar1 {

    position: fixed;

    top: -70px;

    left: 0;

    right: 0;

    z-index: 1000;

    transition: top .3s ease;

}

.topBar1.show {

    top: 0;

}

.topBar2 {

    position: fixed;

    top: -100px;

    left: 0;

    right: 0;

    z-index: 1000;

    transition: top .3s ease;

}

.topBar2.show {

    top: 0;

}

.npToolbar{
    display:flex;
    align-items:center;
}

.npBtn{
    width:37px;
    height:32px;
    border-radius:8px;
    font-size:20px;
    cursor:pointer;
}

.npBtn.active{
    background:#673ab7;
    color:white;
}

.npToolbar button.selected{
    background:#6a1b9a;
    color:white;
}

.userToolbar{
    display:flex;
    align-items:center;
    justify-content:center;
}

.userBtn{
    width:37px;
    height:32px;
    border-radius:8px;
    font-size:20px;
    cursor:pointer;
}

.userBtn.active{
    background:#673ab7;
    color:white;
}

.userToolbar button.selected{
    background:#6a1b9a;
    color:white;
}

.full-screen-player {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important; /* Forces it to stay on top of everything */
  background-color: #000;    /* Or whatever your background theme is */
  margin: 0 !important;      /* Removes any layout gaps */
  padding: 20px;             /* Optional padding for inner content */
  box-sizing: border-box;
}


.npSong{
    text-align:left;
    font-size:1.0em;
    font-weight:bold;
    color:#4a148c;
    margin:2px 0 1px;
}

.playerTopRow{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-bottom:8px;
}

#playerHeader{
    flex:1;
}

#playerControls{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}

.playerControls button{
    min-width:42px;
    height:32px;
    margin:0 8px;
    font-size:16px;
}

.progressInfo{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:1px 0;
    width:100%;
    font-size:12px;
    white-space: pre;
}

#songProgress{
    text-align:right;
    font-variant-numeric:tabular-nums;
}

.toggleBtn{
    width:100%;
    margin-top:1px;
    margin-bottom:1px;
}

#youtubePlayerContainerold {
    display: none;
    width: 100%;
    max-width: 900px;
    margin: 10px auto;
}

#youtubePlayerContainer{
    overflow:hidden;
    max-height:0;
    transition:max-height .3s ease;
}

#youtubePlayerContainer.expanded{
    max-height:425px;
}

.resultsToolbar{
    text-align:center;
    padding:12px;
    margin:1px 0;
    border:1px solid #ddd;
    border-radius:12px;
    background:#fafafa;
}

.resultsSummary{
    font-size:1.1em;
    font-weight:bold;
    margin-bottom:1px;
}

.resultsMainBtn{
    width:60%;
    margin-bottom:1px;
    font-size:1.1em;
}

.resultsNavButtons{
    display:flex;
    justify-content:center;
    gap:12px;
}

.playStatus{
    font-weight:bold;
    margin-bottom:1px;
    min-height:20px;
}

.playStatus.playing{
    color:#008000;
}

.playStatus.played{
    color:#0066cc;
}

.playStatus.error{
    color:#cc0000;
}

.reportLink{
    color:#0066cc;
    text-decoration:underline;
}

.reportLink:hover{
    color:#004499;
}

.errorFocus {
    background: #fff7d6;
    transition: background 0.5s;
}

.modalOverlay{

    position: fixed;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100vw;
    height: 100vh;

    display: flex;

    justify-content: center;
    align-items: center;

    background: rgba(255,0,0,.5);

    z-index: 2147483647;
}

.modalCard{

    width:380px;

    max-width:90%;

    background:white;

    border-radius:10px;

    padding:20px;

    text-align:center;

    box-shadow:0 0 20px rgba(0,0,0,.35);

}

.modalButtons{

    margin-top:20px;

    display:flex;

    flex-direction:column;

    gap:10px;

}

.modalButtons button{

    padding:10px;

    font-size:16px;

    cursor:pointer;

}

/* ==========================================================
   Service Worker Status
   ========================================================== */

.swStatus {
    position: fixed;
    right: 8px;
    bottom: 8px;
    z-index: 9999;

    padding: 4px 8px;
    border-radius: 12px;

    font-size: 11px;
    line-height: 1;

    background: rgba(0, 0, 0, 0.45);
    color: #fff;

    opacity: 0.65;

    cursor: default;
}

.swStatus.updateAvailable {
    cursor: pointer;
    opacity: 1;

    animation: swFlash 1.2s infinite;
}

@keyframes swFlash {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

/* ==========================================================
   Padamu-Pata Help Modal
   ========================================================== */

.helpModal {
    position: fixed;
    inset: 0;

    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.55);
}

.helpDialog {
    width: min(520px, 100%);
    max-height: 85vh;

    display: flex;
    flex-direction: column;

    background: #fff;
    color: #222;

    border-radius: 12px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);

    overflow: hidden;
}

.helpHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 16px;

    font-size: 18px;
    font-weight: bold;
}

.helpCloseBtn {
    border: 0;
    background: transparent;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}

.helpContent {
    overflow-y: auto;

    padding: 4px 18px 18px;

    font-size: 14px;
    line-height: 1.45;
}

.helpContent h3 {
    margin: 12px 0 6px;
}

.helpContent h4 {
    margin: 10px 0 3px;
}

.helpContent p {
    margin: 4px 0 10px;
}

.helpContent hr {
    margin: 16px 0;
    border: 0;
    border-top: 1px solid #ddd;
}

.helpFooter {
    text-align: center;
    opacity: 0.65;
}

/* ==========================================================
   RESULTS HELP
========================================================== */

.resultsHelpCard {
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
}

.resultsHelpCard h3 {
    margin-top: 0;
    text-align: center;
}

.helpContent {
    text-align: left;
    line-height: 1.6;
}

.helpContent h4 {
    margin: 16px 0 5px;
}

.helpContent p {
    margin: 5px 0 10px;
}

#btnCloseResultsHelp {
    min-width: 120px;
}
