/* 签名生成器卡片样式 */
#signature-card {
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    animation: slideInUp 0.8s ease-out;
    box-shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 模式切换按钮 */
.mode-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    color: #4b5563;
    /* gray-600 */
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mode-btn.active {
    background-color: #ffffff;
    color: #d946ef;
    /* fuchsia-500 */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* 签名画布容器样式 */
#signature-container {
    width: 100%;
    max-width: 100%;
    min-height: 250px;
    background-color: #ffffff;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    position: relative;
    touch-action: none;
    cursor: crosshair;
}

/* 签名画布本身 */
#signature-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 提示文字 */
#signature-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.125rem;
    color: #9ca3af;
    pointer-events: none;
    transition: opacity 0.3s;
}

#signature-container.drawing #signature-tip,
#signature-container.has-text #signature-tip {
    opacity: 0;
}

/* 通用操作按钮 */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    /* py-3 px-6 */
    border: 1px solid transparent;
    font-size: 1rem;
    /* text-base */
    font-weight: 500;
    border-radius: 0.375rem;
    /* rounded-md */
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    /* shadow-sm */
    transition: all 0.2s ease-in-out;
    flex: 1;
}

@media (min-width: 640px) {
    .action-btn {
        flex: initial;
    }
}

.action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px;
    /* ring-2 ring-offset-2 */
}

.action-btn:hover {
    transform: scale(1.02);
}


/* 模态框样式 */
#image-preview-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#image-preview-modal.opacity-100 {
    opacity: 1;
}

#image-preview-modal .modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#image-preview-modal .modal-content.scale-100 {
    transform: scale(1);
    opacity: 1;
}

/* 下载按钮动画 */
.download-button:disabled {
    background-color: #f5d0fe;
    /* fuchsia-200 */
    cursor: not-allowed;
    color: #a21caf;
    /* fuchsia-700 */
}


/* Custom styles for range input thumb (紫红色 fuchsia) */
.range-slider-fuchsia::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #c026d3;
    /* fuchsia-600 */
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(192, 38, 211, 0.2);
    transition: background-color 0.15s ease;
}

.range-slider-fuchsia::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #c026d3;
    /* fuchsia-600 */
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 4px rgba(192, 38, 211, 0.2);
    transition: background-color 0.15s ease;
}

.hidden {
    display: none;
}

/* Disabled state for font weight slider */
#font-weight-container.disabled {
    opacity: 0.5;
    pointer-events: none;
}