/* 修正 time-axis-container 的位置和边距 */
#time-axis-container {
    position: fixed;
    top: 40px; /* 贴合 Navbar 底部 */
    left: 0;
    right: 0;
    height: 40px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    z-index: var(--z-sticky);
    margin: 0;
    padding: 0;
}

/* 修正主视口的位置 */
/* 40px (Time Axis top) + 40px (Time Axis height) = 80px */
#timeline-viewport {
    position: fixed;
    top: 80px;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
    background-size: 20px 20px;
    cursor: default;
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
}

/* 调整 AI 助手悬浮按钮的位置，避免遮挡底部内容 */
.fab {
    position: fixed;
    bottom: 80px; /* 向上调整，留出空间 */
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: var(--z-fixed);
    border: none;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.fab:active {
    transform: scale(1.05);
}

/* 临时屏蔽 AI 灵感池 */
#ai-dock {
    display: none !important;
}

/* 底部工具栏响应式优化 */
#bottom-toolbar {
    bottom: 20px;
    right: 20px;
    padding: 8px 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 200;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-width: calc(100vw - 100px);
    flex-wrap: nowrap;
}

#bottom-toolbar .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 6px;
    font-size: 16px;
}

#bottom-toolbar .btn-icon .iconify {
    font-size: 18px;
}

#bottom-toolbar #zoom-select {
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 13px;
    padding: 4px 24px 4px 8px;
    border-radius: 4px;
    min-width: 70px;
    width: auto;
    max-width: 120px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    white-space: nowrap;
    overflow: visible;
}

#bottom-toolbar #zoom-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

#bottom-toolbar .separator-v {
    width: 1px;
    height: 24px;
    background: var(--color-border);
    flex-shrink: 0;
}

/* 小屏幕适配 */
@media (max-width: 480px) {
    #bottom-toolbar {
        right: 10px;
        bottom: 10px;
        padding: 6px 10px;
        gap: 6px;
    }
    
    #bottom-toolbar .btn-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 14px;
    }
    
    #bottom-toolbar #zoom-select {
        min-width: 60px;
        max-width: 100px;
        font-size: 12px;
        padding: 3px 20px 3px 6px;
    }
}

/* ========================================
   卡片编辑器 - 节点类型按钮样式修复
   ======================================== */
.node-type-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.node-type-btn .iconify {
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
}

/* 卡片编辑器时间字段图标对齐 */
#card-editor [style*="align-items: center"] .iconify {
    font-size: 16px;
    flex-shrink: 0;
}

/* 卡片编辑器关闭按钮 */
#card-editor button[onclick="closeCardEditor()"] .iconify {
    font-size: 1.2rem;
    vertical-align: middle;
}

