body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
}

/* Custom scrollbar for textareas */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* --- Custom Tooltip Styles --- */
[data-tooltip] {
    position: relative;
    cursor: help; /* Give a hint that it's interactive */
}

/* The Tooltip Bubble */
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111827; /* Dark gray/black */
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    text-align: center;
    z-index: 9999; /* Maximized to ensure visibility */
    margin-bottom: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    pointer-events: none;
    animation: tooltipFade 0.2s ease-out forwards;
}

/* The Little Triangle Arrow */
[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
    margin-bottom: -4px;
    z-index: 9999; /* Matches bubble z-index */
    pointer-events: none;
    animation: tooltipFade 0.2s ease-out forwards;
}

@keyframes tooltipFade {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.flash-border-purple {
    animation: flash-border-purple 0.7s ease-out;
}

.flash-border-red {
    animation: flash-border-red 0.7s ease-out;
}

.flash-border-green {
    animation: flash-border-green 0.7s ease-out;
}

@keyframes flash-border-purple {
    0%, 100% {
        border-color: #e5e7eb; /* Default border color */
        box-shadow: none;
    }
    50% {
        border-color: #a855f7; /* Purple */
        box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.4);
    }
}

@keyframes flash-border-red {
    0%, 100% {
        border-color: #e5e7eb; /* Default border color */
        box-shadow: none;
    }
    50% {
        border-color: #ef4444; /* Red */
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4);
    }
}

@keyframes flash-border-green {
    0%, 100% {
        border-color: #e5e7eb; /* Default border color */
        box-shadow: none;
    }
    50% {
        border-color: #22c55e; /* Green */
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.4);
    }
}