* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 200;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/notoserifsc/v22/H4c8BXePl9DZ0Xe7gG9cyOj7mm63SzZBEtERe7U.woff2) format('woff2');
    unicode-range: U+4E00-9FFF, U+3400-4DBF, U+F900-FAFF, U+3000-303F, U+FF00-FFEF;
}

/* GitHub Corner 样式 */
.github-corner:hover .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
    0%, 100% { transform: rotate(0); }
    20%, 60% { transform: rotate(-25deg); }
    40%, 80% { transform: rotate(10deg); }
}

/* 在小屏幕上反转动画效果，提高性能 */
@media (max-width: 500px) {
    .github-corner:hover .octo-arm {
        animation: none;
    }
    .github-corner .octo-arm {
        animation: octocat-wave 560ms ease-in-out;
    }
    /* 确保GitHub角在手机上的显示尺寸合适 */
    .github-corner svg {
        width: 60px;
        height: 60px;
    }
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.editor-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

@media (min-width: 768px) {
    .editor-container {
        flex-direction: row;
    }
}

.canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

#imageCanvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
}

.text-input, .text-properties, .position-controls, .buttons {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.text-info {
    margin-top: 10px;
    padding: 10px;
    background-color: #e9f7ef;
    border-radius: 5px;
    border-left: 4px solid #2ecc71;
}

.text-info p {
    font-size: 14px;
    color: #27ae60;
    margin-bottom: 5px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
}

.property {
    margin-bottom: 10px;
}

input[type="range"] {
    width: 80%;
    margin-right: 10px;
    vertical-align: middle;
}

input[type="color"] {
    width: 60px;
    height: 30px;
    border: none;
    border-radius: 5px;
    background: none;
    cursor: pointer;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.buttons {
    display: flex;
    justify-content: space-between;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#resetBtn {
    background-color: #e74c3c;
    color: white;
}

#downloadBtn {
    background-color: #2ecc71;
    color: white;
}

button:hover {
    opacity: 0.9;
}

span {
    font-size: 14px;
    color: #555;
} 