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

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

.header {
    background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
    color: #fff;
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.category-nav-horizontal {
    background-color: rgba(255, 255, 255, 0.1);
    /* margin-top: 16px; */
    padding: 12px 0;
    border-radius: 8px;
    overflow-x: auto;
    white-space: nowrap;
}

.category-list-horizontal {
    list-style: none;
    display: flex;
    gap: 16px;
    padding: 0 16px;
}

.category-list-horizontal li {
    display: inline-block;
}

.category-list-horizontal a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.category-list-horizontal a:hover,
.category-list-horizontal a.active {
    background-color: rgba(242, 39, 39, 0.8);
    transform: translateY(-2px);
}

.category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border-radius: 10%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.category-list-horizontal a:hover .category-icon,
.category-list-horizontal a.active .category-icon {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.category-icon i {
    font-size: 20px;
}

.category-icon img {
    object-fit: cover;
    border-radius: 10%;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    white-space: normal;
    word-break: break-all;
}

/* 隐藏滚动条但保持功能 */
.category-nav-horizontal::-webkit-scrollbar {
    height: 4px;
}

.category-nav-horizontal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.category-nav-horizontal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.category-nav-horizontal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.header-left a:hover {
    transform: translateY(-2px);
}

.header-center h1 {
    font-size: 18px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-right a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.2);
}

.header-right a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

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

.category-nav {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.category-nav:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.category-nav h2 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #1890ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-nav h2::before {
    font-size: 16px;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.category-list a:hover,
.category-list a.active {
    background: linear-gradient(90deg, #e6f7ff 0%, #f6ffed 100%);
    color: #1890ff;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.category-list a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #1890ff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.category-list a:hover::before,
.category-list a.active::before {
    transform: scaleY(1);
}

.search-box {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.search-box:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.search-box h2 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #1890ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box h2::before {
    font-size: 16px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.search-form button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.search-form button:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.post-list {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.post-list:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

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

.post-list-header h2 {
    font-size: 20px;
    font-weight: bold;
    color: #1890ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-list-header h2::before {
    font-size: 18px;
}

.post-list-header .btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-list-header .btn::before {
    content: "+";
    font-size: 16px;
    font-weight: bold;
}

.post-list-header .btn:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.post-list-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.post-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #e8e8e8;
}

.post-header {
    margin-bottom: 12px;
}

.post-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 16px;
    font-weight: bold;
    flex: 1;
}

.post-title a:hover {
    color: #1890ff;
}

.post-title .label {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 12px;
    box-shadow: 0 2px 4px rgba(255, 77, 79, 0.3);
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #62a8eb 0%, #1890ff 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(142, 193, 241, 0.3);
}

.post-content {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.post-content a {
    color: inherit;
    text-decoration: none;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #999;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-author {
    font-weight: 500;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
    background-color: #fafafa;
    border-radius: 12px;
    margin: 20px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    gap: 8px;
}

.pagination a {
    padding: 8px 14px;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.pagination a:hover {
    border-color: #1890ff;
    color: #1890ff;
    transform: translateY(-2px);
}

.pagination a.active {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.post-detail {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.post-detail:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.post-detail h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #1890ff;
    line-height: 1.3;
}

.post-meta {
    /* margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0; */
    font-size: 14px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.post-meta .label {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-content {
    line-height: 1.8;
    margin-bottom: 24px;
    font-size: 16px;
    color: #333;
}

.reply-list {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.reply-list:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.reply-list h2 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #1890ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reply-list h2::before {
    font-size: 18px;
}

.reply-item {
    display: grid;
    grid-template-columns: 40px 1fr; 
    gap: 12px;
    align-items: start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.reply-item:hover {
    background-color: #fafafa;
    padding-left: 12px;
    border-radius: 8px;
}

.reply-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.reply-avatar {
    width: 100%; 
    aspect-ratio: 1 / 1; 
    border-radius: 50%;
    border: 2px solid #e8e8e8;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.reply-item:hover .reply-avatar {
    border-color: #1890ff;
    transform: scale(1.05);
}

.reply-content {
    display: flex;
    flex-direction: column;
}

.reply-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.reply-author {
    font-weight: bold;
    color: #333;
    font-size: 15px;
}

.reply-time {
    font-size: 12px;
    color: #999;
}

.reply-body {
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

.reply-form {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

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

.form-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
}

.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.form-actions .btn-default {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #d9d9d9;
}

.form-actions .btn-default:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bottom-btn {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.4);
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 999;
    border: 3px solid #fff;
}

.bottom-btn:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%);
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 8px 20px rgba(24, 144, 255, 0.5);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 12px 0;
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.bottom-nav-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.bottom-nav-item i {
    font-size: 20px;
    /* margin-bottom: 4px; */
    transition: all 0.3s ease;
}

.bottom-nav-item:hover i {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .header-container {
        /* flex-direction: column; */
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-center h1 {
        font-size: 16px;
    }
    
    /* .category-nav-horizontal {
        margin-top: 12px;
        padding: 8px 0;
    } */
    
    .category-list-horizontal {
        gap: 12px;
        padding: 0 12px;
    }
    
    .category-list-horizontal a {
        padding: 6px 12px;
        min-width: 70px;
    }
    
    .category-icon {
        width: 36px;
        height: 36px;
    }
    
    .category-icon i {
        font-size: 18px;
    }
    
    .category-icon img {
        width: 39px;
        height: 39px;
    }
    
    .category-name {
        font-size: 11px;
    }
    
    .container {
        margin: 16px auto;
        padding: 0 12px;
    }
    
    .category-nav,
    .search-box,
    .post-list,
    .post-detail,
    .reply-list {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .post-item {
        padding: 16px;
    }
    
    .post-title {
        flex-wrap: wrap;
    }
    
    .post-meta {
        flex-wrap: wrap;
    }
    
    .reply-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .reply-avatar {
        margin-bottom: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .bottom-btn {
        width: 56px;
        height: 56px;
        font-size: 24px;
        bottom: 70px;
        right: 20px;
    }
    
    .bottom-nav {
        padding: 8px 0;
    }
    
    .bottom-nav-item {
        padding: 6px 12px;
        min-width: 70px;
    }
    
    .bottom-nav-item i {
        font-size: 18px;
    }
    
    .bottom-nav-item span {
        font-size: 18px;
    }
}

@media (min-width: 769px) {
    .container {
        display: flex;
        gap: 24px;
    }
    
    .sidebar {
        width: 280px;
        flex-shrink: 0;
    }
    
    .main-content {
        flex: 1;
    }
}

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

.category-nav,
.search-box,
.post-list,
.post-detail,
.reply-list {
    animation: fadeIn 0.5s ease-out;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.alert {
    padding: 12px 16px;
    background-color: #e6f7ff;
    border-left: 4px solid #1890ff;
    border-radius: 4px;
    margin-bottom: 16px;
    color: #1890ff;
    font-size: 14px;
}

.alert a {
    color: #1890ff;
    font-weight: bold;
    text-decoration: none;
}

.alert a:hover {
    text-decoration: underline;
}