body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: #f4f8fb;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

h1 {
    margin-bottom: 20px;
    color: #2d3e50;
}

form {
    margin-bottom: 24px;
}

input[type="text"] {
    width: 70%;
    padding: 10px;
    border: 1px solid #bcdff1;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 10px;
}

input::placeholder {
    font-style: italic;
    color: #8ca1b3;
}

.button {
    padding: 10px 24px;
    background: #4fa3e3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.button:hover {
    background: #357ab8;
}

.button:disabled {
    background: #a1c8ec;
    cursor: not-allowed;
}

.poem-box {
    margin: 30px auto;
    padding: 20px;
    max-width: 500px;
    min-height: 120px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: left;
    font-family: 'Georgia', serif;
    font-size: 1.1em;
    color: #333;
    position: relative;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.poem-box.visible {
    opacity: 1;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 4px solid #ccc;
    border-top-color: #4fa3e3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    margin-top: 30px;
    color: #8ca1b3;
    font-size: 0.95em;
}

@media (max-width: 480px) {
    input[type="text"] {
        width: 100%;
    }

    .button {
        width: 100%;
        margin-top: 10px;
    }

    .poem-box {
        font-size: 1em;
    }
}
