/* 强制所有元素包含内边距和边框，防止撑破宽度 */
* {
    box-sizing: border-box;
}

/* Conference Desktop Styles (>=1200px) */
:root {
    --conf-primary: #0a1128;
    --conf-accent: #3498db;
    --conf-bg: #f8f9fa;
    --conf-text: #2c3e50;
    --conf-text-light: #7f8c8d;
    --conf-card-bg: #ffffff;
    --conf-border: #ecf0f1;
}

body {
    background-color: var(--conf-bg);
    color: var(--conf-text);
    font-family: 'Noto Sans SC', sans-serif;
}

/* Hero Section */
.conf-hero {
    padding: calc(160px * var(--hero-ratio, 1)) calc(20px * var(--hero-ratio, 1)) calc(100px * var(--hero-ratio, 1));
    height: calc(450px * var(--hero-ratio, 1));
    box-sizing: border-box;
    background-image: linear-gradient(135deg, rgba(10, 17, 40, 0.9) 0%, rgba(20, 30, 48, 0.8) 100%), url('../../assets/images/conference-hero.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    text-align: center;
    color: white;
    margin-bottom: 40px;
    border-radius: 0 0 40px 40px;
}

.conf-hero-content {
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.conf-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
}

.conf-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    letter-spacing: 1px;
    font-weight: 300;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Container */
.conf-main {
    max-width: none;
    margin: 0 auto;
    padding: 0 30px 80px;
}

.conf-section-title {
    text-align: center;
    margin-bottom: 50px;
}

.conf-section-title h2 {
    font-size: 2.5rem;
    color: var(--conf-primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.conf-section-title p {
    color: var(--conf-text-light);
    font-size: 1.1rem;
}

/* Dimensions Grid */
.conf-dimensions-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    /* Force 5 columns, allow shrinking */
    gap: 25px;
    /* Static gap, desktop-scale.js zooms it */
    margin-bottom: 100px;
}

.conf-dimension-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    /* Static padding, desktop-scale.js zooms it */
    position: relative;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 220px;
    /* Back to fixed height for consistency in row */
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

/* ... existing styles ... */

/* Event Indicators (Pills) */
.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Reduced gap slightly */
    flex: 1;
}

.calendar-event-dot {
    font-size: 0.75rem;
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 6px;
    /* Default base style */
    background: #e0f2fe;
    color: #0369a1;
    white-space: normal;
    /* Allow wrapping */
    word-break: break-word;
    /* Break long words if needed */
    display: block;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid #0ea5e9;
    line-height: 1.3;
    /* Better line height for wrapped text */
}

.conf-dimension-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color, #3498db);
    opacity: 0;
    transition: opacity 0.3s;
}

.conf-dimension-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.conf-dimension-card:hover::before {
    opacity: 1;
}

.conf-card-number {
    position: absolute;
    top: 0px;
    right: 15px;
    font-size: 6rem;
    /* Static size, scales with body zoom */
    font-weight: 800;
    color: var(--accent-color, #3498db);
    opacity: 0.15;
    line-height: 1;
    pointer-events: none;
    font-family: 'Arial', sans-serif;
    transition: all 0.3s;
}

.conf-dimension-card:hover .conf-card-number {
    opacity: 0.1;
    transform: scale(1.1) rotate(5deg);
}

.conf-card-content {
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

.conf-dimension-name {
    font-size: 1.5rem;
    /* Static Title, scales with root */
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    position: relative;
    word-break: break-word;
}

.conf-dimension-subtitle {
    font-size: 1rem;
    /* Static Subtitle, scales with root */
    color: #7f8c8d;
    line-height: 1.5;
    font-weight: 500;
}

.conf-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: none;
    /* Remove default border if needed, or keep */
}

.conf-topic-badge {
    background: #f8f9fa;
    color: #7f8c8d;
    font-size: 0.8rem;
    /* Static Badge, scales with root */
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #eee;
    transition: all 0.3s;
    white-space: nowrap;
}

.conf-dimension-card:hover .conf-topic-badge {
    background: white;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.conf-card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-color, #3498db);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.conf-card-arrow i {
    font-style: normal;
}

.conf-dimension-card:hover .conf-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Accent Colors */
.conf-dimension-card:nth-child(1) {
    --accent-color: #e74c3c;
}

.conf-dimension-card:nth-child(2) {
    --accent-color: #3498db;
}

.conf-dimension-card:nth-child(3) {
    --accent-color: #9b59b6;
}

.conf-dimension-card:nth-child(4) {
    --accent-color: #1abc9c;
}

.conf-dimension-card:nth-child(5) {
    --accent-color: #f39c12;
}

.conf-dimension-card:nth-child(6) {
    --accent-color: #2ecc71;
}

.conf-dimension-card:nth-child(7) {
    --accent-color: #34495e;
}

.conf-dimension-card:nth-child(8) {
    --accent-color: #d35400;
}

.conf-dimension-card:nth-child(9) {
    --accent-color: #16a085;
}

.conf-dimension-card:nth-child(10) {
    --accent-color: #c0392b;
}

/* Timeline - Desktop */
.conf-timeline-section {
    padding: 80px 0;
    background: #fff;
    position: relative;
}

.conf-timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.conf-timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(to bottom, #3498db, #9b59b6);
    transform: translateX(-50%);
    border-radius: 2px;
}

.conf-timeline-item {
    width: 50%;
    display: flex;
    position: relative;
    padding-bottom: 50px;
}

.conf-timeline-item:nth-child(odd) {
    justify-content: flex-end;
    text-align: right;
    padding-right: 40px;
    left: 0;
}

.conf-timeline-item:nth-child(even) {
    justify-content: flex-start;
    text-align: left;
    padding-left: 40px;
    left: 50%;
}

.conf-timeline-dot {
    position: absolute;
    top: 0;
    right: -11px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #3498db;
    z-index: 2;
    transition: transform 0.3s;
}

.conf-timeline-item:hover .conf-timeline-dot {
    transform: scale(1.2);
    background: #3498db;
}

.conf-timeline-item:nth-child(even) .conf-timeline-dot {
    right: auto;
    left: -11px;
    border-color: #9b59b6;
}

.conf-timeline-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    width: 100%;
    border-top: 4px solid #3498db;
}

.conf-timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* =========================================
   Timeline Header & Calendar Nav (Ported)
   ========================================= */

.conf-timeline-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    text-align: center;
}

.conf-timeline-header>div:first-child h2 {
    font-size: 2.5rem;
    color: #0a1128;
    margin-bottom: 15px;
    font-weight: 700;
}

.conf-timeline-header>div:first-child p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.calendar-current-month {
    font-size: 1.5rem;
    font-weight: 700;
}

.calendar-nav-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #64748b;
    font-size: 1.2rem;
}

.calendar-nav-btn:hover {
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    color: #334155;
    transform: scale(1.05);
}

/* =========================================
   Calendar Popover & Colors (Ported)
   ========================================= */

/* Popover Styles */
/* ... (existing styles) ... */

/* =========================================
   Calendar Grid & Events Base (Ported)
   ========================================= */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: none;
}

.calendar-week-header {
    text-align: center;
    font-weight: 600;
    color: #94a3b8;
    padding: 10px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Day Cells */
.calendar-day-cell {
    min-height: 110px;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.calendar-day-cell:hover {
    border-color: #bfdbfe;
    box-shadow: 0 8px 16px rgba(50, 100, 255, 0.08);
    transform: translateY(-2px);
    z-index: 2;
}

.calendar-day-cell.other-month {
    background: #f8fafc;
    border-color: transparent;
    opacity: 0.6;
    pointer-events: none;
}

.calendar-day-cell.today {
    background: #fff;
    border: 2px solid #3b82f6;
    position: relative;
}

.calendar-day-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-day-cell.today .calendar-day-number {
    color: #3b82f6;
}

.calendar-day-cell.today .calendar-day-number::after {
    content: '今天';
    /* English Translation */
    font-size: 0.65rem;
    background: #eff6ff;
    color: #3b82f6;
    padding: 2px 6px;
    border-radius: 100px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Event Indicators (Pills) */
.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.calendar-event-dot {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
    /* Default base style */
    background: #e0f2fe;
    color: #0369a1;

    /* MODIFIED: English Truncation */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* word-break: break-word; -- Removed */

    display: block;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid #0ea5e9;
}

.calendar-event-dot:hover {
    transform: translateX(2px);
    filter: brightness(0.95);
}

.calendar-event-more {
    font-size: 0.7rem;
    color: #94a3b8;
    text-align: center;
    margin-top: auto;
    font-weight: 600;
    padding-top: 4px;
}

/* Popover Styles - See bottom of file for latest overrides */
/* 
.calendar-popover { ... } 
*/

@keyframes popoverFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);

    /* 头部样式微调，留出关闭按钮空间 */
    padding-right: 40px;
    /* 增加右内边距，给关闭按钮留位 */
    /* 防止文字被关闭按钮遮挡 */
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.popover-title {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 700;
}

.popover-header span:last-child {
    font-size: 0.75rem;
    background: #f1f5f9;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.popover-timeline-item {
    position: relative;
    padding: 8px;
    /* 进一步减小内边距 */
    margin-bottom: 6px;
    /* 进一步减小间距 */
    border-left: 2px solid #e2e8f0;
    /* 边框变细 */
    border-radius: 4px;
    /* 圆角变小 */
    cursor: pointer;
    transition: all 0.2s;
}

.popover-timeline-item:last-child {
    margin-bottom: 0;
    border-left-color: transparent;
}

.popover-time {
    font-size: 0.6rem;
    /* 字体极小 */
    color: #94a3b8;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 2px;
}

/* Popover Item Variants */
.popover-timeline-item.type-1 {
    background: #f0f9ff;
    border-left-color: #0ea5e9;
}

.popover-timeline-item.type-2 {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.popover-timeline-item.type-3 {
    background: #fefce8;
    border-left-color: #eab308;
}

.popover-timeline-item.type-4 {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.popover-timeline-item.type-5 {
    background: #faf5ff;
    border-left-color: #a855f7;
}

.popover-timeline-item:hover {
    filter: brightness(0.97);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Calendar Event Dot Colors */
.calendar-event-dot.type-1 {
    background: #e0f2fe;
    color: #0369a1;
    border-left: 3px solid #0ea5e9;
}

.calendar-event-dot.type-2 {
    background: #f0fdf4;
    color: #15803d;
    border-left: 3px solid #22c55e;
}

.calendar-event-dot.type-3 {
    background: #fefce8;
    color: #a16207;
    border-left: 3px solid #eab308;
}

.calendar-event-dot.type-4 {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 3px solid #ef4444;
}

.calendar-event-dot.type-5 {
    background: #f3e8ff;
    color: #7e22ce;
    border-left: 3px solid #a855f7;
}


/* 1. 弹窗基础样式：改为 Fixed 定位，吸附屏幕 */
.calendar-popover {
    position: fixed;
    /* 核心修改：固定在窗口，不随页面滚动移出视野 */
    z-index: 10000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    /* 圆角变小 */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);

    /* 尺寸策略：整体缩小 */
    width: 260px;
    /* 再次缩小 */
    min-width: 240px;
    /* 限制最大宽度，防止盖住整个屏幕 */
    max-width: 90vw;

    display: none;
    flex-direction: column;
    padding: 12px;
    /* 再次减小内边距 */

    /* 动画：轻微的缩放淡入 */
    animation: popoverFadeIn 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 2. 宽屏模式适配 */
.calendar-popover.wide-2 {
    width: 500px !important;
    /* 原 600px */
    max-width: 90vw !important;
}

.calendar-popover.wide-3 {
    width: 600px !important;
    /* 原 800px，缩回来 */
    max-width: 95vw !important;
}

/* 3. 内容区域：尽量展示全部，迫不得已才滚动 */
.popover-body {
    overflow-y: auto;
    /* 只有当内容真的撑破屏幕时才滚动 */
    flex: 1;
    padding-right: 5px;

    /* Grid 布局保持不变 */
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.calendar-popover.wide-2 .popover-body {
    grid-template-columns: 1fr 1fr;
}

.calendar-popover.wide-3 .popover-body {
    grid-template-columns: 1fr 1fr 1fr;
}

/* 关闭按钮 */
.popover-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 20;
}

.popover-close-btn:hover {
    background: #ef4444;
    color: white;
}

/* 移动端适配 */
/* 移动端/窄屏适配 */
@media screen and (max-width: 768px) {
    .calendar-popover {
        /* 改为头部吸附，防止高度过高时顶部被裁减 */
        top: 20px !important;
        left: 50% !important;
        transform: translate(-50%, 0) !important;
        width: 95vw !important;
        max-height: 90vh !important;

        display: flex;
        flex-direction: column;
    }
}