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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.logo h2 {
    font-size: 18px;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: #fff;
}

.nav-item .icon {
    margin-right: 12px;
    font-size: 18px;
}

.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 0;
}

.page-header {
    background: white;
    padding: 20px 32px;
    border-bottom: 1px solid #e4e7ed;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #303133;
}

.page-content {
    padding: 24px 32px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    color: #606266;
    font-size: 14px;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.heat-score {
    font-size: 18px;
    font-weight: 700;
    color: #f56c6c;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fdf6ec;
    color: #e6a23c;
}

.status-confirmed {
    background: #ecf5ff;
    color: #409eff;
}

.status-processed {
    background: #f0f9ff;
    color: #00bcd4;
}

.status-published {
    background: #f0f9eb;
    color: #67c23a;
}

.status-passed {
    background: #f0f9eb;
    color: #67c23a;
}

.status-failed {
    background: #fef0f0;
    color: #f56c6c;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-meta {
    font-size: 13px;
    color: #909399;
}

.card-footer {
    padding: 12px 20px;
    background: #fafafa;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-success {
    background: #67c23a;
    color: white;
}

.btn-danger {
    background: #f56c6c;
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid #dcdfe6;
    color: #606266;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
}

.form-card, .result-card, .settings-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.form-card h3, .result-card h3, .settings-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #303133;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #606266;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.radio-group {
    display: flex;
    gap: 20px;
}

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

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #fafafa;
    font-weight: 600;
    color: #606266;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f5f7fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.empty {
    text-align: center;
    color: #909399;
    padding: 40px !important;
}

.text-muted {
    color: #909399;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: #303133;
}

.modal-close {
    font-size: 28px;
    color: #909399;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #303133;
}

.modal-body {
    padding: 24px;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.article-view h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #303133;
}

.article-meta {
    color: #909399;
    font-size: 14px;
    margin-bottom: 16px;
}

.article-section {
    margin-bottom: 20px;
}

.article-section label {
    display: block;
    font-weight: 600;
    color: #606266;
    margin-bottom: 8px;
    font-size: 14px;
}

.article-content {
    background: #f5f7fa;
    padding: 16px;
    border-radius: 4px;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.8;
    max-height: 300px;
    overflow-y: auto;
}

.article-cover {
    max-width: 300px;
    border-radius: 4px;
    margin-top: 8px;
}

.ai-write-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.result-content .form-group textarea {
    min-height: 120px;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    margin-bottom: 20px;
}

.publish-container h3 {
    margin-bottom: 20px;
    color: #303133;
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 20px 0;
    }

    .logo h2, .nav-item span:not(.icon) {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 14px;
    }

    .nav-item .icon {
        margin-right: 0;
    }

    .main-content {
        margin-left: 60px;
    }

    .page-content {
        padding: 16px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}
