.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    flex-shrink: 0;
    transition: filter 0.2s, transform 0.2s;
    position: relative;
}

.copy-btn:hover {
    filter: brightness(1.3);
    transform: scale(1.1);
}

.copy-btn img {
    width: 100%;
    height: 100%;
    filter: brightness(0) opacity(0.45);
    transition: opacity 0.2s, transform 0.3s;
}

.copy-btn:hover img {
    filter: brightness(0) opacity(0.75);
}

.copy-btn.copied {
    animation: copyBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.copy-btn.copied img {
    opacity: 0;
    transform: scale(0) rotate(90deg);
}

.copy-btn .checkmark {
    position: absolute;
    width: 1rem;
    height: 1rem;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.copy-btn.copied .checkmark {
    opacity: 1;
    transform: scale(1);
}

.copy-btn .checkmark path {
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
}

.copy-btn.copied .checkmark path {
    animation: drawCheck 0.4s 0.1s ease forwards;
}

.copy-ripple {
    position: absolute;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.4;
    transform: scale(0);
    pointer-events: none;
    animation: rippleOut 0.6s ease-out forwards;
}

@keyframes copyBounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(0.9);
    }

    70% {
        transform: scale(1.1);
    }

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

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes rippleOut {
    0% {
        transform: scale(0);
        opacity: 0.4;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.copy-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    animation: particleBurst 0.6s ease-out forwards;
}

@keyframes particleBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}