/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 让 footer 始终在最底部 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    color: #1D2129;
    background: #fff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.section {
  flex: 1;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
a {
    text-decoration: none;
    transition: all 0.3s;
}
ul {
    list-style: none;
}
img {
    width :  375px;
    height :  185px;
    max-width: 100%;
}

/* 颜色变量 */
:root {
    --primary: #165DFF;
    --secondary: #36CFC9;
    --dark: #1D2129;
    --light: #F2F7FF;
    --gray: #666;
}

/* 导航栏 - 白色背景 + 加高 + 居中靠右 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    z-index: 999;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}
.logo {
    width: 300px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 500;
    //color: #000;
}
.nav-menu {
    display: flex;
    gap: 32px;
}
.nav-menu a {
    color: #333;
    font-weight: 500;
    font-size: 16px;
}
.nav-menu a.active, .nav-menu a:hover {
    color: var(--primary);
}
.search-bar {
    position: relative;
    margin-left: auto;
    margin-right: 20px;
}
.search-bar input {
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 30px;
    outline: none;
    width: 200px;
    background: #f9f9f9;
}
.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}
.mobile-menu {
    display: none;
    font-size: 24px;
    color: var(--primary);
}

/* 导航登录注册按钮 */
.nav-auth {
    display: flex;
    gap: 12px;
}
.nav-auth a {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}
.nav-auth .login-btn {
    color: var(--primary);
    border: 1px solid var(--primary);
    background: #fff;
}
.nav-auth .reg-btn {
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--primary);
}
.nav-auth a:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(22,93,255,0.15);
}

/* Banner 轮播 */
.banner {
    width: 100%;
    height: 520px;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}
.banner-slide {
    width: 100% !important;
    height: 100%;
    display: none;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.banner-slide.active {
    display: flex;
}
.banner-content h1 {
    font-size: 52px;
    margin-bottom: 20px;
}
.banner-content p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
}
.banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.3);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
}
.prev { left: 30px; }
.next { right: 30px; }

/* 通用板块 */
.section {
    padding: 80px 0;
}
.section-title {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 32px;
    margin-bottom: 10px;
}
.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 博客分类 */
.category-box {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}
.category-item {
    padding: 8px 16px;
    background: var(--light);
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}
.category-item.active, .category-item:hover {
    background: var(--primary);
    color: #fff;
}

/* 标签 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.tag {
    padding: 4px 10px;
    background: rgba(22,93,255,0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 12px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.card-body {
    padding: 20px;
}

.logo img {
    width :  46px;
    height :  46px;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
@media (max-width: 992px) {
    .grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
    .mobile-menu { display: block; }
    .logo {font-size: 18px; gap: 5px}
    .logo img {width: 40px; height: 40px;}
    .nav-auth {display: none;}
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    margin-top: 20px;
}
.btn:hover {
    background: #0047D1;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-white {
    background: #fff;
    color: var(--primary);
}
.btn-success{background:#28a745}
.btn-danger{background:#dc3545}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}
.pagination a {
    padding: 8px 15px;
    background: var(--light);
    border-radius: 6px;
    color: #333;
}
.pagination a.active, .pagination a:hover {
    background: var(--primary);
    color: #fff;
}

/* 页脚 */
.footer {
    background: var(--dark);
    color: #fff;
    padding: 60px 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 30px;
    margin-bottom: 30px;
}
.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #999;
}

/* 返回顶部 */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.back-top.show {
    opacity: 1;
    visibility: visible;
}

/* 热门技术领域 */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 20px;
}
.tech-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(22,93,255,0.1);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}
.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #165DFF, #36CFC9);
}
.tech-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(22,93,255,0.15);
    border-color: #165DFF;
}
.tech-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(45deg, #165DFF, #36CFC9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}
.tech-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1D2129;
}
.tech-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 登录注册盒子 */
.auth-box {
    max-width: 450px;
    margin: 50px auto;
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}
.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
}
.form-group {
    margin-bottom: 20px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
}

/* 支付页面 */
.pay-box {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
.pay-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.pay-total {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    text-align: right;
    margin: 20px 0;
}

/* 后台布局 */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    margin-top:80px;
}
.admin-sidebar {
    width: 250px;
    background: #1a3366;
    color: #fff;
    padding: 30px 0;
}
.admin-sidebar h3 {
    text-align: center;
    margin-bottom: 30px;
}
.admin-sidebar ul li a {
    display: block;
    padding: 12px 25px;
    color: rgba(255,255,255,0.8);
}
.admin-sidebar ul li a.active, .admin-sidebar ul li a:hover {
    background: var(--primary);
    color: #fff;
}
.admin-main {
    flex: 1;
    padding: 30px;
    background: #f5f7fa;
}
.admin-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top:20px;
}
.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

@media (max-width: 992px) {
    .tech-grid { grid-template-columns: repeat(2,1fr); }
    .admin-wrapper{flex-direction:column;}
    .admin-sidebar{width:100%;}
}
@media (max-width: 768px) {
    .tech-grid { grid-template-columns: 1fr; }
    .banner { height: 350px; }
    .banner-content h1 { font-size: 32px; }
}
/* 首页双栏布局 */
.home-row {
    display: flex;
    gap: 30px;
    margin-top: 120px;
}
.home-left {
    flex: 0 0 70%;
}
.home-right {
    flex: 0 0 27%;
}

/* 横版文章样式 */
.article-horizontal {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.article-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.article-horizontal img {
    width: 240px;
    height: 160px;
    object-fit: cover;
}
.article-horizontal .body {
    flex: 1;
    padding: 20px 25px;
}
.article-horizontal h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}
.article-horizontal p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}
.article-horizontal .tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(22,93,255,0.1);
    color: #165DFF;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

.side-box {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}
.side-box h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #165DFF;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hot-list {
    list-style: none;
}
.hot-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}
.hot-list li:last-child {
    border-bottom: 0;
}
.hot-list li span {
    background: #165DFF;
    color: #fff;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
}
.hot-list li a {
    color: #333;
    font-size: 14px;
}
.hot-list li a:hover {
    color: #165DFF;
}
.vip-item {
    background: #fff5cc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #d68000;
}
.vip-item:last-child {
    margin-bottom: 0;
}
@media (max-width: 992px) {
    .home-row {
        flex-direction: column;
    }
    .home-left,.home-right {
        flex: 100%;
    }
    .article-horizontal {
        flex-direction: column;
    }
    .article-horizontal img {
        width: 100%;
    }
}