.mock-editor-window {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    height: 450px;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.mock-topbar {
    height: 40px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}
.mock-logo {
    display: flex;
    align-items: center;
}
.mock-toolbar {
    display: flex;
    gap: 10px;
    color: #495057;
}
.mock-toolbar-icon {
    width: 20px;
    height: 20px;
    background: #e9ecef;
    border-radius: 3px;
}
.mock-editor-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.mock-canvas {
    flex: 1;
    background: #d1d5db;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.certificate-template {
    background: #fff;
    width: 100%;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    border: 20px solid #003399;
    display: flex;
    flex-direction: column;
    padding: 30px;
}
.cert-title {
    font-size: 28px;
    font-weight: bold;
    color: #003399;
    margin-bottom: 15px;
    line-height: 1.2;
}
.cert-text {
    font-size: 10px;
    color: #495057;
    margin-bottom: 5px;
}
.cert-name {
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px dashed #adb5bd;
    padding-bottom: 5px;
    margin-bottom: 15px;
    display: inline-block;
}
.cert-qr {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #e9ecef;
    border: 1px dashed #adb5bd;
}
.mock-sidebar {
    width: 180px;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}
.mock-sidebar-header {
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}
.mock-sidebar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px;
}
.draggable-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    cursor: grab;
    transition: border-color 0.2s;
}
.draggable-item:hover {
    border-color: #003399;
}
.item-icon {
    font-size: 24px;
    margin-bottom: 5px;
    color: #495057;
}
.item-label {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
}
.mock-cursor {
    position: absolute;
    width: 28px;
    height: 28px;
    z-index: 100;
    animation: dragAndDrop 10s infinite cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transform-origin: top left;
}
.animated-badge {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    opacity: 0;
    animation: dropBadge 10s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
.animated-name {
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px dashed #adb5bd;
    padding-bottom: 5px;
    margin-bottom: 15px;
    display: inline-block;
    opacity: 0;
    animation: dropName 10s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
.cert-name-placeholder {
    height: 30px;
    width: 200px;
    border-bottom: 1px dashed #adb5bd;
    margin-bottom: 15px;
    display: inline-block;
    animation: hidePlaceholder 10s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dragAndDrop {
    0% { top: 90%; left: 90%; transform: scale(1); }
    
    /* Drag Badge */
    5% { top: 195px; left: 670px; transform: scale(1); } /* Move to Badges icon */
    8% { top: 195px; left: 670px; transform: scale(0.85); } /* Click down */
    12% { top: 195px; left: 670px; transform: scale(0.85); } /* Hold click */
    25% { top: 120px; left: 450px; transform: scale(0.85); } /* Drag to canvas */
    28% { top: 120px; left: 450px; transform: scale(1); } /* Release click */
    
    /* Move to Participant Name */
    40% { top: 350px; left: 670px; transform: scale(1); } /* Move to Participant Name icon */
    43% { top: 350px; left: 670px; transform: scale(0.85); } /* Click down */
    47% { top: 350px; left: 670px; transform: scale(0.85); } /* Hold click */
    60% { top: 220px; left: 250px; transform: scale(0.85); } /* Drag to canvas */
    63% { top: 220px; left: 250px; transform: scale(1); } /* Release click */
    
    80% { top: 90%; left: 90%; transform: scale(1); } /* Move away */
    100% { top: 90%; left: 90%; transform: scale(1); }
}

@keyframes dropBadge {
    0%, 27% { opacity: 0; transform: scale(1.2); }
    28% { opacity: 1; transform: scale(1); }
    95% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes dropName {
    0%, 62% { opacity: 0; transform: scale(1.1); }
    63% { opacity: 1; transform: scale(1); }
    95% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes hidePlaceholder {
    0%, 62% { opacity: 1; }
    63%, 100% { opacity: 0; display: none; }
}

@media (max-width: 768px) {
    .mock-editor-window { 
        height: 450px; 
        flex-direction: column;
    }
    .mock-editor-body {
        flex-direction: column;
    }
    .mock-canvas {
        padding: 10px;
    }
    .certificate-template {
        padding: 15px;
        border-width: 10px;
    }
    .cert-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    .cert-text {
        font-size: 8px;
    }
    .cert-name-placeholder {
        width: 150px;
        height: 20px;
        margin-bottom: 10px;
    }
    .animated-name {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .cert-qr {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }
    .animated-badge {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
    .mock-sidebar { 
        width: 100%;
        height: auto;
        min-height: 100px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        display: flex;
        flex-direction: column;
        overflow-x: visible;
        padding: 10px;
    }
    .mock-sidebar-header { display: none; }
    .mock-sidebar-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        gap: 5px;
        margin-bottom: 5px;
    }
    .draggable-item {
        min-width: 60px;
        padding: 5px;
    }
    .item-icon {
        font-size: 16px;
    }
    .item-label {
        font-size: 8px;
    }
    
    /* Mobile Animation Keyframes */
    @keyframes dragAndDrop {
        0% { top: 90%; left: 80%; transform: scale(1); }
        
        /* Drag Badge */
        5% { top: 360px; left: 70%; transform: scale(1); } /* Move to Badges icon (mobile) */
        8% { top: 360px; left: 70%; transform: scale(0.85); } /* Click down */
        12% { top: 360px; left: 70%; transform: scale(0.85); } /* Hold click */
        25% { top: 60px; left: 85%; transform: scale(0.85); } /* Drag to canvas */
        28% { top: 60px; left: 85%; transform: scale(1); } /* Release click */
        
        /* Move to Participant Name */
        40% { top: 400px; left: 40%; transform: scale(1); } /* Move to Participant Name icon (mobile) */
        43% { top: 400px; left: 40%; transform: scale(0.85); } /* Click down */
        47% { top: 400px; left: 40%; transform: scale(0.85); } /* Hold click */
        60% { top: 150px; left: 50%; transform: scale(0.85); } /* Drag to canvas */
        63% { top: 150px; left: 50%; transform: scale(1); } /* Release click */
        
        80% { top: 90%; left: 80%; transform: scale(1); } /* Move away */
        100% { top: 90%; left: 80%; transform: scale(1); }
    }
}