/* ============================================
   共享样式表 - 袁大强课题组网站
   所有页面统一引用，确保风格一致
   ============================================ */

/* --- 基础设置与颜色变量 --- */
:root {
    --primary-color: #0070c9;
    --secondary-color: #1d1d1f;
    --background-white: #f8f9fa;
    --background-light-gray: #f0f2f5;
    --card-background: #ffffff;
    --border-color: #e1e5e9;
    --card-shadow: rgba(0, 0, 0, 0.05);
    --card-hover-shadow: rgba(0, 0, 0, 0.08);
    --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    --navbar-height: 85px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--background-white);
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #005bb5;
}

/* --- 通用栏目 --- */
.section {
    padding: 80px 0;
    transition: background-color 0.3s;
}

.bg-light-gray {
    background-color: var(--background-light-gray);
}

.bg-white {
    background-color: var(--background-white);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

/* --- 按钮 --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    transform: translateY(0);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:active::after {
    animation: ripple 1s ease-out;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}
.primary-btn:hover {
    background-color: #005bb5;
    border-color: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 201, 0.2);
}
.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 201, 0.2);
}

/* --- 导航栏 --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 5px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--navbar-height);
    transition: height 0.4s ease;
}

.navbar.scrolled .container {
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 55px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 8px;
}

.navbar ul li {
    position: relative;
}

.navbar ul li a {
    color: var(--secondary-color);
    padding: 15px 10px;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease 0.1s;
}

.navbar ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 112, 201, 0.08);
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    z-index: -1;
    border-radius: 8px;
}

.navbar ul li a:hover {
    color: var(--primary-color);
}

.navbar ul li a:hover::before {
    opacity: 1;
}

.navbar ul li a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.navbar ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10px;
    right: 10px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 4px 4px 0 0;
    animation: slideIn 0.3s ease;
}

/* --- 页面标题区域（子页面通用） --- */
.page-hero {
    background: linear-gradient(135deg, rgba(0, 112, 201, 0.08) 0%, rgba(0, 112, 201, 0.04) 100%);
    padding: 100px 0 60px;
    margin-top: var(--navbar-height);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.page-hero p {
    font-size: 1.2rem;
    color: #5a5a5e;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* --- 卡片通用 --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 4px 16px var(--card-shadow);
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    box-shadow: 0 12px 32px var(--card-hover-shadow);
    transform: translateY(-5px);
    border-color: rgba(0, 112, 201, 0.2);
}

/* --- 详情卡片 --- */
.detail-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 16px var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.detail-card:hover {
    box-shadow: 0 8px 24px var(--card-hover-shadow);
    transform: translateY(-5px);
}

.detail-card h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 112, 201, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-card h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.detail-card h2 i {
    color: var(--primary-color);
}

/* --- 返回顶部按钮 --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 112, 201, 0.3);
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #005bb5;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 112, 201, 0.4);
}

/* --- 页脚 --- */
.footer {
    background-color: #1a1a1a;
    color: #f5f5f7;
    padding: 50px 0 20px;
    font-size: 0.9rem;
    border-top: 1px solid #333;
}

.footer-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 30px;
}

.footer h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #e5e5e7;
}

.footer p {
    margin-bottom: 10px;
    color: #b0b0b5;
}

.footer a {
    color: #b0b0b5;
}

.footer a:hover {
    color: white;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-media {
    text-align: right;
}

.social-media a {
    font-size: 1.5rem;
    margin-left: 15px;
    color: #b0b0b5;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-media a:hover {
    color: white;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    color: #6e6e73;
    padding-top: 10px;
}

/* --- 动画 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }
    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

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

/* --- 滚动指示器 --- */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--primary-color);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* --- 加载动画 --- */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- 时间线 --- */
.timeline {
    position: relative;
    padding-left: 40px;
    margin-top: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), rgba(0, 112, 201, 0.3));
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 0 0 3px rgba(0, 112, 201, 0.2);
    z-index: 2;
}

.timeline-year {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    background-color: rgba(0, 112, 201, 0.08);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
}

.timeline-content {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.timeline-content p {
    color: #424245;
    line-height: 1.6;
}

/* --- 标签 --- */
.interest-tags, .technique-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.interest-tag, .technique-tag {
    background-color: rgba(0, 112, 201, 0.08);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 112, 201, 0.2);
}

.interest-tag:hover, .technique-tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .navbar nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 15px;
        gap: 5px;
    }
    
    .navbar ul li a {
        padding: 10px 8px;
        font-size: 1rem;
    }
    
    .navbar ul li a.active::after {
        left: 8px;
        right: 8px;
    }

    .page-hero {
        padding: 80px 0 40px;
    }
    
    .page-hero h1 {
        font-size: 2.2rem;
    }

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

    .detail-card {
        padding: 25px 20px;
    }

    .detail-card h2 {
        font-size: 1.5rem;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-item::before {
        left: -32px;
        width: 16px;
        height: 16px;
    }

    .timeline-content {
        padding: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .social-media {
        text-align: left;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
