/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Night Mode (Default) */
body.dark-mode {
    background-color: #000000;
    color: #FFFFFF;
}

/* Day Mode */
body.light-mode {
    background-color: #FFFFFF;
    color: #000000;
}

/* Links */
a {
    text-decoration: none;
    transition: color 0.3s ease;
}

body.dark-mode a {
    color: #AAAAAA;
}

body.light-mode a {
    color: #555555;
}

a:hover {
    color: #FFFFFF;
}

/* Header Section */
.header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    background-color: #000; /* 背景色用于无图片时 */
    color: #fff;
    overflow: hidden;
}

/* Promo Banner Background */
.promo-banner {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 20%, /* 夜间模式：顶部渐变少 */
        rgba(0, 0, 0, 0.8) 80% /* 夜间模式：底部渐变多 */
    ), 
    url('ace.png'); /* 替换为你的宣传图路径 */
    background-size: cover; /* 确保图片覆盖整个区域 */
    background-position: center; /* 图片居中显示 */
    background-repeat: no-repeat; /* 不重复图片 */
    height: 100vh; /* 高度填充整个视口 */
    justify-content: center;
    align-items: center;
    position: relative; /* 保持文字和背景叠加 */
    color: white; /* 确保文字颜色清晰 */
    transition: background 0.3s ease; /* 平滑切换白天/夜间模式 */
}

/* 白天模式的渐变效果 */
body.light-mode .promo-banner {
    background: #f8f9fa; /* 替换为你的宣传图路径 */
    background-size: cover; /* 确保图片覆盖整个区域 */
    background-position: center; /* 图片居中显示 */
    background-repeat: no-repeat; /* 不重复图片 */
    height: 100vh; /* 高度填充整个视口 */
    justify-content: center;
    align-items: center;
    position: relative; /* 保持文字和背景叠加 */
    color: white; /* 确保文字颜色清晰 */
    transition: background 0.3s ease; /* 平滑切换白天/夜间模式 */
}


/* Title in Header */
.header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff; /* 确保文字为白色，适配深色背景 */
    margin: 0;
    z-index: 1; /* 确保标题显示在图片上方 */
    text-shadow: none; /* 去掉文字阴影 */
}

/* Scroll Bar Style */
.scroll-bar {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: max(5vw, 60px);
    height: max(1vh, 8px);
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.scroll-bar::after {
    content: "";
    display: block;
    width: max(3vw, 40px);
    height: max(0.5vh, 3px);
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    animation: pulse 1.8s infinite;
    transition: background-color 0.3s ease;
}

body.light-mode .scroll-bar {
    background-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .scroll-bar::after {
    background-color: rgba(0, 0, 0, 0.7);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(max(0.8vh, 8px));
    }
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%; /* 覆盖整个屏幕宽度 */
    height: 60px;
    display: flex;
    justify-content: center; /* 居中对齐内部内容 */
    background-color: transparent;
    color: inherit;
    padding: 0 20px;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar-content {
    width: 100%;
    max-width: 1200px; /* 内容最大宽度 */
    display: flex;
    justify-content: space-between; /* 左右对齐 */
    align-items: center;
}

body.dark-mode .navbar {
    background-color: rgba(0, 0, 0, 0.8);
}

body.light-mode .navbar {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Context Bar */
.context-bar {
    position: sticky;
    top: 80px;
    width: 250px;
    padding-right: 20px;
    max-height: calc(100vh - 80px);
    overflow: auto;
}

.context-bar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border-radius: 8px;
    padding: 10px;
}

.context-bar ul li {
    margin: 10px 0;
}

.context-bar ul li a {
    font-size: 1rem;
    padding: 10px;
    text-decoration: none;
    color: #000;
    border-radius: 4px;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.context-bar ul li a:hover {
    background-color: #444;
    color: #fff;
}

/* Placeholder for content alignment */
.content-placeholder {
    width: 250px;
    visibility: hidden;
}

/* Main Content Section */
.content {
    margin: 0 auto;
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    align-items: start;          /* 让 sticky 正确起作用 */
    max-width: 1200px;
    padding: 0 2rem;
    width: 100%;
}

.content-section {
    flex: 1;
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.content-section p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

/* Mode Toggle Button */
.mode-toggle {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mode-toggle:hover {
    transform: scale(1.2);
}

/* Footer Section */
.footer {
    text-align: center;
    padding: 20px 10px;
    font-size: 0.9rem;
    color: inherit;
}

.footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: inherit;
}

/* Section Adjustment for Navbar */
.section {
    position: relative;
    padding-top: 80px;
    margin-top: -80px;
}
/* Responsive Design Adjustments */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    .navbar {
        flex-direction: column;
        height: auto;
    }
    .context-bar {
        width: 100%;
        position: static;
        height: auto;
    }
    .content {
        flex-direction: column;
        padding: 20px;
    }
    .content-section {
        padding-left: 0;
    }
    .footer {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    .navbar-content {
        flex-direction: column;
        align-items: center;
    }
    .mode-toggle {
        font-size: 1.2rem;
    }
    .content {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .context-bar {
        display: none; /* Hide context bar on smaller screens */
    }
    .content {
        padding: 0 2.5rem; /* Remove padding reserved for context bar */
    }
    .content-placeholder {
        display: none; /* Hide placeholder when context bar is not visible */
    }
}

@media (max-width: 768px) {
    .navbar-content {
        max-width: none; /* Remove the max-width restriction for mobile */
        width: 100%; /* Make navbar content span the full width */
    }
    .navbar {
        flex-direction: column; /* Stack navbar items vertically on smaller screens */
    }
}

/* Header Buttons */
.header-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.header-button {
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 25px;
    color: #ffffff !important; /* 强制文字为白色 */
    background-color: transparent; /* 背景透明 */
    border: 2px solid rgba(255, 255, 255, 0.8); /* 半透明白色边框 */
    border-radius: 25px; /* 圆润设计 */
    font-weight: 500; /* 字体稍加粗 */
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
}

.header-button:hover {
    background-color: rgba(255, 255, 255, 0.1); /* 鼠标悬停时白色背景 */
    border-color: rgba(255, 255, 255, 1); /* 鼠标悬停时边框变为纯白 */
    transform: translateY(-2px); /* 鼠标悬停时轻微上移 */
}

/* Byline Section */
.byline {
    margin: 40px 20px;
    padding: 20px;
    background-color: inherit; /* 适应当前主题（夜间/白天） */
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.byline-container {
    display: flex;
    flex-wrap: wrap; /* 适应小屏幕，自动换行 */
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    justify-content: space-around;
}

/* Columns */
.byline-column {
    flex: 1;
    min-width: 200px; /* 每列最小宽度 */
}

.byline-column h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: inherit; /* 适应主题色 */
}

.byline-column p {
    margin: 8px 0;
    font-size: 1rem;
    color: inherit; /* 适应主题色 */
}

/* Links */
.author-link, .affiliation-link {
    text-decoration: none;
    font-weight: 500;
    color: inherit;
    transition: color 0.3s ease;
}

.author-link:hover, .affiliation-link:hover {
    color: #FFD700; /* 鼠标悬停时的高亮颜色 */
}

/* Superscript Styling */
.byline-column p sup {
    font-size: 0.8rem;
    vertical-align: top;
    margin-left: 5px;
    color: #AAAAAA; /* 次要信息用浅灰色 */
}

/* Responsive Design */
@media (max-width: 768px) {
    .byline-container {
        flex-direction: column; /* 小屏幕下垂直布局 */
        align-items: center;
    }

    .byline-column {
        flex: none;
        width: 100%;
        text-align: center;
    }

    .byline-column h3 {
        margin-top: 20px;
    }
}


.double-column {
    --left-width: 0.5; /* 默认左栏宽度比例为0.5 (50%) */
    display: grid;
    grid-template-columns: calc(var(--left-width) * 100%) calc((1 - var(--left-width)) * 100%);
    gap: 2rem;
    margin: 2rem 0;
}

.double-column .left-column,
.double-column .right-column {
    width: 100%;
}

.card {
    --card-padding: 1.5rem;
    --card-radius: 12px;
    position: relative;
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

/* 卡片背景 */
.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 卡片内容容器 */
.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 卡片标题 */
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: inherit;
}

/* 卡片主体内容 */
.card-body {
    flex: 1;
}

/* 暗色背景时的文字颜色 */
.card.dark-theme {
    color: #ffffff;
}

/* 卡片悬停效果 */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 背景叠加层（用于确保文字可读性） */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.card.dark-theme .card-overlay {
    opacity: 1;
}

.flip-container {
  position: relative;
  width: 100%;
  perspective: 1000px;
}

.flip-inner {
  position: relative;
  width: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-container:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  width: 100%;
  backface-visibility: hidden;
  border-radius: var(--card-radius);
}

.flip-front img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--card-radius);
}

.flip-back {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.flip-back img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--card-radius);
  background: #ffffff;
}

.head-content {
    font-size: 1.1rem;
    color: #444;
    max-width: 1500px;
}

@media (max-width: 768px) {
    .double-column {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
@media (max-width: 768px) {
    .head-content {
        font-size: 1rem;
        color: #444;
        padding: 0 2rem;
    }
    .card {
        width: 100%;
    }
    .banner {
        padding: 1rem 2rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        padding: 80px 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .overlay.active {
        display: block;
    }

    /* 汉堡菜单动画 */
    .menu-toggle.active span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    main {
        padding: 1rem;
    }
}

.banner {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

@media (min-width: 2000px) {
    .container {
        max-width: 1400px;
    }
    .content {
        max-width: 1400px;
    }
}

/* 中等宽度屏幕适配 */
@media (max-width: 1200px) {
    .container {
        max-width: 900px;
    }
    .content {
        max-width: 900px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;

}
