/* =========================================
   Apple 全局字体与抗锯齿渲染
   ========================================= */
body, h1, h2, h3, h4, h5, p, a, span, div {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 针对标题稍微调整字重和字距，更贴近 Apple 风格 */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    letter-spacing: -0.02em;
}
/* =========================================
   Apple 官方极简风 - 原声苹果蓝 (Apple Blue Pro)
   ========================================= */
.apple-btn {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 500; /* 苹果的字重通常控制在 400-500 之间，不显得笨重 */
    width: 100%;
    height: 54px; 
    border-radius: 980px; 
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1); 
    outline: none;
    border: none;
}

/* 🍎 主按钮 (原声苹果蓝 - 极具点击欲) */
.apple-btn-primary {
    background-color: #0071e3 !important; 
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.25); /* 带有蓝色光晕的阴影 */
}

.apple-btn-primary:hover {
    background-color: #0077ED !important; /* 悬浮时颜色微微提亮 */
    transform: scale(1.02); 
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

/* 🍎 副按钮 (极简蓝色边框 - 对应 Download) */
.apple-btn-secondary {
    background-color: transparent !important;
    color: #0071e3 !important;
    border: 1.5px solid #0071e3 !important; 
}

.apple-btn-secondary:hover {
    background-color: #0071e3 !important;
    color: #ffffff !important;
    transform: scale(1.02);
}

/* 迷人的物理按压回弹效果 */
.apple-btn:active {
    transform: scale(0.96) !important;
}

/* =========================================
   🌟 核心修复：按钮禁用状态 (解决不对称)
   ========================================= */
.is-disabled {
    opacity: 0.3 !important; /* 降低透明度，变成灰色半透明 */
    pointer-events: none !important; /* 鼠标放上去没有任何反应，不能点击 */
    cursor: not-allowed !important;
    filter: grayscale(80%); /* 褪去一些色彩 */
    box-shadow: none !important; /* 去除阴影 */
}

/* 顺便优化一下框里面“Drag & Drop”文字的字体 */
.upload-content p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 上传框内部主文字：亮白、变大、加粗 */
.upload-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #F9FAFB; /* 极具质感的冷白色 */
    font-size: 1.15rem; /* 字体放大 */
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Browse 按钮：亮青色呼应主题，带悬浮动画 */
.upload-browse {
    color: #00C6FF; /* 呼应你七彩标题里的青色 */
    cursor: pointer;
    font-weight: 700;
    padding-bottom: 2px;
    border-bottom: 2px solid rgba(0, 198, 255, 0.4); /* 苹果风的半透明下划线 */
    transition: all 0.2s ease;
}

.upload-browse:hover {
    opacity: 0.8;
    border-bottom: 2px solid rgba(0, 198, 255, 1);
}

/* 3D 可视化图表左上角的小标签（磨砂玻璃质感） */
.apple-badge {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: rgba(255, 255, 255, 0.85); /* 半透明白色底 */
    color: #374151; /* 深灰色高级字体 */
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* 极其轻微的阴影托起 */
    backdrop-filter: blur(4px); /* 苹果经典的磨砂玻璃背景模糊 */
    -webkit-backdrop-filter: blur(4px);
    top: 8px !important; /* 稍微往里收一点，不要死死贴住边缘 */
    left: 8px !important;
    z-index: 10;
}

/* 苹果风按钮基础骨架 */
.apple-btn {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    width: 100%;
    height: 54px; /* 完美的触控高度 */
    border-radius: 999px; /* 绝对圆滑的胶囊形状 */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none; /* 防止 a 标签出现下划线 */
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1); /* 苹果丝滑动画曲线 */
}

/* 迷人的物理按压回弹效果 */
.apple-btn:active {
    transform: scale(0.96);
}

/* Generate 按钮：高级 Pro 黑 */
.apple-btn-primary {
    background-color: #12ca74;
    color: #f5f5f7;
    box-shadow: 0 4px 14px rgba(29, 29, 31, 0.2);
}

.apple-btn-primary:hover {
    background-color: #333336;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.35);
}



/* ================= 3D/4D LUT 模式切换开关样式 ================= */
.lut-mode-switch {
    position: absolute;
    top: 5px;
    left: 15px;
    display: flex;
    background-color: #f1f1f3;
    border-radius: 30px;
    padding: 4px;
    z-index: 100;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.lut-mode-switch input[type="radio"] {
    display: none;
}

.switch-label {
    position: relative;
    z-index: 2;
    padding: 6px 16px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 4D 模式的专属标识 */
.spatial-tag {
    font-size: 10px;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.switch-selector {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

#mode-3d:checked ~ label[for="mode-3d"],
#mode-4d:checked ~ label[for="mode-4d"] {
    color: #1a1a1a;
}

#mode-4d:checked ~ .switch-selector {
    transform: translateX(100%);
}

@media (max-width: 768px) {
    .lut-mode-switch {
        top: -40px;
        left: 50%;
        transform: translateX(-50%);
    }
}
/* --- 4D 模式下 Cube 的 2x2 布局 --- */
.grid-4d {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}

.bin-plot-container {
    width: 100%;
    height: 100%;
    position: relative;
    border: 1px dashed #eee; /* 给小网格加一点辅助线，更像专业软件 */
}

/* 小立方体编号标签 */
.bin-tag {
    position: absolute;
    bottom: 2px;
    right: 5px;
    font-size: 10px;
    color: #999;
    pointer-events: none;
    z-index: 5;
}

/* --- Context Map 底部热力图布局 --- */
.context-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.cm-item {
    text-align: center;
}

.cm-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.cm-label {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
}


/* =========================================
   玻璃拟态胶卷侧边栏 (Glassmorphism Filmstrip)
   ========================================= */
.glass-filmstrip {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px); /* 磨砂玻璃核心属性 */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px;
    height: 250px; /* 与旁边上传框的高度保持一致 */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05), 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

/* 内部缩略图 */
.film-thumb {
    width: 100%;
    aspect-ratio: 1 / 1; /* 保持正方形 */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1; /* 🌟 修改这里：改成 1，图片完全清晰，不透明 */
}

.film-thumb:hover {
    transform: scale(1.08); /* 悬浮稍微放大 */
    border-color: rgba(255, 255, 255, 0.8);
    /* 🌟 修改这里：加深阴影，弥补去掉透明度后的交互感 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); 
}

/* 纤细的自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar {
    width: 3px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

