body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 700px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.controls {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.font-selector, .blending-mode-selector {
    margin-bottom: 15px;
}

.font-selector label, .blending-mode-selector > label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.blending-mode-selector div {
    margin-bottom: 3px;
}
.blending-mode-selector input[type="radio"] {
    margin-right: 5px;
    vertical-align: middle;
}
.blending-mode-selector label {
    font-weight: normal;
    color: #333;
    vertical-align: middle;
}


.density-selector {
    margin-bottom: 15px;
    margin-top: 5px;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    overflow: hidden;
}

.density-selector.hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
    border-bottom: none;
}


.density-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.density-selector input[type="range"] {
    width: calc(100% - 50px);
    margin-right: 10px;
    vertical-align: middle;
}

.density-selector span {
    display: inline-block;
    width: 35px;
    text-align: right;
    vertical-align: middle;
    font-weight: bold;
    color: #333;
}

select {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 16px;
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #2980b9;
}

.loading {
    text-align: center;
    margin-top: 10px;
    color: #555;
}

.error-message {
    text-align: center;
    margin-top: 10px;
    color: red;
    font-weight: bold;
}

.sample-area {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    min-height: 150px;
}

#sampleHeading {
    margin-top: 0;
    margin-bottom: 0.5em; 
    font-size: 2.5em; 
    word-wrap: break-word; 
}

#sampleParagraph {
    font-size: 1.1em; 
    word-wrap: break-word; 
}

#sampleHeading span, #sampleParagraph span {
    display: inline; 
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }
    #sampleHeading {
        font-size: 2em;
    }
    #sampleParagraph {
        font-size: 1em;
    }
}

.version-info {
    text-align: center;
    font-size: 0.8em;
    color: #777;
    margin-top: 20px;
}