@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #1a365d 0%, #2563eb 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --message-user: #2563eb;
    --message-bot: rgba(255, 255, 255, 0.9);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f0f4f8;
    line-height: 1.5;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 24px 24px 0 0;
}

.card-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-content {
    height: 60vh;
    overflow-y: auto;
    padding: 24px;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 16px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-out;
    line-height: 1.5;
    white-space: pre-wrap;
}

.user-message {
    background: var(--message-user);
    color: white;
    margin-left: auto;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.assistant-message {
    background: var(--message-bot);
    color: #1a365d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-footer {
    padding: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 0 24px 24px;
}

.quick-replies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.quick-reply-button {
    background: white;
    color: #1a365d;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.quick-reply-button:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.input-group {
    display: flex;
    gap: 12px;
}

input {
    flex-grow: 1;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    padding: 16px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background: #2563eb;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

.suggested-questions {
    margin-top: 16px;
}

.suggested-questions p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 8px;
}

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

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .card {
        margin: 10px;
        max-width: 100%;
    }

    .quick-replies {
        grid-template-columns: 1fr;
    }

    .card-content {
        height: 50vh;
    }

    .message {
        max-width: 90%;
    }
}

