/* Elegant Dark Theme Chatbot Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(-45deg, #1a1a1a, #2d2d2d, #3a3a3a, #1f1f1f);
    background-size: 400% 400%;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    animation: gradientShift 15s ease infinite;
}

@media (max-width: 768px) {
    body {
        display: block;
        overflow: auto;
        background: #1a1a1a;
        animation: none;
    }
}

.chat-container {
    width: 90%;
    max-width: 600px;
    height: 80vh;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.chat-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    border-radius: 20px 20px 0 0;
    animation: pulse 2s ease-in-out infinite;
}

.chat-header h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.chat-header p {
    font-size: 0.9em;
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    animation: slideInUp 0.4s ease-out;
}

.message.user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.bot {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.typing {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.typing::after {
    content: '';
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.chat-input-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#userInput {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 1em;
    outline: none;
    transition: background 0.3s ease;
}

#userInput:focus {
    background: rgba(255, 255, 255, 0.2);
}

#sendButton {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#sendButton:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#sendButton:active {
    transform: scale(0.95);
}

#resetButton {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#resetButton:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.4);
}

#resetButton:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
        border: none;
        background: #1a1a1a;
        backdrop-filter: none;
    }
    .chat-header {
        border-radius: 0;
        animation: none;
    }
    .message {
        max-width: 85%;
        font-size: 0.9em;
    }
    .chat-input-container {
        padding: 15px;
    }
    #userInput {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    #sendButton, #resetButton {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .chat-container {
        width: 100%;
        height: 100vh;
    }
    .chat-header h1 {
        font-size: 1.4em;
    }
    .chat-header p {
        font-size: 0.8em;
    }
    .message {
        max-width: 90%;
        padding: 8px 12px;
        font-size: 0.8em;
    }
    .chat-input-container {
        padding: 8px;
        flex-direction: column;
        gap: 6px;
    }
    #userInput {
        padding: 10px 12px;
        font-size: 0.85em;
    }
    #sendButton, #resetButton {
        padding: 10px 16px;
        font-size: 0.85em;
        width: 100%;
    }
}
