/* General Body & Typography */
:root {
    --primary-color: #005A87; /* A deep blue, inspired by the logo on the example site */
    --secondary-color: #f4f4f4; /* Light grey background */
    --text-color: #333333;
    --header-text-color: #ffffff;
    --border-color: #dddddd;
    --error-color: #D8000C;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3 {
    margin-top: 0;
    line-height: 1.2;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

p {
    margin-top: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--header-text-color);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.back-link {
    display: block;
    color: var(--header-text-color);
    text-align: left;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.artist-name {
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 0;
}


/* Main Content & Layout */
main {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Loading Indicator */
#loading-indicator {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #888;
}

/* Song List Page */
#song-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#song-list li {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    border-radius: 5px;
}

#song-list li a {
    display: block;
    padding: 1rem 1.2rem;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
}

#song-list li a:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
}

#song-list .artist {
    display: block;
    font-size: 0.9rem;
    font-weight: normal;
    color: #666;
    margin-top: 4px;
}


/* Song Lyrics Page */
.lyrics {
    white-space: pre-wrap; /* Preserves line breaks and spaces */
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 5px;
    font-size: 1.1rem;
    line-height: 1.7;
    border: 1px solid var(--border-color);
}

/* Admin Page - Password Prompt */
#password-prompt-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 1rem;
}

#password-prompt {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}

/* Forms (Admin Page) */
input[type="text"],
input[type="password"],
input[type="number"],
textarea {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box; /* Important for padding and width */
}

textarea {
    resize: vertical;
}

label {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
}

input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}

button, .button {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #004a70; /* Darker shade of primary */
}

button[type="submit"] {
    margin-top: 10px;
}

.error-text {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Admin - Manage Song List */
#add-song-form-container {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.manage-song-item {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.manage-song-item h3 {
    margin-top: 0;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.button-group .delete-btn {
    background-color: #c0392b; /* Red for delete */
}
.button-group .delete-btn:hover {
    background-color: #a93226;
}

.button-group .save-btn {
    background-color: #27ae60; /* Green for save */
}
.button-group .save-btn:hover {
    background-color: #229954;
}

/* Song Page Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.nav-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s, color 0.2s;
}

.nav-btn:hover {
    background-color: var(--primary-color);
    color: var(--header-text-color);
    text-decoration: none;
}

/* Helper class to hide buttons initially */
.hidden {
    display: none;
}