/* Base Animations and Custom Overrides */

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #374151; /* gray-700 */
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #4b5563; /* gray-600 */
}

/* Char Diffing Animations */
.hash-char {
    display: inline-block;
    transition: color 0.2s;
}

.hash-char.diff {
    color: #ef4444; /* text-red-500 */
    font-weight: bold;
    animation: popOut 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popOut {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Pulse Glow */
.glow-effect {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    transition: box-shadow 0.3s ease;
}

/* Drag and Drop Visuals */
.draggable-item {
    cursor: grab;
    transition: transform 0.1s, box-shadow 0.1s;
}
.draggable-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}
.draggable-item.dragging {
    opacity: 0.5;
}

.drop-zone {
    transition: background-color 0.2s, border-color 0.2s;
}
.drop-zone.drag-over {
    background-color: rgba(59, 130, 246, 0.1);
    border-style: dashed;
    border-color: #3b82f6;
}

.cracked-animation {
    animation: successPulse 1s ease-out;
}

@keyframes successPulse {
    0% { background-color: rgba(16, 185, 129, 0.5); }
    100% { background-color: transparent; }
}

/* Loader Animation for Mining */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin-anim {
    animation: spin 1s linear infinite;
}

/* Block Connection Lines (Desktop only) */
@media (min-width: 1024px) {
    .block-connector {
        position: absolute;
        width: 1.5rem; /* gap-6 is 1.5rem */
        height: 2px;
        background-color: #374151;
        right: -1.5rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 0;
        transition: background-color 0.3s, box-shadow 0.3s;
    }
    .block-connector.invalid {
        background-color: #ef4444;
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    }
    .block-connector.valid {
        background-color: #10b981;
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    }
}
