/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 0;
}

/* 导航栏样式 */
.main-nav {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    margin-bottom: 20px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.nav-container {
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.description {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* 表单部分 */
.form-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.5rem;
    padding-bottom: 5px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

input[type="file"] {
    padding: 10px 0;
}

input:focus,
textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

textarea {
    resize: vertical;
}

/* 日期输入样式 */
.date-inputs {
    display: flex;
    gap: 10px;
}

.date-inputs select {
    flex: 1;
    min-width: 0;
}

/* 预览区域 */
.preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    min-height: 50px;
}

.preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 5px;
    object-fit: contain;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
}

/* 照片上传项样式 */
.photo-upload-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.photo-upload-item:last-child {
    margin-bottom: 10px;
}

.photo-description {
    margin-top: 10px;
    width: 100%;
    min-height: 60px;
}

.add-photo-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 0.9rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 15px;
}

.add-photo-btn:hover {
    background-color: #219653;
}

.remove-photo-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 5px;
}

.remove-photo-btn:hover {
    background-color: #c0392b;
}

/* 按钮样式 */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* 结果区域 */
#resultSection {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed #ddd;
}

#resultSection h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.hidden {
    display: none;
}

/* 标签页 */
.tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    background-color: #f8f8f8;
    color: #555;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    padding: 10px 20px;
    margin-right: 5px;
    cursor: pointer;
}

.tab-btn.active {
    background-color: #fff;
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

.tab-content {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 结果内容 */
pre {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

#htmlPreview {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #fff;
}

.copy-btn, .download-btn {
    background-color: #2ecc71;
    margin-right: 10px;
    padding: 8px 15px;
    font-size: 0.9rem;
}

.copy-btn:hover, .download-btn:hover {
    background-color: #27ae60;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .form-section h2 {
        font-size: 1.3rem;
    }
    
    button {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .preview img {
        max-width: 100px;
        max-height: 100px;
    }
}

/* 网站底部样式 */
.site-footer {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-content a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: white;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 15px 0;
    }
    
    .footer-content p {
        font-size: 0.8rem;
    }
}

/* 发布状态标签样式 */
.publish-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
    text-align: center;
    min-width: 60px;
}

.publish-status.published {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.publish-status.unpublished {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.publish-status.unknown {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}