*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.generate-section {
    background-color: #2c2c2c;
    color: #fff;
    padding: 58px 60px 60px;
    text-align: center;
    margin-top: 14px;
    animation: fadeIn 1s ease-in-out;
}

.generate-section h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #ffa500;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    display: inline-block;
    animation: typewriter 3s steps(50) 0.5s forwards;
}

.generate-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #ccc;
    animation: fadeIn 1s ease-in-out;
}

.generate-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    animation: slideInFromBottom 1s ease-out;
}

.generate-form input {
    padding: 12px 20px;
    font-size: 1.1rem;
    border: 2px solid #fff;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    width: 320px;
    transition: all 0.3s ease;
}

.generate-form input:focus {
    outline: none;
    border-color: #ffa500;
    background-color: #444;
}

.generate-form button {
    padding: 12px 20px;
    font-size: 1.1rem;
    border: none;
    background-color: #ffa500;
    color: #000;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.generate-form button:hover {
    background-color: #e69500;
}

.generate-form button:active {
    transform: scale(0.98);
}

.loader-container {
    display: none;
    margin-top: 30px;
    text-align: center;
    width: 100%;
}

.loader {
    margin: 0 auto;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #ffa500;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideInFromBottom {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes typewriter {
    0% { width: 0; }
    100% { width: 100%; }
}

@media (max-width: 768px) {
    .generate-section {
        padding: 58px 15px 60px;
    }

    .generate-section h2 {
        font-size: 1.6rem;
        white-space: normal;
        overflow: visible;
        width: auto;
    }

    .generate-form {
        flex-direction: column;
        padding: 0 10px;
    }

    .generate-form input,
    .generate-form button {
        width: 100%;
    }

    .generate-form input:not(:last-child) {
        margin-bottom: 10px;
    }

    .loader {
        width: 40px;
        height: 40px;
    }
}
