﻿@font-face {
    font-family: 'ZhiMangXing Regular';
    src: url('./fonts/ZhiMangXing-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'ZhongQiLiuMaoCao';
    src: url('./fonts/ZhongQiLiuMaoCao.ttf') format('truetype');
}
@font-face {
    font-family: 'YiShuLianBi';
    src: url('./fonts/YiShuLianBi.ttf') format('truetype');
}
@font-face {
    font-family: 'YangRenDong ZhuShiTi';
    src: url('./fonts/YangRenDongZhuShiTi.ttf') format('truetype');
}

/* 重置与基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px;
}

/* 页头 */
header {
    text-align: center;
    margin-bottom: 40px;
}
header h1 {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
}
header p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* 主布局 */
main {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
.input-section {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}
.preview-section {
    flex: 2;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

/* 输入区域 */
#nameInput {
    width: 100%;
    padding: 18px;
    font-size: 1.3rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: border 0.3s;
}
#nameInput:focus {
    border-color: #3498db;
    outline: none;
}
#generateBtn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.3rem;
    cursor: pointer;
    margin-bottom: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}
#generateBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(52, 152, 219, 0.4);
}

/* 控制按钮 */
.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}
.controls button {
    padding: 16px;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}
.controls button:hover {
    background: #2c3e50;
}

/* 签名预览项 */
.signature-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s;
}
.signature-item:hover {
    transform: translateY(-5px);
}
.signature-item h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}
.signature-item canvas {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    margin-bottom: 15px;
}
.download-png {
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}
.download-png:hover {
    background: #c0392b;
}

/* 页脚 */
footer {
    margin-top: 50px;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 响应式调整 */
@media (max-width: 768px) {
    main { flex-direction: column; }
    .input-section, .preview-section { width: 100%; }
    .preview-section { grid-template-columns: 1fr; }
}