* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 20px;
    color: #303133;
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

header h1 {
    font-size: 28px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #909399;
}

.publish-button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.publish-button button {
    padding: 10px 20px;
    background: #409eff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.publish-button button:hover {
    background: #66b1ff;
}

main {
    max-width: 1400px;
    margin: 0 auto;
}

.view-mode-toggle {
    text-align: center;
    margin-bottom: 20px;
}

.view-mode-toggle button {
    padding: 9px 20px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    background: white;
    color: #606266;
    cursor: pointer;
    margin: 0 -1px;
    transition: all 0.3s;
    font-weight: 400;
}

.view-mode-toggle button:first-child {
    border-radius: 4px 0 0 4px;
}

.view-mode-toggle button:last-child {
    border-radius: 0 4px 4px 0;
}

.view-mode-toggle button:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}

.view-mode-toggle button.active {
    background: #409eff;
    color: white;
    border-color: #409eff;
    z-index: 1;
}

.view-container {
    background: white;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    border: 1px solid #ebeef5;
}

.dual-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.view-column {
    min-width: 0;
}

.control-panel {
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #ebeef5;
}

.control-panel label {
    font-weight: 400;
    color: #606266;
    margin-right: 12px;
    font-size: 14px;
}

.control-panel select {
    padding: 0 15px;
    height: 32px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-width: 200px;
    color: #606266;
    outline: none;
    transition: border-color 0.2s;
}

.control-panel select:hover {
    border-color: #c0c4cc;
}

.control-panel select:focus {
    border-color: #409eff;
}

.algorithm-info {
    background: #ecf5ff;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 3px solid #409eff;
    font-size: 14px;
    line-height: 1.8;
}

.algorithm-info strong {
    color: #409eff;
    margin-right: 8px;
    font-weight: 500;
}

.algorithm-info span {
    color: #606266;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-card {
    background: white;
    border: 1px solid #ebeef5;
    border-radius: 4px;
    padding: 16px;
    transition: all 0.3s;
    position: relative;
}

.post-card:hover {
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    border-color: #409eff;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-time {
    color: #909399;
    font-size: 13px;
}

.post-likes {
    background: #f56c6c;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: 400;
    font-size: 13px;
}

.post-content {
    color: #303133;
    line-height: 1.8;
    margin-bottom: 12px;
    font-size: 14px;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-image {
    margin: 12px 0;
    max-height: 300px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.post-card {
    cursor: pointer;
}

.back-button {
    margin-bottom: 20px;
}

.back-button button {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    background: white;
    color: #606266;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.back-button button:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}

.tag {
    background: #ecf5ff;
    color: #409eff;
    padding: 0 8px;
    height: 24px;
    line-height: 22px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #d9ecff;
}

footer {
    text-align: center;
    color: #909399;
    margin-top: 30px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .dual-view {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .control-panel select {
        min-width: 150px;
        font-size: 14px;
    }
    
    .publish-button {
        position: static;
        transform: none;
        margin-top: 12px;
    }
}

/* 搜索和筛选面板 */
.search-filter-panel {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    border: 1px solid #ebeef5;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 0 15px;
    height: 36px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    outline: none;
}

.search-box input:focus {
    border-color: #409eff;
}

.search-box button {
    padding: 0 20px;
    height: 36px;
    background: #f5f5f5;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    color: #606266;
}

.search-box button:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}

.filter-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-label {
    font-weight: 500;
    color: #606266;
    font-size: 14px;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-filter {
    padding: 0 12px;
    height: 28px;
    line-height: 26px;
    background: #f4f4f5;
    border: 1px solid #e9e9eb;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    color: #606266;
}

.tag-filter:hover {
    background: #ecf5ff;
    border-color: #b3d8ff;
    color: #409eff;
}

.tag-filter.active {
    background: #409eff;
    color: white;
    border-color: #409eff;
}

.filter-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #ebeef5;
    font-size: 14px;
    color: #909399;
}

.filter-status button {
    padding: 0 15px;
    height: 28px;
    background: #f56c6c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.filter-status button:hover {
    background: #f78989;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #909399;
    font-size: 14px;
}
