/* 基础样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
}

/* 动画效果 */
.field-item input,
.field-item textarea {
    transition: all 0.2s ease;
}

.field-item input:focus,
.field-item textarea:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
    border-color: #4f46e5;
}

#generateBtn,
#copyBtn {
    transition: all 0.2s ease;
}

#generateBtn:hover,
#copyBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#generateBtn:active,
#copyBtn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 预览区域滚动条样式 */
#previewArea::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#previewArea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#previewArea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#previewArea::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 代码区域样式 */
#htmlOutput {
    line-height: 1.5;
    resize: none;
}

#htmlOutput::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#htmlOutput::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#htmlOutput::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#htmlOutput::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 复制成功提示 */
.copy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4f46e5;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.copy-toast.show {
    opacity: 1;
}

/* 从markdown文件夹中引入的样式 */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .editor-shadow {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    .transition-custom {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .markdown-preview h1 {
        font-size: 1.75rem;
        font-weight: bold;
        margin-bottom: 1rem;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 0.5rem;
    }
    .markdown-preview h2 {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 0.75rem;
        margin-top: 1.5rem;
    }
    .markdown-preview p {
        margin-bottom: 1rem;
        line-height: 1.75;
    }
    .markdown-preview a {
        color: #165DFF;
        text-decoration: underline;
    }
    .markdown-preview ul, .markdown-preview ol {
        margin-bottom: 1rem;
        padding-left: 1.5rem;
    }
    .markdown-preview ul {
        list-style-type: disc;
    }
    .markdown-preview ol {
        list-style-type: decimal;
    }
    .markdown-preview li {
        margin-bottom: 0.5rem;
    }
    .markdown-preview blockquote {
        border-left: 4px solid #e5e7eb;
        padding-left: 1rem;
        margin-left: 0;
        margin-bottom: 1rem;
        color: #6b7280;
    }
    .markdown-preview code {
        font-family: Consolas, monospace;
        background-color: #f3f4f6;
        padding: 0.125rem 0.25rem;
        border-radius: 0.25rem;
        font-size: 0.9rem;
    }
    .markdown-preview pre {
        background-color: #f3f4f6;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        overflow-x: auto;
    }
    .markdown-preview img {
        max-width: 100%;
        height: auto;
        margin: 1rem 0;
        border-radius: 0.25rem;
    }
    .image-preview {
        width: 100%;
        height: auto;
        margin-top: 0.5rem;
        border-radius: 0.25rem;
    }
    .hljs-center {
        text-align: center;
    }
}