
/* 🌍 Global settings for the entire page */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;    color: #0c121d; /* A soft, modern dark slate instead of harsh pure black */
    /* background: linear-gradient(135deg, #ecbe41 0%, #e4e8f0 100%); */
    min-height: 100vh;
    background-color: #eaad52; /* A clean, soft off-white background */
    margin: 0;
    padding: 0;
}
.media-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }
  .media-preview-row img,
  .media-preview-row video {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
  }
  
.controller-header h1 {
    color: #3a2808; /* Uses your signature deep dark purple! */
    font-size: 2.5rem; /* Makes it large and clear on the iPad */
    margin-bottom: 10px;
}
.media-container {

    width: 100%;
    height: 35vh; /* set an initial height of the media container */
    max-height: 35vh;  
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}


.media-container img,
.media-container video {
    max-width: 100%;
    max-height: 35vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.audio-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#audio-player {
    width: 600px; /* Forces the bar to be much wider */
    height: 60px; /* Makes it taller */
    transform: scale(1.2); /* Blows up the entire interface proportionally */
    transform-origin: center;
}


/* Split layout setup */



.app-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split display 50/50 straight down the middle */
    gap: 30px;
    padding: 20px;
    height: 80vh;
}

.column {
    background-color: #fff3e0;
    border-radius: 20px;
    padding: 40px;
    overflow: hidden;
        /* Allow column text lists to track along independently */
    scrollbar-width: none;
    width: 100%;
    
    height: 80vh;
    /*max-height: 350px;*/ 
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    
}

.column h2 {
    color: #3a2808;
    margin-top: 0;
}

.column-lyrics::-webkit-scrollbar {
    display: none; 
    
}


#column-lyrics {
    display: flex;
    flex-direction: column; /* Stacks header directly over container */
    overflow: hidden;       /* 🛑 Keeps the main column frame locked tight */
}

/* 📌 Pins your beautiful title section to the top */
#column-lyrics .column-header {
    background-color: #fff3e0; /* 🎨 Matches your column background color exactly */
    padding-bottom: 15px;      /* Buffer zone between the titles and incoming lyrics */
    z-index: 10;               /* Keeps it sitting smoothly on top of moving components */
    width: 100%;
}
/* 🔄 Makes ONLY the lyric content container slide up and down */
#lyrics-container {
    flex-grow: 1;              /* Directs lyrics to swallow all remaining container space */
    overflow-y: auto;          /* 🔄 Activates independent vertical scrolling */
    padding-bottom: 40px;      /* Safeguards final text lines from crashing into bottom border */
    scrollbar-width: none;     /* Hides Firefox scrollbar */
    width: 100%;               
    box-sizing: border-box;    
}

#lyrics-container::-webkit-scrollbar {
    display: none;             /* Hides Chrome/Safari/iPad scrollbar */
}

#column-lyrics h2 {
    color: #3a2808;     /* Triggers your warm dark brown color */
    margin-bottom: 0px;  /* Resets raw spacing since column-header padding takes over */
}
/* Micro styling colors */




.lyric-line{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 54px;
    margin: 0px 0;
    font-weight: 500;
    text-align: left;

    /*smoothly animate*/
    transition: opacity 0.8s ease, transform 0.4s ease;
    transform: scale(0.95);
    opacity: 0;
    display: block;
    width: 95%; 
    max-width: 95%;
    margin-left: auto

}
.lyric-line.active {
    color: #000000;
    opacity: 1;
    transform: scale(1.05);
}


/*medium fade*/
.lyric-line.fade-medium {
    opacity: 0.9;
    color: #b0b0b0;

}
/* 🪟 Deep Fade: 2 lines ahead (preview) */
.lyric-line.fade-deep {
    opacity: 0.40;
    color: #888888;
}

/* ❌ Out of window: Completely invisible */
.lyric-line.hidden {
    opacity: 0;
    pointer-events: none; /* Can't click it accidentally */
}




.lyric-word {
    display: inline-block;
    white-space: pre;
    color: inherit; /* Dim background word color */
    
    /* 💫 The Secret Sauce: Interpolate the color shift smoothly over 0.2 seconds */
    transition: color 0.2s ease-in-out, transform 0.5s ease-in-out;
    transform: scale(1.0);
}



.math-word-token {
    position: relative;
    border-bottom: none;
}

.math-word-token::after {
    content: "";
    position: absolute;
    left: 0.05em;
    right: 0.05em;
    bottom: -0.04em;
    height: 0.06em;
    background: rgba(155, 89, 182, 0.55);
    border-radius: 999px;
    pointer-events: none;
}

/* Standard color for a normal word being sung */
.word-singing-now {
    color: #c97a0c !important; /* Bright green */
    scale: 1.01;
     /* A tiny visual pop makes it feel incredibly responsive */
    /* font-weight: bold; */

    font-weight: bold;
    
    /* 🌟 COMPENSATE FOR THE BOLD WIDTH: */
    letter-spacing: -0.5px; /* Squeezes the characters slightly closer */
    font-size: 0.98em;      /* Scales down the font size by just 2% */

}

/* 🚨 The specific coloration for your math word when active */
.word-singing-now.math-word {
    color: #9b59b6 !important; /* Shifts from green to vibrant Purple! */
    text-shadow: 0 0 8px rgba(155, 89, 182, 0.6); /* Adds a cool subtle glow effect */
    scale: 1.01;
}

/* ==========================================
   📱 IPAD REMOTE CONTROLLER SPECIFIC STYLES
   ========================================== */
.dashboard_body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;    color: #0c121d; /* A soft, modern dark slate instead of harsh pure black */
    background: linear-gradient(135deg, #fda40b 0%, #efbc70 100%);
    min-height: 100vh;
    background-color: #fcfaf7; /* A clean, soft off-white background */
    margin: 0;
    padding: 0;
}


.controller-header {
    text-align: center;
    margin-top: 40px;    /* Adds some nice breathing room at the top of the screen */
    margin-bottom: 30px; /* Adds space between this text and your cards below */
    width: 100%;

}

/* 2. The Controller Layout */
.controller-container {
    display: flex;
    justify-content: center; /* This centers the items horizontally */
    align-items: center;
    flex-wrap: wrap;         /* Allows items to stack if the screen gets small */
    gap: 30px;               /* Adds breathing room between cards */
    max-width: 1200px;       /* Allows them to spread out more */
    margin: 0 auto;          /* Keeps the whole group in the center */
}
 
/* 1. THE GRID: Forces cards to sit side-by-side and match height */
.grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    width: 100%;              
    max-width: 700px; 
    margin: 40px auto 0 auto; 
    align-items: stretch; /* Forces equal heights */
}

/* On small screens (mobile portrait), stack them vertically */
@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* 2. THE CARD: Flexbox column layout so we can control vertical spacing */
.song-card { 
    flex: 0 1 350px;
    background: rgb(245, 150, 77); 
    padding: 24px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    border: 1px solid #e2e8f0;
    
    display: flex;
    flex-direction: column; /* Stack children vertically */
    height: 100%;           /* Fill grid space */
    box-sizing: border-box;
}

.song-card h3 {
    margin-top: 0;
    font-size: 1.25rem;
    line-height: 1.4;
    color: #79521a; /* Gray out the artist slightly */
    margin-bottom: 40px;


}

.song-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.song-card .track-title, 
.song-card.track-title {
    color: #673e04; /* Pop the actual track name in deep dark bold text */
    font-weight: 700;
    display: block; /* Puts the song title on its own clean line */
    margin-top: 4px;
}

.song-card .artist-divider {
    display: none; /* Hides the old dash since we are stacking them cleanly now! */
}


/* 3. THE BUTTON: Automatically sits perfectly at the bottom of its card */
.btn { 
    border: none;
    cursor: pointer;
    display: inline-block; 
    background: #c97a0c; /* Standard purple, overrides can happen here */
    color: white; 
    padding: 12px 24px; 
    text-decoration: none; 
    border-radius: 8px; 
    font-weight: bold; 
    transition: background 0.2s ease, transform 0.1s ease;
    
    /* The Magic Spacer */
    margin-top: auto; 
    align-self: center; /* Centers horizontal alignment */
}

.btn:hover {
    background: #874f02;
}

.btn:active {
    transform: scale(0.92); /* Give it a physical 'click' feedback on iPad */
}

/* ==========================================
   📝 SHARED FORM / ADMIN PAGES
   ========================================== */
.page-shell {
    min-height: 100vh;
    background: linear-gradient(135deg, #eaad52 0%, #fdcb7f 100%);
    color: #0c121d;
    margin: 0;
    padding: 2rem;
    box-sizing: border-box;
}

.page-shell.centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-panel {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-panel.narrow {
    max-width: 480px;
}

.form-card,
.admin-card {
    background: #fff3e0;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1,
.form-card h1,
.admin-card h1 {
    color: #3a2808;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.page-subtitle {
    color: #79521a;
    margin: 0;
    font-size: 1.05rem;
    padding-bottom: 15px;
}

.section-title {
    color: #3a2808;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #c97a0c;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #673e04;
}

.form-group input,
.form-group textarea,
.admin-select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2c9a0;
    background: #fcfaf7;
    color: #0c121d;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.admin-select:focus {
    outline: none;
    border-color: #c97a0c;
    box-shadow: 0 0 0 3px rgba(201, 122, 12, 0.2);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.btn-primary,
.btn-approve,
.btn-reject,
.btn-delete,
.btn-unflag,
.btn-secondary {
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary {
    background: #c97a0c;
    color: white;
}

.btn-primary:hover {
    background: #874f02;
}

.btn-primary.full-width {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-approve { background: #2f9e6b; color: white; }
.btn-reject { background: #c45c3e; color: white; }
.btn-delete { background: #8b3a2b; color: white; }
.btn-unflag { background: #c97a0c; color: white; }
.btn-secondary {
    background: #fff3e0;
    color: #3a2808;
    border: 1px solid #c97a0c;
}

.btn-approve:hover,
.btn-reject:hover,
.btn-delete:hover,
.btn-unflag:hover,
.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

.banner-success,
.banner-warn,
.banner-error {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.banner-success {
    background: rgba(47, 158, 107, 0.15);
    border: 1px solid #2f9e6b;
    color: #1f6b48;
}

.banner-warn {
    background: rgba(201, 122, 12, 0.15);
    border: 1px solid #c97a0c;
    color: #673e04;
}

.banner-error {
    background: rgba(196, 92, 62, 0.12);
    border: 1px solid #c45c3e;
    color: #8b3a2b;
}

.meta {
    color: #79521a;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending { background: rgba(201, 122, 12, 0.2); color: #874f02; }
.status-approved { background: rgba(47, 158, 107, 0.2); color: #1f6b48; }
.status-rejected { background: rgba(196, 92, 62, 0.2); color: #8b3a2b; }

.definition {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #3a2808;
}

.actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.unflag-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.unflag-row .admin-select {
    flex: 1;
    min-width: 220px;
}

.empty {
    color: #79521a;
    font-style: italic;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #e2c9a0;
    background-color: #fff3e0;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    border-radius: 0 0 8px 8px;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0dfc2;
    color: #3a2808;
}

.autocomplete-items div:hover {
    background-color: #f5d7a8;
}

.volume-control-box {
    max-width: 300px; /*  The browser locks onto this measurement */
    margin: 20px auto 0 auto;
    display: flex;
    justify-content: center; /* This centers the items horizontally */
    align-items: center;
}



@keyframes dynamicAutofade {
    0% { 
        opacity: 0; 
        transform: translateY(20px) scale(0.98); 
    }
    8% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }   /* 0.4 seconds: Smooth float down & fade-in entry */
    
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }  /* Holds perfectly solid on screen for over 4 seconds */
    
}



/* Apply this class to your card */
.definition-card-autofade {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
    /* keep your existing animation too */
    animation: dynamicAutofade 8s ease-in-out forwards; /* 'forwards' keeps it frozen at 0% opacity at the end */
}

.definition-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.definition-submitter {
    flex-shrink: 0;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #d9cfbe;
    text-align: right;
    font-size: 0.85rem;
    color: #8c7b65;
}
#visualizer-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#math-display-box {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}



/* Layout & Search Bar */
.definitions-header {
    display: flex;
    flex-direction: column;   
    align-items: flex-start;
    margin-top: 2rem;
    margin-bottom: 1rem;
    gap: 1rem;
}

.admin-input-search {
    padding: 0.5rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 300px;
    font-size: 0.9rem;
}

/* Compact Table Formatting */
.table-container {
    overflow-x: auto;
    background: #ffd9cd;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.definitions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
    table-layout: fixed; /* enforce column widths */
}

.definitions-table th, 
.definitions-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

.definitions-table th {
    background-color: #f7fafc;
    color: #4a5568;
    font-weight: 600;
}

/* Column Tweaks */
.col-word { width: 15%; }
.col-definition { width: 45%; }
.col-status { width: 10%; }
.col-meta { width: 15%; }
.col-actions { width: 15%; }


.sub-text {
    display: block;
    font-size: 0.8rem;
    color: #718096;
}

.text-right { text-align: right; }

/* Inline Editable Textarea */
.edit-definition-input {
    width: 100%;
    font-family: inherit;
    font-size: 0.875rem;
    padding: 0.4rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
}

.edit-definition-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 1px #3182ce;
}

/* Button Grouping inside Table Rows */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
    align-items: center;
}


.button-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.action-buttons form,
.button-group form {
    display: inline-flex;
    margin: 0;
}
/* Slightly smaller buttons so 3 fit comfortably */
.col-actions .btn-secondary,
.col-actions .btn-approve,
.col-actions .btn-reject,
.col-actions .btn-delete {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    white-space: nowrap;
}