/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background-color: #fff;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 30px;
}

/* 标题样式 */
h1 {
    background-color: #ff4757;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 18px;
    font-weight: normal;
}

/* 输入区域样式 */
.input-section {
    padding: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px;
    border: none;
    background-color: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: #999;
}

textarea {
    height: 100px;
    resize: none;
}

/* 快捷输入按钮样式 */
.quick-inputs {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 6px 12px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background-color: #ff4757;
    color: white;
}

/* 生成按钮样式 */
.generate-btn {
    width: 100%;
    padding: 12px;
    background-color: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 20px;
}

.btn-icon {
    margin-right: 8px;
}

/* 生成中状态 */
.generating {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 生成结果区域样式 */
.result-section {
    margin: 20px 0;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.result-title {
    font-size: 16px;
    color: #333;
}

.generating-status {
    display: flex;
    align-items: center;
    color: #ff4757;
    font-size: 14px;
}

.status-icon {
    margin-right: 4px;
    animation: spin 1s linear infinite;
}

.result-content {
    position: relative;
}

.result-content img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.download-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 示例作品区域样式 */
.examples-section {
    margin-top: 30px;
    background-color: #fff;
    border-radius: 8px;
}

.examples-section h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.examples-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.examples-container::-webkit-scrollbar {
    display: none;
}

.example-item {
    flex: 0 0 auto;
    width: 160px;
    text-align: center;
}

.example-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.example-item p {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

/* 错误提示样式 */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    z-index: 1000;
}

.error-icon {
    font-size: 24px;
    margin-right: 8px;
}

.error-text {
    color: #333;
    font-size: 16px;
    display: block;
    margin: 10px 0;
}

.retry-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
