.custom-message-container {
    margin-bottom: 1.5rem;
}

.custom-message-container input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    color: #333;
}

.custom-message-container input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.message-selector {
    margin-bottom: 1rem;
}

.message-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.message-selector select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    color: #333;
}

.message-selector select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
}

main {
    flex: 1;
}

footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.copyright {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #95a5a6;
}

.coffee-btn {
    display: inline-block;
    transition: transform 0.2s ease;
}

.coffee-btn:hover {
    transform: scale(1.05);
}

.coffee-btn img {
    height: 40px;
}

.prompt-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-align: center;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-align: left;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    min-height: 120px;
    margin-bottom: 1rem;
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.primary-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: inline-block;
    margin: 0 auto;
}

.primary-btn:hover {
    background-color: #2980b9;
}

.result-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-container h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.link-container {
    display: flex;
    margin-bottom: 1rem;
}

.link-container input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.secondary-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.secondary-btn:hover {
    background-color: #27ae60;
}

.hint {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 1rem;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

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

.error-message {
    background-color: #fde8e8;
    color: #e53e3e;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 1rem;
}

.animation-page main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.animation-container {
    width: 100%;
    max-width: 600px;
}

.chat-interface {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.chat-header {
    background-color: #f1f5f9;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.chat-logo {
    font-weight: 600;
    color: #334155;
}

.chat-messages {
    padding: 1rem;
    min-height: 200px;
}

.message {
    margin-bottom: 1rem;
    display: flex;
}

.message.assistant {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    max-width: 80%;
}

.assistant .message-content {
    background-color: #f1f5f9;
    color: #334155;
}

.user .message-content {
    background-color: #3498db;
    color: white;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

.chat-input-container {
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 0.8rem 1.2rem;
    position: relative;
}

.typing-area {
    min-height: 24px;
    word-break: break-word;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 20px;
    background-color: #333;
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.completion-message {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.completion-message h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.4rem;
}

.completion-message .primary-btn {
    margin-bottom: 0.5rem;
    display: inline-block;
}

.countdown-container {
    margin-top: 1rem;
    text-align: center;
    clear: both;
}

.redirect-countdown {
    margin: 0 auto;
    font-size: 0.9rem;
    color: #e74c3c;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: #fdf2f2;
    border: 1px solid #fad7d7;
    display: inline-block;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .prompt-form,
    .result-container,
    .completion-message {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .link-container {
        flex-direction: column;
    }

    .link-container input {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }

    .secondary-btn {
        border-radius: 4px;
        width: 100%;
    }
}