/**
 * Timeline 插件 - PC端前台展示样式
 * 用于 show_pc.htm 页面
 */

/* ========== 时间轴插件样式 - PC端 ========== */

/* 全局容器 */
.timeline-plugin-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1px 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #ffffff;
    color: #333;
}

.timeline-plugin-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========== 标题区域 ========== */
.timeline-header {
    text-align: center;
    margin-bottom: 0px;
}

.timeline-title {
    font-size: 36px;
    font-weight: 700;
    color: #000;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.timeline-subtitle {
    font-size: 14px;
    color: #999;
    letter-spacing: 2px;
}

/* ========== 分类导航区域 ========== */
.timeline-category-nav-wrapper {
    margin-bottom: 20px;
    display: none;
}

.timeline-category-nav-wrapper.show {
    display: block;
}

.timeline-category-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 分类按钮 */
.timeline-category-btn {
    padding: 6px 24px;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    letter-spacing: 0.5px;
}

.timeline-category-btn:hover {
    border-color: #999;
    color: #333;
}

.timeline-category-btn.active {
    border-color: #000;
    background: transparent;
    color: #000;
}

/* ========== 年份导航区域 ========== */
.timeline-year-nav-wrapper {
    margin-bottom: 50px;
}

.timeline-year-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    position: relative;
}

/* 年份按钮 */
.timeline-year-btn {
    position: relative;
    padding: 0 40px 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.timeline-year-number {
    font-size: 18px;
    font-weight: 600;
    color: #999;
    transition: color 0.3s ease;
    letter-spacing: 1px;
}

.timeline-year-btn:hover .timeline-year-number {
    color: #666;
}

.timeline-year-btn.active .timeline-year-number {
    color: #000;
    font-size: 20px;
}

/* 年份下方横线 */
.timeline-line-wrapper {
    position: relative;
    width: 100%;
    height: 2px;
    background: #e5e5e5;
    margin-top: -15px;
    z-index: 1;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e5e5;
}

/* 年份标注点 */
.timeline-year-dot {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border: 2px solid #999;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 3;
}

.timeline-year-btn:hover .timeline-year-dot {
    border-color: #666;
}

.timeline-year-btn.active .timeline-year-dot {
    border-color: #000;
    background: #000;
    width: 12px;
    height: 12px;
    bottom: 9px;
}

/* ========== 内容展示区域 ========== */
.timeline-content-wrapper {
    position: relative;
    min-height: 400px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* 左右箭头 */
.timeline-nav-arrow {
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.timeline-nav-arrow:hover {
    opacity: 0.7;
}

.timeline-nav-arrow svg {
    width: 40px;
    height: 40px;
    fill: #999;
    transition: fill 0.3s ease;
}

.timeline-nav-arrow:hover svg {
    fill: #666;
}

.timeline-nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.timeline-nav-arrow.disabled:hover {
    opacity: 0.3;
}

.timeline-nav-arrow.disabled svg {
    fill: #ccc;
}

/* 内容卡片 */
.timeline-content-card {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.timeline-content-card.active {
    opacity: 1;
    transform: translateX(0);
}

/* 图片区域 */
.timeline-image-wrapper {
    width: 560px;
    flex-shrink: 0;
    height: 400px;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #f5f5f5;
    position: relative;
}

/* 使用更高优先级的选择器覆盖主系统CSS */
.timeline-plugin-wrapper .timeline-content-card .timeline-image-wrapper .timeline-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: auto !important;
    object-fit: fill !important;
    border-radius: 8px !important;
    display: block !important;
}

/* 文字区域 */
.timeline-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    max-width: 100%;
    overflow: hidden;
}

/* 年月 */
.timeline-date {
    font-size: 16px;
    font-weight: 600;
    color: #999;
    margin-bottom: 0px;
    letter-spacing: 0.5px;
    text-align: left;
    display: block;
}

/* 标题 */
.timeline-item-title {
    font-size: 26px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.5;
    letter-spacing: 0.5px;
}

/* 正文 */
.timeline-plugin-wrapper .timeline-item-content {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.9 !important;
    margin-bottom: 10px !important;
    flex: 1;
    display: -webkit-box !important;
    -webkit-line-clamp: 8 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: calc(16px * 1.9 * 8) !important;
    word-wrap: break-word !important;
    word-break: break-all !important;
    white-space: normal !important;
    max-width: 100% !important;
}

/* 确保正文内的段落行间距不被主系统CSS覆盖 */
.timeline-plugin-wrapper .timeline-item-content p {
    line-height: 1.9 !important;
    margin-bottom: 0 !important;
}

/* 分页标识 */
.timeline-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.timeline-pagination-text {
    font-size: 17px;
    font-weight: 600;
    color: #999;
}

.timeline-pagination-text .current {
    color: #000;
    font-weight: 700;
}

/* 无数据提示 */
.timeline-empty {
    text-align: center;
    padding: 100px 40px;
    color: #999;
    font-size: 16px;
}

/* 纯图片/纯文字居中显示 */
.timeline-image-wrapper.image-center {
    margin: 0 auto;
    float: none;
}

.timeline-text-wrapper.text-center {
    text-align: center;
    align-items: center;
    justify-content: center;
}

.timeline-text-wrapper.text-center .timeline-date,
.timeline-text-wrapper.text-center .timeline-item-title,
.timeline-text-wrapper.text-center .timeline-item-content {
    text-align: center;
}

/* 链接按钮容器 */
.timeline-link-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 8px;
}

/* 链接按钮 */
.timeline-link-btn,
.timeline-link-btn:link,
.timeline-link-btn:visited {
    display: inline-block;
    padding: 6px 16px;
    color: #000 !important;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #000;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    white-space: nowrap;
    width: auto;
}
.timeline-link-btn:hover,
.timeline-link-btn:focus {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* ========== 动态交互效果（通过JS控制是否应用） ========== */

/* 内容渐入动画 */
.timeline-text-wrapper.anim-fadein .timeline-date {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-text-wrapper.anim-fadein .timeline-item-title {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}
.timeline-text-wrapper.anim-fadein .timeline-item-content {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}
.timeline-text-wrapper.anim-fadein .timeline-link-wrapper {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}
.timeline-text-wrapper.anim-fadein.active .timeline-date,
.timeline-text-wrapper.anim-fadein.active .timeline-item-title,
.timeline-text-wrapper.anim-fadein.active .timeline-item-content,
.timeline-text-wrapper.anim-fadein.active .timeline-link-wrapper {
    opacity: 1;
    transform: translateY(0);
}

/* 图片从左侧滑入 */
.timeline-image-wrapper.anim-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-image-wrapper.anim-slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* 炫酷模式 - 年份标注点脉冲 */
.timeline-year-btn.active .timeline-year-dot.anim-pulse {
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0.3); }
    50% { box-shadow: 0 0 0 8px rgba(0,0,0,0); }
}

/* 内容卡片切换方向动画 */
.timeline-content-card.anim-slide-left-dir {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.timeline-content-card.anim-slide-right-dir {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.timeline-content-card.anim-slide-left-dir.active,
.timeline-content-card.anim-slide-right-dir.active {
    opacity: 1;
    transform: translateX(0);
}
