:root {
    --primary-color: #4a90e2;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 增强玻璃拟态效果 */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.glass-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

/* 增强导航栏效果 */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
}

/* 英雄区域 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), #6ab7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeIn 1s ease-out;
}

.hero .subtitle {
    font-size: 2rem;
    color: var(--text-color);
    animation: fadeIn 1s ease-out;
}

/* 新闻网格 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* 增强新闻卡片效果 */
.news-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover img {
    transform: scale(1.1);
}

.news-card-content {
    padding: 2rem;
    /*background: linear-gradient(*/
    /*        to bottom,*/
    /*        rgba(255, 255, 255, 0.1),*/
    /*        rgba(255, 255, 255, 0.05)*/
    /*);*/
}

.news-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), #6ab7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 页脚 */
.glass-footer {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

/* 添加动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1, .hero .subtitle {
    animation: fadeIn 1s ease-out;
}

.news-card {
    animation: fadeIn 0.5s ease-out;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .news-card {
        margin: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.5rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* 加载指示器 */
.loading-indicator {
    text-align: center;
    padding: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 关于页面样式 */
.about-hero {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 4rem;
}

.about-content {
    padding: 2rem 0;
}

.about-text {
    padding: 2rem;
    border-radius: 15px;
}

.about-text h2 {
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.about-text h2:first-child {
    margin-top: 0;
}

.contact-info {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: 10px;
}

/* 新闻页面样式 */
.news-hero {
    height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 2rem;
}

.news-content {
    padding: 2rem 0;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* 响应式设计补充 */
@media (max-width: 768px) {
    .about-hero {
        height: 40vh;
    }

    .about-text {
        padding: 1rem;
    }

    .news-hero {
        height: 25vh;
    }

    .news-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--text-color);
}

.breadcrumb .separator {
    color: var(--text-color);
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--text-color);
    opacity: 0.7;
}

/* 文章内容样式 */
.article-content {
    padding: 2rem;
    margin: 2rem 0;
}

.article-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.markdown-body {
    line-height: 1.8;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body code {
    background: var(--glass-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

.markdown-body pre {
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.markdown-body pre code {
    background: none;
    padding: 0;
}

.markdown-body ul,
.markdown-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border-radius: 0 8px 8px 0;
}

/* 首页开场动画 */
.intro-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 1s ease-in-out 2s forwards;
}

.intro-logo {
    width: 150px;
    height: 150px;
    position: relative;
    animation: logoAnimation 2s ease-in-out;
}

.intro-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: logoRotate 2s ease-in-out;
}

.intro-logo::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: var(--bg-color);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: logoInnerRotate 2s ease-in-out;
}

@keyframes logoAnimation {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes logoRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoInnerRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-360deg);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* 移动端导航按钮 */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 动画箭头 */
.scroll-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    width: 30px;
    height: 30px;
    border-right: 2px solid var(--text-color);
    border-bottom: 2px solid var(--text-color);
    transform: translateX(-50%) rotate(45deg);
    animation: arrowBounce 2s infinite;
    cursor: pointer;
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) rotate(45deg) translateY(0);
    }
    40% {
        transform: translateX(-50%) rotate(45deg) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) rotate(45deg) translateY(-5px);
    }
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

.linenums li {
    background: inherit;
}

.button_udf {
    background: var(--glass-bg);
    border: var(--text-color) 1px solid;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    text-decoration: none;
    display: inline-block;
}

.button_udf:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}