/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

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

/* 表单相关样式 */
.input-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

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

input[type="text"],
input[type="url"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="url"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    min-height: 200px;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* 按钮样式 */
button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.back-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.regenerate-btn {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.regenerate-btn:hover {
    background-color: #e67e22;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.copy-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

/* 复制按钮容器样式 */
.copy-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 为index.html保持原有的绝对定位样式 */
.result-section .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    margin-top: 0;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 内容区域样式 */
.article-section {
    background: white;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.history-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.result-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.article-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.article-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
    text-decoration: none;
    display: block;
}

.article-title:hover {
    color: #3498db;
}

.article-meta {
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* 标签页样式 */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    color: #555;
    border-bottom: 2px solid transparent;
    margin-right: 0;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.content-area {
    position: relative;
    width: 100%;
    display: block;
}

.content {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-height: 200px;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 15px;
}

/* 历史记录列表样式 */
.article-list {
    list-style: none;
}

.article-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.article-item:hover {
    background-color: #f9f9f9;
}

.article-item:last-child {
    border-bottom: none;
}

/* 进度状态样式 */
.progress {
    padding: 2px 8px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
}

.progress.pending {
    background-color: #f1c40f;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
}

.progress.processing {
    background-color: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
}

.progress.completed {
    background-color: transparent;
    color: #2ecc71;
    font-weight: 600;
}

.progress.failed {
    background-color: transparent;
    color: #e74c3c;
    font-weight: 600;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #95a5a6;
}

/* 加载和消息样式 */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #3498db;
}

.loading.active {
    display: block;
}

.error {
    color: #e74c3c;
    margin-top: 10px;
}

.notification {
    display: none;
    background-color: #2ecc71;
    color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }

    .input-section {
        padding: 15px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    button {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .regenerate-btn {
        margin-left: 0;
        margin-top: 10px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
