body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.chat-container {
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 80vh;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
}

.header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.2em;
}

.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.message.user {
    flex-direction: row-reverse;
}

.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin: 0 15px;
}

.message.ai .avatar {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.message.user .avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.message .text {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    max-width: 70%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
}

.message.user .text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.input-area {
    padding: 20px;
    border-top: 2px solid #e9ecef;
    display: flex;
    gap: 10px;
}

#message-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#message-input:focus {
    border-color: #4facfe;
}

button {
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

button:active {
    transform: translateY(0);
}

#clear-button {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

#clear-button:hover {
    box-shadow: 0 5px 15px rgba(255, 154, 158, 0.4);
}

@-webkit-keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(79, 172, 254, 0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(79, 172, 254, 0); }
}

.send-loading {
    animation: pulse 2s infinite;
}
