/* ==========================================
   GLOBAL LAYOUT & RESET STYLES
   ========================================== */
* { 
    box-sizing: border-box; 
    font-family: Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #f4f7f6;
}

/* Fixed Global Header */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;

    background-color: rgb(16, 82, 92);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.header-brand {
    display:flex;
    
        color: rgb(255, 255, 255);
        font-size: 17px;
        font-weight: bold;
        padding:10px 0 0 5px;
        text-align:center;
        gap:5px;
     Margin-right:auto;
}

.header-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.header-icon {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    cursor: pointer;
}

.myaccount {
    width:80px;
    margin:5px 10px 5px 5px;
    color:#ddd;
    display: flex;
    flex-direction:column;
    text-decoration:none;
    text-align:center;
    background-color: rgb(16, 82, 92); 
    align-items: center; 
    justify-content:center;
    font-size:10px;
    cursor:pointer;
}

/* Scroll Container adjustment for Fixed Header */
.scroll-container {
    height: 100vh;
    padding-top: 50px;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.page-section {
    height: calc(100vh - 50px);
    scroll-snap-align: start;
    padding: 15px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container { 
    width: 100%;
    max-width: 950px; 
    height: 82vh;
    background: #fff; 
    padding: 15px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ==========================================
   LYRICS & CONTROL BOARDS
   ========================================== */
.lyrics-section { 
    background: #fdfdfd; 
    border: 1px solid #eee; 
    border-radius: 6px; 
    padding: 15px; 
    flex: 1;
    overflow-y: auto; 
    white-space: pre-wrap; 
    margin-bottom: 12px; 
    font-size: 16px; 
    line-height: 1.6; 
}

.player-panel { 
    background: #333; 
    color: #fff; 
    padding: 12px; 
    border-radius: 6px; 
    display: flex; 
    flex-direction: column;
    gap: 10px; 
    margin-bottom: 12px; 
}

.slider-container { display: flex; align-items: center; gap: 10px; width: 100%; }
.slider-container input[type="range"] { flex: 1; cursor: pointer; height: 6px; }
.time-display { font-family: monospace; font-size: 13px; }
.controls-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.player-controls { display: flex; gap: 12px; }
.player-btn { background: #fff; border: none; color: #333; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; }
/*.volume-container { display: flex; align-items: center; gap: 8px; }
.volume-container input[type="range"] { width: 60px; height: 5px; }*/

/* ==========================================
   RESPONSIVE MEDIA CONTROLS BAR (NO OVERFLOW)
   ========================================== */
.player-panel { 
    background: #333; 
    color: #fff; 
    padding: 15px; 
    border-radius: 6px; 
    display: flex; 
    flex-direction: column;
    gap: 12px; 
    margin-bottom: 15px; 
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap; /* Allows split-line positioning on small mobile views */
    gap: 12px;
}

.player-controls { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; /* Keeps buttons wrapping cleanly */
}

/* Base style for uniform control buttons */
.player-btn { 
    background: #fff; 
    border: none; 
    color: #333; 
    width: 38px; 
    height: 38px; 
    border-radius: 50%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 14px; 
    cursor: pointer; 
    flex-shrink: 0;
}

.volume-container { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    flex-shrink: 0;
}

.volume-container input[type="range"] { 
    width: 70px; 
    cursor: pointer; 
    height: 5px; 
}

/* Smart Two-Line Stack Modification for Small Mobile Screen Resolutions */
@media (max-width: 600px) {
    .controls-row {
        flex-direction: column; /* Splitting panel elements into 2 balanced lines */
        align-items: center;
        gap: 12px;
    }
    
    .player-controls {
        justify-content: center;
        width: 100%;
        gap: 6px;
    }
    
    .player-btn {
        width: 36px;  /* Micro button scaling to keep lines compact */
        height: 36px;
        font-size: 13px;
    }
    
    .volume-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        border-top: 1px solid #444;
        padding-top: 10px;
        gap: 8px;
    }


        .volume-container .player-btn {
        background: #fff;
        color: #333;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }



    .volume-container input[type="range"] {
        width: 90px; /* Snug spacing correction to balance the skip icons perfectly */
    }
    
}
/********************************************************************************


/* =========================================================================
   FIXED: SINGLE-LINE SEARCH WINDOW (NO HIDDEN ELEMENTS / NO WRAPPING)
   ========================================================================= */
.search-window-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #eaeaea;
    padding: 6px 10px;
    border-radius: 6px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden; /* Shield layout boundary integrity */
}

.add-song-tooltip {
    flex-shrink: 0; /* Protect layout structure positioning */
}

.add-btn {
    background: #28a745;
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0; 
}

.search-window-bottom input[type="text"] {
    flex: 2;
    min-width: 0; /* Enforces native input box resizing inside small flex items */
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.search-window-bottom select {
    flex: 1;
    min-width: 0; /* Ensures dynamic dropdowns cleanly scale inside small views */
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background-color: #fff;
    text-overflow: ellipsis; /* Gracefully truncates long string values */
}

.icon-search-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* FIXED: Prevents icon from hiding on mobile views */
}

/* Strict mobile view scaling constraint sets */
@media (max-width: 600px) {
    .search-window-bottom {
        padding: 5px;
        gap: 4px;
    }
    .search-window-bottom input[type="text"] { padding: 6px 8px; font-size: 11px; }
    .search-window-bottom select { padding: 6px 4px; font-size: 11px; }
    .icon-search-btn { padding: 6px 10px; font-size: 12px; }
    .add-btn { width: 30px; height: 30px; font-size: 14px; }
}

.add-song-tooltip { position: relative; display: inline-block; }
.add-btn { background: #28a745; color: white; border: none; width: 34px; height: 34px; border-radius: 4px; font-size: 18px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* ==========================================
   PAGE 2: EXTENDED DATA TABLE
   ========================================== */
/*.directory-scroll-box { flex: 1; overflow-y: auto; margin-top: 5px; }
.directory-table { width: 100%; border-collapse: collapse; }
.directory-table th, .directory-table td { border-bottom: 1px solid #eee; padding: 8px 6px; text-align: left; font-size: 13px; }
.directory-table th { background: #f8f9fa; font-weight: bold; position: sticky; top: 0; z-index: 10; }
.header-select { width: 100%; padding: 4px; border: 1px solid #ccc; border-radius: 4px; font-size: 12px; }
.table-play-btn { background: #28a745; color: white; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; text-decoration: none; font-weight: bold; }
.table-play-btn.disabled { background: #ccc; cursor: not-allowed; pointer-events: none; }
.wish-btn { background: none; border: none; font-size: 16px; cursor: pointer; color: #ff4757; }
.video-btn { text-decoration: none; font-size: 14px; }

/* Auth forms styling components */
.auth-container { max-width: 400px; margin: 60px auto; background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.form-group { margin-bottom: 15px; display: flex; flex-direction: column; }
.form-group label { font-weight: bold; margin-bottom: 5px; font-size: 14px; }
.form-group input { padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
.btn-auth { background: #007bff; color: white; padding: 12px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; width: 100%; }

.toggle-switch-view { display: flex; gap: 10px; margin-bottom: 10px; background: #eee; padding: 4px; border-radius: 4px; width: fit-content; }
.toggle-item { padding: 6px 12px; text-decoration: none; color: #333; border-radius: 4px; font-size: 12px; font-weight: bold; }
.toggle-item.active { background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* Form Container */
.form-container { max-width: 650px; margin: 30px auto; background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.admin-song-item { display: flex; justify-content: space-between; align-items: center; background: #fafafa; padding: 10px; border: 1px solid #e2e2e2; border-radius: 4px; margin-bottom: 8px; }
.action-links { display: flex; gap: 8px; }
.edit-action-link { background: #007bff; color: white; padding: 6px 12px; border-radius: 4px; text-decoration: none; font-size: 13px; }
.delete-btn { background: #dc3545; color: white; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 13px; }

/* Responsive adjustments */
@media (max-width: 600px) {
 /*   .search-window-bottom { flex-wrap: wrap; }*/
    .directory-table th, .directory-table td { font-size: 11px; padding: 4px 2px; }
}


/* ==========================================
   ANIMATIONS & PREMIUM TRANSITIONS
   ========================================== */
/* Smooth glide transition for the single-scroll sections */
.scroll-container {
    scroll-behavior: smooth;
    transition: all 0.5s ease-in-out;
}

/* Elastic click animation for Play buttons */
.table-play-btn, .player-btn {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease;
}

.table-play-btn:active, .player-btn:active {
    transform: scale(0.85); /* Slightly shrinks on click press */
}

/* Smooth fade-in effect for lyrics text box when a new song loads */
.lyrics-section {
    animation: fadeInLyrics 0.6s ease-out;
}

@keyframes fadeInLyrics {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ==========================================
   PAGE 2: COMPACT SONG DIRECTORY TABLE (OPTIMISED)
   ========================================== */
.directory-scroll-box {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto; /* Enables smooth sideways swipe on mobile viewports */
    margin-top: 5px;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    background: #fff;
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Enforces strict layout column sizing constraints */
    min-width: 800px;    /* Prevents columns from getting crushed on small displays */
}

.directory-table th, .directory-table td {
    border-bottom: 1px solid #eee;
    padding: 10px 8px;
    text-align: left;
    font-size: 13px;
    vertical-align: middle;
    /* Prevent text wrap breaks by cleanly truncating long strings */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; 
}

.directory-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #444;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: inset 0 -1px 0 #ddd;
}

/* Precise Column Width Allocation Matrix */
.directory-table th:nth-child(1), .directory-table td:nth-child(1) { width: 7%; text-align: center; }  /* Play Button Column */
.directory-table th:nth-child(2), .directory-table td:nth-child(2) { width: 7%; text-align: center; }  /* Wish Heart Column */
.directory-table th:nth-child(3), .directory-table td:nth-child(3) { width: 22%; } /* Song Title Column */
.directory-table th:nth-child(4), .directory-table td:nth-child(4) { width: 18%; } /* Artist / Album Column */
.directory-table th:nth-child(5), .directory-table td:nth-child(5) { width: 16%; } /* Singer Column */
.directory-table th:nth-child(6), .directory-table td:nth-child(6) { width: 15%; } /* Lyric By Column */
.directory-table th:nth-child(7), .directory-table td:nth-child(7) { width: 15%; } /* Music By Column */
.directory-table th:nth-child(8), .directory-table td:nth-child(8) { width: 10%; text-align: center; } /* Video Link Column */

/* Subtle highlight when hovering over data text entries */
.directory-table tbody tr:hover {
    background-color: #f7f9fc;
}

.directory-table td strong {
    color: #111;
    font-size: 13.5px;
}

.header-select {
    width: 100%;
    padding: 6px;
    font-weight: bold;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 12px;
    cursor: pointer;
    text-overflow: ellipsis;
}

.header-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 3px rgba(0,123,255,0.2);
}

.table-play-btn {
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(40,167,69,0.2);
}

.table-play-btn:hover {
    background: #218838;
}

.table-play-btn.disabled {
    background: #ccc;
    box-shadow: none;
}

.video-btn {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
}

.video-btn:hover {
    text-decoration: underline;
}

/* Toggle mode selector styles */
.toggle-switch-view {
    display: flex;
    gap: 4px;
    background: #e9ecef;
    padding: 4px;
    border-radius: 6px;
    width: fit-content;
}

.toggle-item {
    padding: 6px 14px;
    text-decoration: none;
    color: #495057;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s;
}

.toggle-item.active {
    background: #fff;
    color: #212529;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* ==========================================
   RESTORED: ADMIN DASHBOARD BUTTONS & SELECTS
   ========================================== */
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    background-color: #fff;
    cursor: pointer;
}

.btn-submit {
    background: #28a745;
    color: white;
    font-weight: bold;
    padding: 12px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    margin-top: 10px;
    width: 100%;
    text-align: center;
    display: block;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #218838;
}

.btn-submit.btn-edit {
    background: #ffc107;
    color: #212529;
}

.btn-submit.btn-edit:hover {
    background: #e0a800;
}

/* Typography Controls Layout Ribbon */
.font-controls-ribbon {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
    padding-right: 2px;
}
.font-control-btn {
    background: #f1f1f1;
    border: 1px solid #ccc;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}
.font-control-btn:hover { background: #e2e2e2; }

/* Dynamic Font Option Rule Definitions */
.font-style-sans { font-family: Arial, sans-serif !important; }
.font-style-serif { font-family: 'Georgia', 'Times New Roman', serif !important; }
.font-style-monospace { font-family: 'Courier New', monospace !important; }


/* Precise 8-Column Width Allocation Matrix (Prevents Mobile Overflow) */
.directory-table th:nth-child(1), .directory-table td:nth-child(1) { width:43px; text-align: center; }  /* Play Column */
.directory-table th:nth-child(2), .directory-table td:nth-child(2) { width:47px; text-align: center; }  /* Wish Column */
.directory-table th:nth-child(3), .directory-table td:nth-child(3) { width:53px; text-align: center; }  /* Share Column */
.directory-table th:nth-child(4), .directory-table td:nth-child(4) { width: 22%; } /* Songs Title Column */
.directory-table th:nth-child(5), .directory-table td:nth-child(5) { width: 17%; } /* Artist / Album Column */
.directory-table th:nth-child(6), .directory-table td:nth-child(6) { width: 15%; } /* Singer Column */
.directory-table th:nth-child(7), .directory-table td:nth-child(7) { width: 15%; } /* Lyric By Column */
.directory-table th:nth-child(8), .directory-table td:nth-child(8) { width: 15%; } /* Music By Column */
.directory-table th:nth-child(9), .directory-table td:nth-child(9) { width: 11%; text-align: center; } /* Video Column */


/* ==========================================
   RESPONSIVE OVERLAY SNAPBAR ANIMATION
   ========================================== */
@keyframes slideUpToast {
    from { bottom: 40px; opacity: 0; }
    to { bottom: 80px; opacity: 1; }
}
