/* 基本設定 */
.container-2 {
    font-family: Arial, sans-serif;
    color: #fff;
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 10px;
}

video
 { 
    width: 100%; 
    height: auto; 
 }


/* 標頭 */
.header-2 {
    text-align: center;
    margin-bottom: 30px;
}
.header-2 h1 {
    font-size: 1.8em;
    color: rgb(0, 194, 222); /* AMD 綠色調 */
}
.header-2 p {
    font-size: 1.2em;
    font-weight: bold;
}

/* 內容區塊 - 左右排版 */
.content-2 {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 4px;
}

/* 兩側架構圖 */
.architecture-2 {
    flex: 1;
    border-radius: 8px;
}
.architecture-2 h2 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 20px;
}

/* VS 分隔線 */
.vs-separator-2 {
    font-size: 1.2em;
    font-weight: bold;
    align-self: center; /* 讓它在中間對齊 */
    padding: 0 5px;
    color: #ffffff;
}

/* --- 統一記憶體架構 (左側) 樣式 --- */

.processor-block-2 {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}
.unit-2 {
    width: 80px;
    height: 80px;
    background-color: #666;
    border: 3px solid #777;
    border-radius: 5px;
    text-align: center;
    padding: 5px;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.logo-2 {
    font-size: 0.7em;
    align-self: flex-start;
}
.unified-memory-2 {
    background-color: #007bff; /* 突出顯示統一記憶體 */
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    position: relative;
    text-align: center;
}
.memory-title-2 {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
}
.memory-specs-2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.ram-visual-2 {
    background-color: #555;
    padding: 10px 20px;
    border: 2px solid #aaa;
    height: 30px;
    line-height: 10px;
    margin: 0 10px;
}
.spec-left-2, .spec-right-2 {
    text-align: center;
    font-size: 0.9em;
}

/* --- 傳統記憶體架構 (右側) 樣式 --- */

.dual-block-2 {
    display: flex;
    justify-content: space-around;
    position: relative;
    margin-top: 50px; /* 增加頂部空間以便放置 PCIe 線 */
}
.cpu-ram-side-2, .gpu-vram-side-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cpu-traditional-2 { margin-bottom: 20px; }
.ram-2, .vram-2 {
    background-color: #3e8e41; /* 不同的記憶體顏色 */
    width: 100px;
    height: 40px;
    line-height: 40px;
    margin-top: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}
.ram-specs-2, .vram-specs-2 {
    font-size: 0.9em;
    text-align: center;
}

/* PCIe 視覺化 (使用定位) */
.pcie-2 {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    color: #ffc107; /* 黃色強調 */
}

/* --- 特點區塊 --- */
.features-2 {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #555;
}
.features-2 p {
    margin: 5px 0;
}

.features-2 span{
    font-weight: 900;
    color: rgb(0, 194, 222);
    font-size: 24px;
}

/* ------------------------------------------- */
/* --- RWD 響應式調整 (Media Query) --- */
/* ------------------------------------------- */

/* 當螢幕寬度小於或等於 768px 時 */
@media (max-width: 768px) {
    
    /* 1. 改變主內容區塊的排列方式 */
    .content-2 {
        flex-direction: column; 
        align-items: stretch;
    }
    
    /* 2. 處理 VS 分隔符 */
    .vs-separator-2 {
        align-self: center;
        margin: 20px 0;
        padding: 0;
    }

    /* 3. 調整處理器區塊的佈局 */
    .processor-block-2 {
        flex-wrap: wrap; 
        justify-content: center;
        gap: 10px;
    }
    
    .unit-2 {
        width: 70px;
        height: 70px;
    }

    /* 4. 調整傳統架構的雙區塊 */
    .dual-block-2 {
        flex-direction: column;
        gap: 40px; 
        margin-top: 20px;
    }
    
    /* 5. PCIe 定位調整 */
    .pcie-2 {
        position: static;
        text-align: center;
        margin-top: -10px;
        margin-bottom: 20px;
    }

    /* 6. 確保所有架構區塊的標題置中 */
    .architecture-2 h2 {
        font-size: 1.3em;
    }
}


/* 容器基本樣式 */
.performance-container-3 {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

/* --- 頂部 Logo 區塊 --- */
.logo-bar-3 {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 50px;
}
.amd-logo-3 {
    background-color: #191919;
    padding: 10px 15px;
    border-radius: 5px 0 0 5px;
    text-align: left;
    line-height: 1.1;
    font-size: 0.9em;
    font-weight: bold;
}
.amd-logo-3 p:first-child { color: #fff; font-size: 1.2em; }
.amd-logo-3 p:nth-child(2) { color: rgb(0, 194, 222); font-size: 1.2em; }
.amd-logo-3 p:last-child { color: #aaa; font-size: 0.7em; }

.lm-studio-logo-3 {
    background-color: #33334d;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    font-size: 1.1em;
    font-weight: bold;
}

/* --- 數據比較主區塊 --- */
.comparison-row-3 {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 50px;
}

.data-block-3 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 15px;
}

.descriptor-3 {
    text-transform: uppercase;
    font-size: 1em;
    color: rgb(0, 194, 222); /* 藍綠色 */
    margin-bottom: -10px;
    align-self: flex-start;
    margin-left: 20%; /* 讓它在數字上方左對齊 */
}

.main-number-3 {
    font-size: 6em;
    font-weight: 800;
    color: rgb(0, 194, 222);
    line-height: 1;
    margin: 0;
}

.unit-3 {
    font-size: 0.5em; /* 相對於 main-number-3 */
    font-weight: 400;
    margin-left: -5px;
    vertical-align: middle;
    line-height: 1.5;
}

.metric-3 {
    font-size: 1em;
    color: rgb(0, 194, 222);
    margin-top: -15px;
    margin-bottom: 5px;
}

.description-3 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.separator-3 {
    width: 80%;
    border: none;
    border-top: 1px solid #333;
    margin: 0px 0 6px;
}

.comparison-text-3 {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 2px;
    color: rgb(0, 194, 222); /* AMD 藍色 */
}

.vs-text-3 {
    font-size: 0.8em;
    color: #FFFFFF;
}

/* --- 底部備註區塊 --- */
.footer-notes-3 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 30px auto 0;
    padding-top: 4px;
    font-size: 0.8em;
    color: #777;
    text-align: left;
}
.note-left-3 {
    flex: 2;
    padding-right: 20px;
}
.note-right-3 {
    flex: 1;
    text-align: right;
}

/* ------------------------------------------- */
/* --- RWD 響應式調整 (Media Query) --- */
/* ------------------------------------------- */

/* 當螢幕寬度小於或等於 992px 時，開始調整 */
@media (max-width: 992px) {
    .main-number-3 {
        font-size: 6em; /* 稍微縮小數字 */
    }
    .description-3 {
        font-size: 1.3em;
    }
    .logo-bar-3 {
        justify-content: center; /* Logo 置中 */
    }
}

/* 當螢幕寬度小於或等於 768px 時，強制垂直堆疊 */
@media (max-width: 768px) {
    .comparison-row-3 {
        flex-direction: column; /* 垂直堆疊 */
        gap: 40px;
    }
    
    .data-block-3 {
        padding: 0;
        text-align: center;
    }

    .descriptor-3 {
        align-self: center; /* 描述符置中 */
        margin-left: 0;
    }

    .main-number-3 {
        font-size: 5em; /* 進一步縮小 */
    }

    .footer-notes-3 {
        flex-direction: column;
        text-align: center;
    }
    .note-left-3, .note-right-3 {
        padding-right: 0;
        margin-bottom: 10px;
        text-align: center;
    }
}


/* 主要容器樣式 (維持不變) */
.tabs-container-4 {
    max-width: 1000px;
    margin: 30px auto;
    overflow: hidden;
}

/* Tab 按鈕群組的樣式 (維持 Flexbox，以便於 RWD 調整) */
.tab-buttons-4 {
    display: flex; /* 讓按鈕預設並排 */
}

/* 單個 Tab 按鈕的樣式 */
.tab-button-4 {
    background-color: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: background-color 0.3s;
    font-size: 18px;
    flex-grow: 1; /* 讓按鈕平均分配寬度 */
    /* 新增：確保文字不會溢出 */
    text-align: center; 
    white-space: nowrap; 
    color: #FFFFFF;
    margin: 8px;
    background-color: #5a46dc;
    border-radius: 10px;
}

/* 滑鼠懸停時的按鈕樣式 */
.tab-button-4:hover {
    background-color: #30266e;
}

/* 被選中/激活 (active) 的按鈕樣式 */
.tab-button-4.active-4 {
    background-color: rgb(0, 194, 222);
    color: #FFFFFF;
    border-bottom: 3px solid #5a46dc;
    font-weight: bold;
}

/* Tab 內容容器的樣式 */
.tab-content-container-4 {
    padding: 20px;
}

/* 單個 Tab 內容的樣式 - 預設隱藏 */
.tab-content-4 {
    display: none; 
}

/* 激活 (active) 的內容樣式 - 顯示 */
.tab-content-4.active-content-4 {
    display: block;
    animation: fadein 0.5s;
}

/* 淡入動畫效果 */
@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==================================== */
/* 📱 RWD 響應式設計：媒體查詢 */
/* ==================================== */

/* 當螢幕寬度小於或等於 600px 時 (適用於大多數手機) */
@media screen and (max-width: 600px) {
    
    /* 1. 調整按鈕群組：從水平 Flex 變成垂直堆疊 */
    .tab-buttons-4 {
        flex-direction: column; /* 將主軸方向改為垂直 */
    }

    /* 2. 調整單個按鈕：移除底部邊線並使用完整的寬度 */
    .tab-button-4 {
        display: block; /* 確保佔滿一行 */
        width: 97%;
        border-bottom: 1px solid #5733dc; /* 在垂直堆疊時，底部需要邊線來區分按鈕 */
        padding: 10px 15px; /* 稍微縮小垂直間距 */
        font-size: 16px; /* 稍微縮小字體 */
    }
    
    /* 3. 修正被選中按鈕的樣式：因為現在是垂直堆疊，邊線要在左側或底側 */
    .tab-button-4.active-4 {
        border-bottom: 1px solid #007bff; /* 保持底線樣式 */
        background-color: rgb(0, 194, 222); /* 在手機上使用更明顯的背景色 */
    }
    
    /* 4. 內容邊距調整：在手機上減少主容器和內容的邊距 */
    .tabs-container-4 {
        margin: 0; /* 在小螢幕上佔滿寬度 */
        border-radius: 0;
    }

    .tab-content-container-4 {
        padding: 15px;
    }
}

/* 晶片切換 */

/* 圖片容器樣式 (維持不變) */
.gallery-container-5 {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px; 
}

/* 圖片展示區塊 (維持不變) */
.image-display-5 {
    position: relative; /* 確保子元素可以相對定位 */
    cursor: default; /* 移除點擊圖片切換的游標 */
    overflow: hidden; 
}

/* 響應式圖片樣式 (維持不變) */
.responsive-image-5 {
    width: 100%;
    height: auto; 
    display: block;
    transition: opacity 0.3s ease-in-out; 
}

/* 圖片標號計數器樣式 (維持不變) */
.image-counter-5 {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6); 
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 10;
}

/* ==================================== */
/* 🆕 新增：導航按鈕樣式 */
/* ==================================== */
.gallery-nav-button-5 {
    cursor: pointer;
    position: absolute;
    top: 50%; /* 垂直置中 */
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: background-color 0.4s ease;
    border-radius: 0 3px 3px 0; /* 預設為左側按鈕的圓角 */
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    user-select: none; /* 防止文字被選中 */
    z-index: 5;
    opacity: 0.9;
}

/* 導航按鈕懸停時效果 */
.gallery-nav-button-5:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

/* 定位前一張按鈕 */
.prev-button-5 {
    left: 0;
    border-radius: 0 8px 8px 0; 
}

/* 定位後一張按鈕 */
.next-button-5 {
    right: 0;
    border-radius: 8px 0 0 8px; /* 修正圓角 */
}


/* 圖片切換動畫 Class (維持不變) */
.responsive-image-5.fade-in-5 {
    animation: fadeInAnimation-5 0.5s forwards;
}

@keyframes fadeInAnimation-5 {
    from { opacity: 0.2; }
    to { opacity: 1; }
}

/* ==================================== */
/* 📱 RWD 響應式設計：媒體查詢 */
/* ==================================== */

/* 當螢幕寬度小於或等於 768px 時 */
@media screen and (max-width: 768px) {
    
    .gallery-container-5 {
        margin: 10px auto; 
        padding: 0 10px; 
    }

    /* 導航按鈕在小螢幕上縮小 */
    .gallery-nav-button-5 {
        font-size: 16px;
        padding: 12px;
    }
}

/* 當螢幕寬度小於或等於 480px 時 */
@media screen and (max-width: 480px) {
    
    .gallery-container-5 {
        padding: 0 5px; 
    }

    .image-counter-5 {
        font-size: 12px;
        padding: 3px 8px;
        bottom: 5px;
        right: 5px;
    }

    /* 導航按鈕在極小螢幕上更進一步縮小 */
    .gallery-nav-button-5 {
        font-size: 14px;
        padding: 8px;
    }
}