/* =========================================
   全局重置与防溢出（消灭双滚动条）
========================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden; /* 核心：彻底禁止网页外层出现滚动条 */
}

ul, li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* =========================================
   主容器 Flexbox 布局
========================================= */
#wrapper {
    display: flex;
    width: 100%;
    height: 100vh; /* 撑满 iframe 高度 */
    background-color: #fff;
    box-sizing: border-box;
}

/* =========================================
   左侧边栏
========================================= */
#left-side {
    width: 180px;
    background-color: #fbfbfb;
    flex-shrink: 0; /* 防止被压缩 */
}

#left-side ul {
    display: flex;
    flex-direction: column;
}

#left-side ul li {
    height: 60px; /* 固定高度，方便右侧线条精准对齐 */
    display: flex;
    align-items: center;
    padding-left: 30px;
    color: #888888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#left-side ul li:hover {
    color: #333333;
    background-color: #f5f5f5;
}

#left-side ul li.active {
    color: #FF6B00; /* MakaGiC 橙 */
    background-color: #ffffff;
}

/* =========================================
   中间的动画线条 (由 script.js 控制类名)
========================================= */
#border {
    width: 1px;
    background-color: #eeeeee;
    position: relative;
    z-index: 2;
}

#line {
    width: 3px;
    height: 60px; /* 必须和左侧 li 的高度一致 */
    background-color: #FF6B00;
    position: absolute;
    left: -1px;
    top: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* 平滑滑动动画 */
}

/* 配合你的 script.js 中的 .one .two .three 类 */
#line.one   { transform: translateY(0); }
#line.two   { transform: translateY(60px); }
#line.three { transform: translateY(120px); }
#line.four  { transform: translateY(180px); }

/* =========================================
   右侧内容区 (解决滚动的关键)
========================================= */
#right-side {
    flex: 1;
    height: 100%;
    padding: 30px 40px;
    box-sizing: border-box;
    overflow-y: auto; /* 只允许右侧内部滚动 */
    overflow-x: hidden;
    position: relative;
}

/* 优化内置滚动条样式，使其不显眼 */
#right-side::-webkit-scrollbar {
    width: 6px;
}
#right-side::-webkit-scrollbar-track {
    background: transparent;
}
#right-side::-webkit-scrollbar-thumb {
    background: #dddddd;
    border-radius: 10px;
}
#right-side::-webkit-scrollbar-thumb:hover {
    background: #bbbbbb;
}

/* =========================================
   Tab 内容切换逻辑
========================================= */
#first, #second, #third, #fourth {
    display: none; /* 默认隐藏所有 */
}

/* 激活态：显示并加上淡入动画 */
#first.active, #second.active, #third.active, #fourth.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   内容排版细节
========================================= */
h3 {
    font-size: 20px;
    color: #222222;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #FF6B00;
    display: inline-block;
    padding-bottom: 8px;
}

.load {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.load span {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
}

.load a {
    text-decoration: none;
    color: #FF6B00;
    border: 1px solid #FF6B00;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.load a .iconfont {
    margin-right: 6px;
    font-size: 14px;
}

.load a:hover {
    background-color: #FF6B00;
    color: #ffffff;
}

/* =========================================
   移动端响应式 (Shopify 窄屏适配)
========================================= */
@media (max-width: 600px) {
    #wrapper { flex-direction: column; }
    #left-side { width: 100%; height: auto; border-bottom: 1px solid #eee; }
    #left-side ul { flex-direction: row; }
    #left-side ul li { flex: 1; height: 45px; padding-left: 0; justify-content: center; }
    
    #border { width: 100%; height: 1px; }
    #line { width: 33.33%; height: 2px; top: -1px; left: 0; }
    
    /* 移动端横向滑动 */
    #line.one   { transform: translateX(0); }
    #line.two   { transform: translateX(100%); }
    #line.three { transform: translateX(200%); }
    
    #right-side { padding: 20px; }
    .load { flex-direction: column; align-items: flex-start; }
    .load a { margin-top: 10px; width: 100%; justify-content: center; box-sizing: border-box; }
}