/* ... (existing CSS) ... */

/* CAPTCHA Puzzle Styles */
.captcha-puzzle-group {
    grid-column: 1 / -1; /* Make it span full width in the form grid */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.captcha-puzzle-group label {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--accent-color);
}

.captcha-puzzle-area {
    position: relative;
    width: 250px; /* Fixed width for the puzzle area */
    height: 150px; /* Fixed height for the puzzle area */
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background-color: var(--card-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Ensure draggable stays within bounds visually */
}

.puzzle-draggable {
    position: absolute; /* Crucial */
    /* REMOVE any 'left' or 'top' properties here if they exist */
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    border-radius: 8px;
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, left 0.3s ease, top 0.3s ease;
    z-index: 10;
    touch-action: none;
}

.puzzle-draggable svg {
    width: 24px;
    height: 24px;
    color: white; /* Color of the SVG icon */
}

.puzzle-draggable.dragging {
    cursor: grabbing;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0.8;
}

.puzzle-target {
    position: absolute; /* Crucial */
    /* REMOVE any 'left' or 'top' properties here if they exist */
    width: 70px;
    height: 70px;
    border: 2px dashed #6c757d;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease, border-color 0.2s ease, left 0.3s ease, top 0.3s ease;
}

.puzzle-target.hovered {
    background-color: rgba(17, 55, 104, 0.2); /* Accent color hint when draggable is over */
    border-color: var(--accent-color);
}

.captcha-puzzle-area.solved .puzzle-target {
    background-color: #28a745; /* Green for solved */
    border-color: #28a745;
}

.captcha-puzzle-area.solved .puzzle-draggable {
    background-color: #28a745; /* Green for solved */
    cursor: default;
}

.captcha-puzzle-group .captcha-message {
    margin-top: 10px;
    font-size: 0.9em;
    color: #dc3545; /* Red for error */
}

.captcha-puzzle-group .captcha-message.success {
    color: #28a745; /* Green for success */
}

/* Responsive adjustments for captcha */
@media (max-width: 768px) {
    .captcha-puzzle-area {
        width: 90%; /* Make puzzle area responsive */
        max-width: 250px; /* Keep max width */
        height: 120px; /* Adjust height for smaller screens */
    }
    .puzzle-draggable {
        width: 45px; /* Slightly smaller draggable piece */
        height: 45px;
    }
    .puzzle-target {
        width: 60px; /* Slightly smaller target */
        height: 60px;
    }
}