/* Reset default browser styles */
body, h1, h2, h3, p, ul, li, a {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
}

/* General body styling */
body {
    /*background-color: #fbebdb;*/
    background: linear-gradient(135deg, #f0f0f0, #d6d6d6);
    color: #333;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}


/* Navbar styling */
.navbar {
    background-color: #333333;
    padding: 15px 0;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo a {
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.navbar .nav-links li {
    margin-left: 30px;
}

.navbar .nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.navbar .nav-links a i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.navbar .nav-links a:hover {
    color: #ddd;
}

.navbar-toggle {
    display: none;
    cursor: pointer;
}

.navbar-toggle-icon {
    font-size: 24px;
    color: white;
}

/* Media queries for responsiveness */
@media (max-width: 800px) {
    .navbar .container {
        flex-wrap: wrap;
    }

    .navbar .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #333;
        order: 3;
    }

    .navbar .nav-links li {
        margin: 0;
        border-top: 1px solid #444;
    }

    .navbar .nav-links a {
        padding: 10px;
    }

    .navbar-toggle {
        display: block;
        order: 2;
    }

    .navbar .nav-links.active {
        display: flex;
    }

    .logo {
        flex-grow: 1;
        font-size: 1rem;
    }

    .logo-img {
        width: 100px;
    }
}

@media (max-width: 1000px) {
    .logo-img {
        width: 110px;
    }

    .nav-greeting,
    .navbar .nav-greeting,
    .user-greeting,
    .navbar .user-greeting,
    .user-privilege,
    .navbar .user-privilege {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .navbar .nav-links a i {
        margin-right: 2px;
        font-size: 1rem;
    }
}

/* Song info link block */
.song-info-link {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease; /* Smooth transition for text color */
}

.song-info-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #d6b378; /* Custom underline color */
    transition: width 0.3s ease;
}

.song-info-link:hover::after {
    width: 100%; /* Extend underline to full width */
}

/* Shadow effect on song title */
.song-info-link .song-info h3 {
    transition: text-shadow 0.3s ease; /* Smooth transition for shadow */
}

.song-info-link:hover .song-info h3 {
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow effect */
}


.song-info-link:hover::after {
    width: 100%; /* Extend underline to full width */
}


/* Song List Page Styles */
.song-list-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 2rem;
}

.song-list-container h2 {
    font-size: 2rem;
    text-align: left;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.song-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.song-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
    text-align: left;
    width: 300px; /* Specify the desired width */
    max-height: 200px; /* Specify the maximum height */
    overflow: hidden; /* Ensures that any content exceeding the max height is hidden */
}

.song-link:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
	background-color: #f8f9fa;
}

.song-info {
    display: block; /* Use block to stack the elements vertically */
    text-align: left;
	margin-bottom: 5px;
}

.song-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
	transition: transform 0.3s ease, font-size 0.3s ease;
}

.song-info h3:hover {
	transform: translateX(1px); /* Slightly increases the size */
}

.song-info p {
    font-size: 0.875rem;
    color: #666;
	margin-top: 0.2rem; /* Add a little space between the title and the album/publisher info */
}

.song-key {
    background-color: #d6b378; /* Light gold background */
    color: #fff; /* White text color */
    font-size: 0.8rem; /* Slightly smaller text */
    font-weight: bold; /* Bold text */
    padding: 0.2rem 0.4rem; /* Padding for better spacing */
    border-radius: 4px; /* Rounded corners */
    margin-right: 5px; /* Space between the album and the key */
    vertical-align: middle; /* Align with the text */
    white-space: nowrap; /* Prevents the key from wrapping to the next line */
}

.song-info h3 {
    display: flex;
    align-items: center; /* Aligns the key with the title */
}

.detail-resource-links {
	text-align: center; /* Center the buttons */
	margin-top: 20px; /* Add space above the buttons */
	margin-bottom: 20px; /* Add space below the buttons */
}


/* Pagination */
.home-pagination {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.page-item {
    margin: 0 2px;
}

.page-link {
    display: block;
    padding: 8px 12px;
    color: #3a3a3a;
    background-color: #d0d0d0;
    border: 1px solid #adadad;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.page-link:hover {
    color: #111111;
    background-color: #adadad;
    border-color: #8e8e8e;
}

.page-item.disabled .page-link {
    color: #656565;
    pointer-events: none;
    background-color: #e5e5e5;
    border-color: #d0d0d0;
    opacity: 0.5;  /* Reduce opacity to indicate disabled state */
}

.page-item.active .page-link {
    color: #fff;
    background-color: #515151;
    border-color: #515151;
}

/* Style for the current page / total pages indicator */
.page-item.disabled .page-link:not([aria-label]) {
    background-color: #656565;
    color: #fff;
    border-color: #656565;
    font-weight: bold;
    opacity: 0.9;  /* Keep full opacity for the page indicator */
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .page-link {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    /* Hide text on small screens, show only symbols */
    .page-link[aria-label="First"],
    .page-link[aria-label="Last"] {
        font-size: 0;
    }
    
    .page-link[aria-label="First"]::after {
        content: "«";
        font-size: 0.9rem;
    }
    
    .page-link[aria-label="Last"]::after {
        content: "»";
        font-size: 0.9rem;
    }
}

/* Form container */
.form-container {
    background-color: #f7f7f7;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Form Title */
.form-container h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

/* Form labels */
.form-container label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    color: #333;
}

/* Required Asterisk */
.form-container label.required::after {
    content: " *";
    color: red;
}

/* Form inputs */
.form-container input[type="text"],
.form-container input[type="url"],
.form-container input[type="file"],
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    color: #333;
}

/* Textarea */
.form-container textarea {
    resize: vertical;
}

/* New Song Submit Button */
.form-container .btn {
    width: 100%;
    min-width: 120px; 
    padding: 10px 15px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center; 
}

.form-container .btn:hover {
    background-color: #218838;
}

/* Disabled New Song Submit Button */
.form-container .btn-disabled {
    background-color: #6c757d; /* Grey background */
    cursor: not-allowed; /* Change cursor to indicate it's disabled */
    color: #fff; /* Keep text color white */
    opacity: 0.65; /* Reduce opacity to indicate the disabled state */
    min-width: 120px;
}

.form-container .btn-disabled:hover {
    background-color: #6c757d; /* Prevent hover effects */
}

/* Style the file input */
.form-container input[type="file"] {
    font-size: 1rem;
}

/* Responsive Styling */
@media (max-width: 600px) {
    .form-container {
        padding: 20px;
    }

    .form-container h2 {
        font-size: 1.5rem;
    }
}

/* Popup Model */
/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Adjustments for mobile screens */
@media (max-width: 600px) {
    .modal-content {
        width: 90%;  /* Increase the width to take up more of the screen */
        padding: 15px;  /* Reduce padding to make more room for content */
    }

    .modal-buttons button {
        width: 100%;  /* Make buttons full width on mobile */
        margin-top: 10px;  /* Add space between buttons */
        padding: 10px;  /* Increase button padding for easier tapping */
    }
}

/* Close Button */
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* OK Button */
.modal-ok-btn {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    margin-top: 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.modal-ok-btn:hover {
    background-color: #218838;
}

/* Modal Buttons */
.modal-buttons {
    margin-top: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.modal-buttons button:first-child {
    background-color: #dc3545;
    color: #fff;
}

.modal-buttons button:last-child {
    background-color: #6c757d;
    color: #fff;
}

/* Song detail page */
/* General container styling */
.song-details-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

.song-details-container form {
    display: flex;
    flex-direction: column;
}

.song-details-container form label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    text-align: left;
}

/* Align buttons in a row */
.song-details-container .form-buttons {
    display: flex;
    justify-content: flex-start; /* Align buttons to the left */
    gap: 10px; /* Space between buttons */
}

/* Individual button styles */
.song-details-container .form-buttons button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.song-details-container .form-buttons button.save-btn {
    background-color: #28a745;
    color: white;
    min-width: 120px; 
}

.song-details-container .form-buttons button.save-btn:hover {
    background-color: #218838;
}

.song-details-container .form-buttons button.save-btn.uploading {
    background-color: #cccccc;
    cursor: not-allowed;
}

.song-details-container .form-buttons button.cancel-btn {
    background-color: #adb5bd;
    color: white;
}

.song-details-container .form-buttons button.cancel-btn:hover {
    background-color: #6c757d;
}

/* Optional: Style file inputs for better appearance */
.song-details-container input[type="file"] {
    cursor: pointer;
}

/* Margin adjustments */
.song-details-container p {
    margin-bottom: 20px;
}

/* Modification form */
.song-details-container form input[type="text"],
.song-details-container form textarea,
.song-details-container form input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.song-details-container label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

#edit-btn {
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    background-color: #f32843;
    color: rgb(63, 56, 56);
    border: none;
    margin-bottom: 15px;
}

#edit-btn:hover {
    opacity: 0.9;
}

/* Song title styling */
.song-title {
    font-size: 2.6em;
    margin-bottom: 5px;
    color: #333;
}

/* Lyrics box styling */
.lyrics-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-left: 5px solid #d6b378; /* Accent color */
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
	margin-bottom: 20px;
    font-family: 'Courier New', monospace; /* Monospace font for lyrics */
    text-align: center;
    font-size: 1.3em;
    line-height: 1.4;
}

.lyrics-box pre {
    white-space: pre-wrap; /* Wrap text within the box */
    word-wrap: break-word; /* Prevent long words from overflowing */
    margin: 0;
}

/* YouTube video container */
.video-container {
	margin-top: 40px;
	margin-bottom: 20px;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

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

/* PDF embed */
.pdf-container {
    margin-top: 20px;
	margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Resource buttons */
.song-list-resource-links {
    text-align: left;
    margin-top: 10px;
}

.resource-btn-detail {
    display: inline-block;
	margin-left: 5px;
    margin-right: 5px;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.resource-btn-home {
    display: inline-block;
    margin-right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.resource-btn-home:hover,
.resource-btn-detail:hover {
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.pdf-btn {
    background-color: #d9534f; /* Red for PDF */
}

.ppt-btn {
    background-color: #5bc0de; /* Blue for PPT */
}

.key-btn {
    background-color: #f0ad4e; /* Orange for Keynote */
}


/* Roster container */
.roster-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
}

.roster-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #333;
}

/* Style the iframe container */
.iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
}

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

/* Sorting Dropdown */
.song-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sorting-controls {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 0.7rem;
}

.sorting-controls label {
    margin-right: 1rem; /* Increase margin to give more space between label and dropdown */
    font-weight: bold;
    color: #333;
    font-size: 1rem; /* Match the font size of the dropdown */
    line-height: 1.5rem; /* Vertically center the label */
    white-space: nowrap; /* Prevent text from wrapping */
}

.sorting-controls select {
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    line-height: 1.5rem; /* Match line height for better alignment with label */
}



/* Song navigation buttons */
.song-header {
    display: grid;
    grid-template-columns: 100px 1fr 100px; /* Fixed width for buttons, flexible for title */
    align-items: center;
    margin-bottom: 20px;
}

.song-title {
    font-size: 2.2em;
    margin: 0;
    color: #333;
    text-align: center;
    grid-column: 2; /* Always in the middle column */
}

.nav-btn {
    padding: 8px 2px;
    background-color: #607D8B;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 0.8em;
    white-space: nowrap;
    width: 100px;
    line-height: 1;
}

.nav-btn:hover {
    background-color: #546E7A;
}

.nav-btn.next-btn {
    grid-column: 1; /* Left column */
    justify-self: start;
}

.nav-btn.prev-btn {
    grid-column: 3; /* Right column */
    justify-self: end;
}

.nav-btn.next-btn:hover {
    transform: translateX(-5px);
}

.nav-btn.prev-btn:hover {
    transform: translateX(5px);
}

.nav-btn i {
    margin: 0 5px;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .song-header {
        grid-template-columns: 80px 1fr 80px; /* Slightly smaller buttons on mobile */
    }

    .song-title {
        font-size: 1.8em; /* Smaller font size on mobile */
    }

    .nav-btn {
        width: 80px; /* Smaller button width on mobile */
        font-size: 0.7em; /* Smaller font size for buttons on mobile */
        padding: 6px 2px; /* Adjust padding for smaller buttons */
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .song-header {
        grid-template-columns: 70px 1fr 70px; /* Even smaller buttons on very small screens */
    }

    .song-title {
        font-size: 1.5em; /* Even smaller font size on very small screens */
    }

    .nav-btn {
        width: 70px; /* Even smaller button width on very small screens */
        font-size: 0.6em; /* Even smaller font size for buttons on very small screens */
        padding: 4px 2px; /* Further reduce padding */
    }
}

/* Site Footer */
.site-footer {
    background-color: #000000;
    padding: 2rem 0;
    color: #dae0f0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-section {
    flex: 1;
}

.logo-section {
    text-align: left;
    margin-left: 1rem;
}

.logo-section p {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    color: #ffffff;
}

.verse-section {
    text-align: center;
}

.verse-section h3 {
    font-size: 1.2rem;
    line-height: 1.5;
    color: #f0f0f0;
}

.footer-section.contact-section h3 {
    text-align: center;
    color: #ffffff;
    padding-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

.contact-section {
    text-align: center;
}

.social-icon {
    color: #dae0f0;
    font-size: 1.5rem;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #007bff;
}


@media (max-width: 800px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 1rem;
    }

    .logo-section, .contact-section {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .social-icon {
        margin: 0 0.5rem;
    }

    .verse-section h3 {
        font-size: 1rem;
    }
}

@media (max-width: 960px) {
    .verse-section h3 {
        font-size: 0.9rem;
    }

    .social-icon {
        margin: 0 0.3rem;
    }

    .footer-section.contact-section h3 {
        font-size: 0.9rem;
    }

    .logo-section p {
        font-size: 0.8rem;
    }
}
