/* Enhanced Puzzle Verification - Clean Shape Design */

.puzzle-verification {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.puzzle-header {
    text-align: center;
    margin-bottom: 32px;
}

.puzzle-title {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.puzzle-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.puzzle-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 24px;
    transition: all 0.5s ease;
}

.puzzle-container.hidden {
    opacity: 0;
    transform: translateY(-20px);
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Drop Zones - Randomized Grid */
.drop-zones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
    min-height: 120px;
}

.drop-zone {
    width: 90px;
    height: 90px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    background: #f9fafb;
    cursor: pointer;
}

.drop-zone:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.drop-zone.circle-zone {
    border-color: #3b82f6;
    background: #eff6ff;
}

.drop-zone.square-zone {
    border-color: #ef4444;
    background: #fef2f2;
}

.drop-zone.triangle-zone {
    border-color: #10b981;
    background: #f0fdf4;
}

.drop-zone-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-top: 8px;
    text-align: center;
}

.shape-outline {
    transition: opacity 0.3s ease;
    opacity: 0.6;
}

.circle-outline {
    width: 45px;
    height: 45px;
    border: 2px dashed #3b82f6;
    border-radius: 50%;
}

.square-outline {
    width: 45px;
    height: 45px;
    border: 2px dashed #ef4444;
    border-radius: 6px;
}

.triangle-outline {
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 38px dashed #10b981;
}

/* Draggable Shapes - Clean Design */
.draggable-shapes {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.draggable-shape {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.draggable-shape:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.draggable-shape.dragging {
    opacity: 0.8;
    transform: rotate(5deg) scale(1.15);
    cursor: grabbing;
    z-index: 1000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Clean Shape Backgrounds - Solid Colors */
.draggable-shape[data-shape="circle"] {
    background: #3b82f6;
}

.draggable-shape[data-shape="square"] {
    background: #ef4444;
}

.draggable-shape[data-shape="triangle"] {
    background: #10b981;
}

/* White Shape Icons Inside */
.draggable-shape[data-shape="circle"] .circle-shape {
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
}

.draggable-shape[data-shape="square"] .square-shape {
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 3px;
}

.draggable-shape[data-shape="triangle"] .triangle-shape {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid #ffffff;
}

/* Placed Shapes */
.placed-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: default;
    animation: placeShape 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.drop-zone.filled {
    border-style: solid;
    background: #ffffff;
    transform: scale(1.02);
}

.drop-zone.filled.circle-zone {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.drop-zone.filled.square-zone {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.drop-zone.filled.triangle-zone {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Drag States */
.drag-over {
    border-style: solid !important;
    transform: scale(1.08) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.drag-over.circle-zone {
    border-color: #3b82f6 !important;
    background: #dbeafe !important;
}

.drag-over.square-zone {
    border-color: #ef4444 !important;
    background: #fee2e2 !important;
}

.drag-over.triangle-zone {
    border-color: #10b981 !important;
    background: #dcfce7 !important;
}

/* Tooltips */
.tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #1f2937;
}

.draggable-shape:hover .tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -45px;
}

/* Bottom Section */
.puzzle-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.puzzle-instruction {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 0;
}

.puzzle-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.new-puzzle-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-puzzle-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.puzzle-status {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Success State - Replaces entire puzzle */
.success-message {
    background: linear-gradient(135deg, #dcfce7, #f0fdf4);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 24px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #166534;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    animation: successSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-icon {
    width: 28px;
    height: 28px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.success-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.success-title {
    font-size: 18px;
    font-weight: 700;
    color: #166534;
}

.success-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #166534;
    opacity: 0.8;
}

/* Animations */
@keyframes placeShape {
    0% { 
        transform: translate(-50%, -50%) scale(0.5) rotate(180deg); 
        opacity: 0; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
        opacity: 1; 
    }
}

@keyframes successSlideIn {
    0% { 
        transform: translateY(20px) scale(0.9); 
        opacity: 0; 
    }
    100% { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.shake {
    animation: shake 0.6s ease-in-out;
}

/* Responsive Design */
@media (max-width: 480px) {
    .puzzle-verification {
        padding: 24px 16px;
        margin: 16px;
    }
    
    .drop-zones {
        gap: 16px;
    }
    
    .drop-zone {
        width: 80px;
        height: 80px;
    }
    
    .draggable-shapes {
        gap: 16px;
    }
    
    .draggable-shape {
        width: 50px;
        height: 50px;
    }
}

