/* rabbit3.css */
.chat-bubble-user {
    background-color: #e0f7fa;
    /* 例: 薄い青 */
    text-align: right;
}

.chat-bubble-bot {
    background-color: #fff9c4;
    /* 例: 薄い黄色 */
    text-align: left;
}

@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(-5%);
    }

    50% {
        transform: translateY(5%);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s infinite ease-in-out;
}

@keyframes jelly {

    0%,
    100% {
        transform: scale(1, 1);
    }

    25% {
        transform: scale(0.9, 1.1);
    }

    50% {
        transform: scale(1.1, 0.9);
    }

    75% {
        transform: scale(0.95, 1.05);
    }
}

.animate-jelly {
    animation: jelly 0.5s ease-in-out;
}

@keyframes hop {

    0%,
    100% {
        transform: translateY(0) scale(1, 1);
    }

    30% {
        transform: translateY(-40%) scale(1.1, 0.9);
    }

    50% {
        transform: translateY(0) scale(0.95, 1.05);
    }

    70% {
        transform: translateY(-20%) scale(1.05, 0.95);
    }
}

.animate-hop {
    animation: hop 0.6s ease-in-out;
}

.animate-hop-loop {
    animation: hop 0.8s ease-in-out infinite;
}

/* Amazon Link Button Style */
.prose a[href*="amazon.co.jp"] {
    display: inline-block;
    background-color: #FF9900;
    /* Amazon Orange */
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.875rem;
    font-size: 0.875rem;
    margin-top: 0;
    /* Remove top margin per user request */
    transition: background-color 0.2s;
}

.prose a[href*="amazon.co.jp"]:hover {
    background-color: #e68a00;
}

/* Book Cover Image */
.prose img {
    max-width: 120px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 0.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Markdown Styles */
.prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.5em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose strong {
    color: #1d4ed8;
    /* blue-700 */
    font-weight: 700;
}

.prose em {
    color: #d97706;
    /* amber-600 */
    font-style: italic;
}

/* Thinking Animation */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

/* Typing Indicator */
.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #9ca3af;
    /* gray-400 */
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
    margin: 0 2px;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Spacing for Book Items */
.prose p {
    margin-bottom: 0.75em;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* Amazon Button Spacing */
.prose a[href*="amazon.co.jp"] {
    margin-bottom: 1.5rem;
    /* Increase bottom margin */
    display: inline-block;
}

/* Book Placeholder (No Cover) */
.book-placeholder {
    width: 120px;
    height: 170px;
    background-color: #fff8e1;
    /* amber-50: 本っぽい温かみのある色 */
    border: 2px solid #d97706;
    /* amber-600: 表紙の枠線っぽく */
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.1);
    /* 少し立体的に */
    color: #78350f;
    /* amber-900: 文字色も馴染むように */
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    overflow: hidden;
    word-break: break-word;
    cursor: pointer;
    transition: transform 0.1s;
    /* 本の背表紙のようなラインを入れる装飾 */
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 5px, transparent 5px);
}

.book-placeholder:hover {
    transform: scale(1.02);
    border-color: #b45309;
    /* amber-700 */
}