@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h1 {
    font-size: 1.5rem;
    font-weight: 500;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffd700;
    animation: pulse 2s infinite;
}

.status-indicator.active {
    background-color: #4caf50;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.welcome-message {
    text-align: center;
    margin-top: 40px;
}

.message {
    max-width: 80%;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease-out;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}

.bot-message .message-content {
    background-color: #e3f2fd;
    border-bottom-left-radius: 6px;
}

.user-message .message-content {
    background-color: #667eea;
    color: white;
    border-bottom-right-radius: 6px;
}

.start-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.input-container {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

#messageInput {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
}

#messageInput:focus {
    border-color: #667eea;
}

.send-button {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.send-button:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #e3f2fd;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    max-width: 80px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #999;
    animation: typing 1.4s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .chat-header {
        padding: 16px;
    }
    
    .chat-header h1 {
        font-size: 1.3rem;
    }
    
    .chat-container {
        padding: 16px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .input-container {
        padding: 16px;
    }
}

