/* General styles */
body {
    font-family: 'Georgia', serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
    background-color: #fdf7f2;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #f8e8d1;
    text-align: center;
    padding: 1em 0;
    border-bottom: 2px solid #d4a373;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    color: #5d4037;
}

main {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Input Section */
#input-section {
    margin-bottom: 30px;
}

#input-section label {
    display: block;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #6d4c41;
}

#user-input {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #d4a373;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s;
}

#user-input:focus {
    border-color: #a0522d;
    outline: none;
}

#suggestions {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #d4a373;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 95%;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#suggestions div {
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

#suggestions div:hover {
    background-color: #f8e8d1;
}

/* Controls Section */
#controls-section {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group {
    flex: 1;
    text-align: center;
    margin: 0 10px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #6d4c41;
}

.control-group input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #d4a373;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #5d4037;
    border-radius: 50%;
    cursor: pointer;
}

.control-group input[type="range"]:hover {
    background: #a0522d;
}

/* Poem Display Section */
#poem-display {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

#poem-display h2 {
    font-size: 1.8em;
    color: #5d4037;
    margin-bottom: 15px;
}

#poem-container {
    font-size: 1.2em;
    line-height: 1.8;
    white-space: pre-wrap;
    color: #4e342e;
}

/* Footer */
footer {
    text-align: center;
    background-color: #f8e8d1;
    padding: 10px 0;
    margin-top: 30px;
    border-top: 2px solid #d4a373;
    font-size: 0.9em;
    color: #6d4c41;
}

footer .heart {
    color: red;
}

/* Animations */
@keyframes highlight {
    0% {
        background-color: yellow;
        color: black;
    }
    100% {
        background-color: transparent;
        color: inherit;
    }
}

.highlight {
    animation: highlight 1.5s ease-in-out;
    display: inline-block;
    border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 15px;
    }

    #controls-section {
        flex-direction: column;
    }

    .control-group {
        margin-bottom: 20px;
    }

    .control-group:last-child {
        margin-bottom: 0;
    }
}