/* ============================================
   XinLab - 智能装备与仿生系统课题组
   广西科技大学 · 机械与汽车工程学院
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: #2c3e50;
    background: #f5f7fa;
    padding-left: 220px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   顶部工具栏
   ============================================ */
.top-bar {
    background: #0a1628;
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: #64b5f6;
    transition: color 0.3s;
}

.top-bar a:hover { color: #fff; }

/* ============================================
   头部
   ============================================ */
.header {
    background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 50%, #0d2137 100%);
    padding: 35px 0;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(100,181,246,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -5%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(100,181,246,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    background: rgba(100,181,246,0.15);
    border: 2px solid rgba(100,181,246,0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #fff;
    flex-shrink: 0;
}

.lab-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.lab-info .lab-name-en {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
    font-weight: 300;
}

.lab-info .university {
    font-size: 14px;
    color: #64b5f6;
    margin-top: 4px;
}

.header-contact {
    text-align: right;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    line-height: 1.8;
}

/* ============================================
   左侧导航栏（侧边栏）
   ============================================ */
.navbar {
    background: #fff;
    border-right: 2px solid #e3f2fd;
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 100vh;
    z-index: 1000;
    box-shadow: 2px 0 15px rgba(0,0,0,0.06);
    overflow-y: auto;
}

.navbar .container {
    display: flex;
    flex-direction: column;
    padding: 22px 18px;
    min-height: 100%;
    max-width: 100%;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e3f2fd;
}

.sidebar-logo {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #1565c0, #42a5f5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-title h2 {
    font-size: 19px;
    color: #0a1628;
    margin-bottom: 2px;
    letter-spacing: 1px;
    line-height: 1.2;
}

.sidebar-title span {
    font-size: 11px;
    color: #78909c;
    display: block;
    line-height: 1.3;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.navbar a {
    display: block;
    padding: 13px 16px;
    font-size: 15px;
    color: #546e7a;
    font-weight: 500;
    border-left: 3px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
    color: #1565c0;
    border-left-color: #1565c0;
    background: #f5f9ff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    color: #1565c0;
    cursor: pointer;
    padding: 10px 15px;
}


/* ============================================
   主要内容区域
   ============================================ */
.main-content { padding: 50px 0; min-height: 60vh; }

/* ============================================
   页面横幅
   ============================================ */
.page-banner {
    background: linear-gradient(135deg, #0a1628, #1a3a5c);
    padding: 60px 0;
    color: #fff;
    text-align: center;
    position: relative;
}

.page-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1565c0, #42a5f5, #90caf9);
}

.page-banner h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.page-banner .subtitle {
    font-size: 16px;
    color: #64b5f6;
    font-weight: 300;
}

/* ============================================
   首页 - 英雄区域
   ============================================ */
.hero-section {
    background: linear-gradient(rgba(10,22,40,0.88), rgba(10,22,40,0.78)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.04)" stroke-width="0.5"/></pattern><pattern id="dots" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="1" fill="rgba(255,255,255,0.06)"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/><rect width="1200" height="600" fill="url(%23dots)"/></svg>');
    background-size: cover;
    padding: 100px 0 80px;
    color: #fff;
    text-align: center;
}

.hero-section h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.hero-section .hero-desc {
    font-size: 17px;
    color: #90caf9;
    max-width: 750px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.hero-tag {
    padding: 8px 20px;
    background: rgba(100,181,246,0.15);
    border: 1px solid rgba(100,181,246,0.3);
    border-radius: 25px;
    font-size: 14px;
    color: #90caf9;
    letter-spacing: 1px;
}

.hero-btn {
    display: inline-block;
    padding: 13px 40px;
    background: #1565c0;
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid #1565c0;
}

.hero-btn:hover {
    background: transparent;
    border-color: #42a5f5;
    color: #42a5f5;
}

/* ============================================
   PI 介绍
   ============================================ */
.pi-section {
    padding: 70px 0;
    background: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h3 {
    font-size: 32px;
    color: #0a1628;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title .divider {
    width: 60px;
    height: 3px;
    background: #1565c0;
    margin: 0 auto 15px;
}

.section-title p {
    color: #78909c;
    font-size: 15px;
}

.pi-card {
    display: flex;
    gap: 45px;
    align-items: flex-start;
    background: #f8fafc;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid #e3f2fd;
}

.pi-photo {
    width: 220px;
    height: 280px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #1565c0;
    flex-shrink: 0;
    border: 3px solid #e3f2fd;
}

.pi-info h3 {
    font-size: 26px;
    color: #0a1628;
    margin-bottom: 5px;
}

.pi-info .pi-title {
    color: #1565c0;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.pi-info .pi-bio {
    color: #455a64;
    font-size: 15px;
    line-height: 2;
}

.pi-info .pi-bio p { margin-bottom: 12px; }

/* ============================================
   统计数字
   ============================================ */
.stats-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #0a1628, #1a3a5c);
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item { padding: 20px; }

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: #42a5f5;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
}

/* ============================================
   研究方向卡片
   ============================================ */
.research-overview {
    padding: 70px 0;
    background: #f5f7fa;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.research-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e8edf2;
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.1);
}

.research-card-icon {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.research-card-icon.bg-blue { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.research-card-icon.bg-green { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.research-card-icon.bg-orange { background: linear-gradient(135deg, #fff3e0, #ffcc80); }

.research-card-body {
    padding: 25px;
}

.research-card-body h4 {
    font-size: 18px;
    color: #0a1628;
    margin-bottom: 10px;
}

.research-card-body p {
    font-size: 14px;
    color: #607d8b;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* ============================================
   新闻动态
   ============================================ */
.news-section {
    padding: 70px 0;
    background: #fff;
}

.news-list { max-width: 800px; margin: 0 auto; }

.news-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eceff1;
    transition: all 0.3s;
}

.news-item:hover {
    background: #f8fafc;
    margin: 0 -20px;
    padding: 20px;
    border-radius: 8px;
}

.news-date {
    width: 70px;
    height: 70px;
    background: #e3f2fd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #1565c0;
}

.news-date .day { font-size: 24px; font-weight: 700; line-height: 1; }
.news-date .month { font-size: 12px; color: #607d8b; }

.news-content h4 { font-size: 16px; color: #333; margin-bottom: 5px; }
.news-content p { font-size: 13px; color: #90a4ae; }

/* ============================================
   团队页面
   ============================================ */
.team-section { padding: 70px 0; background: #fff; }

.team-category { margin-bottom: 50px; }

.team-category h4 {
    font-size: 22px;
    color: #0a1628;
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid #1565c0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.team-member {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    border: 1px solid #e3f2fd;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    margin: 25px auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #1565c0;
}

.member-info { padding: 0 15px 25px; }

.member-info h5 { font-size: 16px; color: #0a1628; margin-bottom: 4px; }
.member-info .role { font-size: 13px; color: #1565c0; margin-bottom: 8px; }
.member-info .research { font-size: 12px; color: #90a4ae; line-height: 1.6; }

/* ============================================
   研究方向详情页
   ============================================ */
.direction-section {
    padding: 50px 0;
    border-bottom: 1px solid #eceff1;
}

.direction-section:last-child { border-bottom: none; }

.direction-content {
    display: flex;
    gap: 45px;
    align-items: flex-start;
}

.direction-image {
    width: 420px;
    height: 300px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #1565c0;
    flex-shrink: 0;
}

.direction-text h3 {
    font-size: 24px;
    color: #0a1628;
    margin-bottom: 15px;
}

.direction-text p {
    color: #546e7a;
    font-size: 15px;
    line-height: 2;
    margin-bottom: 15px;
}

.direction-text .highlight-box {
    background: #e3f2fd;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #1565c0;
    font-size: 14px;
    color: #0d47a1;
}

/* ============================================
   发表论文
   ============================================ */
.publication-section { padding: 50px 0; }

.pub-year {
    font-size: 24px;
    color: #0a1628;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e3f2fd;
}

.pub-list { list-style: none; }

.pub-item {
    padding: 16px 20px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8edf2;
    transition: all 0.3s;
    font-size: 14px;
    line-height: 1.8;
}

.pub-item:hover {
    border-color: #bbdefb;
    background: #f8faff;
}

.pub-index {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: #e3f2fd;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-size: 12px;
    color: #1565c0;
    margin-right: 10px;
    font-weight: 600;
}

.pub-journal { color: #1565c0; font-weight: 600; }
.pub-authors { color: #546e7a; }
.pub-title { color: #0a1628; font-weight: 500; }
.pub-info { color: #90a4ae; font-size: 12px; }
.pub-doi { color: #1565c0; font-size: 12px; margin-left: 8px; }

/* ============================================
   招生信息
   ============================================ */
.recruit-section {
    padding: 50px 0;
    background: #f5f7fa;
}

.recruit-banner {
    background: linear-gradient(135deg, #0a1628, #1a3a5c);
    border-radius: 16px;
    padding: 50px;
    color: #fff;
    text-align: center;
}

.recruit-banner h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #64b5f6;
}

.recruit-banner p {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    line-height: 2;
    margin-bottom: 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.recruit-fields {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.recruit-field {
    padding: 10px 22px;
    background: rgba(100,181,246,0.15);
    border: 1px solid rgba(100,181,246,0.3);
    border-radius: 25px;
    font-size: 14px;
    color: #90caf9;
}

.recruit-btn {
    display: inline-block;
    padding: 13px 40px;
    background: #42a5f5;
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.recruit-btn:hover {
    background: #64b5f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66,165,245,0.3);
}

/* ============================================
   荣誉奖项
   ============================================ */
.honors-section {
    padding: 70px 0;
    background: #fff;
}

.honors-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.honor-item {
    padding: 25px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e3f2fd;
    text-align: center;
    transition: all 0.3s;
}

.honor-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.honor-icon { font-size: 32px; margin-bottom: 10px; }
.honor-item h5 { font-size: 14px; color: #0a1628; margin-bottom: 4px; }
.honor-item p { font-size: 12px; color: #90a4ae; }

/* ============================================
   联系我们
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 35px;
    border: 1px solid #e3f2fd;
}

.contact-info-card h4 {
    font-size: 20px;
    color: #0a1628;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e3f2fd;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 42px;
    height: 42px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1565c0;
    flex-shrink: 0;
}

.contact-text h5 { font-size: 14px; color: #333; margin-bottom: 3px; }
.contact-text p { font-size: 14px; color: #78909c; line-height: 1.6; }

.contact-map {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e3f2fd;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    flex-direction: column;
    text-align: center;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: #0a1628;
    color: #fff;
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h4 {
    font-size: 17px;
    margin-bottom: 20px;
    color: #64b5f6;
    font-weight: 600;
}

.footer-col p,
.footer-col a {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 2;
    display: block;
    transition: color 0.3s;
}

.footer-col a:hover { color: #42a5f5; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.footer-bottom a { color: #64b5f6; }

/* ============================================
   标签
   ============================================ */
.tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
}

.tag-blue { background: #e3f2fd; color: #1565c0; }
.tag-green { background: #e8f5e9; color: #2e7d32; }
.tag-orange { background: #fff3e0; color: #e65100; }
.tag-purple { background: #f3e5f5; color: #6a1b9a; }
.tag-teal { background: #e0f2f1; color: #00695c; }

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .team-grid { grid-template-columns: repeat(3, 1fr); }
    .research-grid { grid-template-columns: repeat(2, 1fr); }
    .honors-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { padding-left: 0; }
    .header .container { flex-direction: column; text-align: center; }
    .logo-area { flex-direction: column; }
    .header-contact { text-align: center; margin-top: 15px; }
    .navbar .container { flex-wrap: wrap; justify-content: center; }
    .navbar a { padding: 12px 16px; font-size: 14px; }
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .nav-links.active { display: flex; }
    .navbar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 2px solid #e3f2fd;
        box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    }
    .navbar .container {
        flex-direction: row;
        padding: 0 20px;
        min-height: auto;
    }
    .sidebar-brand { display: none; }
    .navbar a {
        padding: 12px 16px;
        font-size: 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 0;
    }
    .navbar a:hover,
    .navbar a.active {
        border-bottom-color: #1565c0;
        border-left-color: transparent;
        background: #f5f9ff;
    }
    .hero-section { padding: 60px 0; }
    .hero-section h2 { font-size: 26px; }
    .pi-card { flex-direction: column; align-items: center; text-align: center; padding: 25px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .research-grid { grid-template-columns: 1fr; }
    .direction-content { flex-direction: column; }
    .direction-image { width: 100%; height: 200px; }
    .contact-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .honors-list { grid-template-columns: repeat(2, 1fr); }
    .recruit-banner { padding: 30px 20px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .honors-list { grid-template-columns: 1fr; }
}
