body {
    /* font-family: 'Inter', sans-serif; */
    background-color: #f8f9fa;
}

.editor-container {
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.toolbar {
    background-color: #ffffff;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* Consistent gap for all elements */
}

.toolbar-button {
    background-color: #f1f3f5;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
    /* Adjust font size for H1/H2/H3/P buttons */
}

.toolbar-button:hover,
.toolbar-button.active {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

/* Styles for select elements in toolbar */
.toolbar-select {
    height: 40px;
    /* Match button height */
    padding: 0.375rem 0.75rem;
    /* Match form-control padding */
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ced4da;
    background-color: #f1f3f5;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    min-width: 100px;
    /* Give enough space for font names */
    max-width: 150px;
    /* Max width to prevent too wide dropdowns */
}

.toolbar-select:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, .25);
    /* Bootstrap focus effect */
}

.toolbar-select:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, .25);
}

/* Styles for hidden color input */
.hidden-color-input {
    opacity: 0;
    width: 0;
    height: 0;
    padding: 0;
    border: none;
    position: absolute;
    /* Hide it off-screen */
    pointer-events: none;
    /* Make it unclickable directly */
}

#editor {
    background-color: #ffffff;
    min-height: 400px;
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
    overflow-y: auto;
}

/* Style for images inserted in the editor */
#editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.5rem 0;
}

#editor:focus {
    box-shadow: none;
}

#html-output-container {
    background-color: #212529;
    color: #f8f9fa;
    border-radius: 8px;
    margin-top: 1.5rem;
}

#html-output {
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
}

#copy-button {
    transition: all 0.2s ease;
}

.copy-success-message {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    display: none;
}

/* New styles for save message */
.save-message {
    /* Renamed for clarity, can be success or error */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0d6efd;
    /* Default blue for success */
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    display: none;
    z-index: 1000;
    white-space: nowrap;
    /* Prevent message from wrapping too much */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .toolbar {
        justify-content: center;
        /* Center buttons on smaller screens */
    }

    .toolbar-button,
    .toolbar-select {
        flex-grow: 1;
        /* Allow elements to grow and fill space */
        max-width: 80px;
        /* Limit max width for better wrapping */
    }
}