body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 20px;
    background-color: #f4f4f4;
}

h1, h2 {
    text-align: center;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.file-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

#fileName {
    font-style: italic;
    color: #555;
    margin-top: 5px;
}

#editor {
    margin-top: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Left side wider for text fields */
    gap: 30px; /* Space between columns */
}

.form-left label,
.form-right label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-left input[type="text"],
.form-left input[type="number"],
.form-left textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

.form-left textarea {
    resize: vertical; /* Allow vertical resizing */
}

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

#coverArtPreview {
    max-width: 100%; /* Make image responsive within its container */
    max-height: 250px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    display: block; /* Center image if needed */
    margin-left: auto;
    margin-right: auto;
    object-fit: contain; /* Scale the image while preserving aspect ratio */
}

/* Hide default file inputs visually but keep accessible */
input[type="file"] {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    white-space: nowrap;
    width: 1px;
}

/* Style the custom labels to look like buttons */
.file-label,
#removeCoverBtn,
#saveBtn {
    display: inline-block;
    padding: 10px 15px;
    margin: 10px 5px 10px 0;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    font-size: 1em; /* Consistent font size */
}

.file-label:focus-within,
.file-label:hover,
#removeCoverBtn:hover,
#saveBtn:hover {
    opacity: 0.9;
}

#removeCoverBtn {
    background-color: #dc3545; /* Red for remove */
}
#removeCoverBtn:hover {
    background-color: #c82333;
}
#removeCoverBtn:disabled {
     background-color: #f8d7da;
     cursor: not-allowed;
     opacity: 0.6;
}


#saveBtn {
    background-color: #28a745; /* Green for save */
    display: block; /* Make save button full width */
    width: 100%;
    margin-top: 20px;
    font-size: 1.1em;
}
#saveBtn:hover {
    background-color: #218838;
}
#saveBtn:disabled {
    background-color: #a7d7ae;
    cursor: not-allowed;
    opacity: 0.6;
}


#status {
    margin-top: 20px;
    padding: 10px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    word-wrap: break-word; /* Prevent long messages from overflowing */
}

.hidden {
    display: none;
}