/* Card Stack Base */
.card {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; 
    height: 100%;
    border-radius: 1rem;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    transform-origin: 50% 100%;
    /* Crucial: touch-action none allows JS to handle the drag */
    touch-action: none; 
    cursor: grab;
    border: 1px solid #333;
}

.card:active {
    cursor: grabbing;
}

/* Gradient overlay for text readability */
.card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    pointer-events: none;
}

.card-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 24px;
    z-index: 10;
    color: white;
    pointer-events: none;
}

/* Logic for "Flying away" animations */
.fly-left {
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    transform: translateX(-200%) rotate(-30deg) !important;
    opacity: 0;
}

.fly-right {
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    transform: translateX(200%) rotate(30deg) !important;
    opacity: 0;
}

.fly-super {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s;
    transform: translateY(-200%) scale(0.5) !important;
    opacity: 0;
}

/* When not dragging, we want smooth returns to center */
.is-animating {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Chat Bubbles */
.msg-user {
    align-self: flex-end;
    background: #db2777; /* pink-600 */
    color: white;
    border-radius: 18px 18px 0 18px;
    padding: 10px 16px;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.msg-dino {
    align-self: flex-start;
    background: #374151; /* gray-700 */
    color: #f3f4f6;
    border-radius: 18px 18px 18px 0;
    padding: 10px 16px;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.msg-system {
    align-self: center;
    background: transparent;
    color: #F500D6; /* Neon Magenta */
    border: 1px dashed #F500D6;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    margin: 10px 0;
    opacity: 0.8;
}