@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body {
    font-family: 'Inter', sans-serif;
    background: #1a1a1a;
    color: #fff;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
}

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: fade-in-up 0.8s ease-out;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
    animation: fade-in-up 0.7s ease-out;
}

.logo-container img {
    max-width: 300px;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    animation: fade-in-up 0.9s ease-out;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    animation: fade-in-up 1s ease-out;
}

#topicInput {
    flex-grow: 1;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

#topicInput:focus {
    outline: none;
    border-color: rgba(35, 213, 171, 0.8);
    box-shadow: 0 0 0 4px rgba(35, 213, 171, 0.1);
}

#generateBtn {
    padding: 15px 25px;
    border-radius: 10px;
    border: none;
    background: #23d5ab;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#generateBtn:hover {
    background: #1fa88a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#generateBtn:active {
    transform: translateY(0);
    box-shadow: none;
}

#outputContainer {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 25px;
    min-height: 200px;
    white-space: pre-wrap;
    line-height: 1.6;
    margin-top: 20px;
    transition: opacity 0.5s ease;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #23d5ab;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
    margin: 40px auto;
}
