body { 
    font-family: Arial, sans-serif; 
    /*display: flex; 
    justify-content: center;*/ 
    /*padding: 20px;*/ 
}

/*.topic-7 {
    width: 100%;
    max-width: 900px;
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}*/

.topic-7 {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
}

.topic-7::before {
    content: "";
  position: fixed;
  
  /* 1. 把位置網左上拉：大幅減少負值，讓核心圓環往畫布內移動 */
  right: -50px;         /* 原本是 -200px，往左拉回 150px */
  bottom: -50px;        /* 原本是 -200px，往上拉回 150px */
  
  /* 2. 縮放控制：在不同螢幕下都能保持適當大小，避免大螢幕看太小、小螢幕看太大 */
  width: min(45vw, 650px); 
  aspect-ratio: 1 / 1;
  
  background-image: url("Multi-gap\ toroid\ flux\ simulation_v2.png");
  background-size: contain;
  background-position: bottom right;
  background-repeat: no-repeat;
  
  /* 3. 保持清晰背景板的感覺 */
  mix-blend-mode: multiply; 
  opacity: 0.18;         /* 稍微提高一點透明度，讓橘色和線條層次更分明 */
  
  /* 4. 局部羽化收尾：只讓圖片的最左側與最上側微微淡出，保留下方和右方的完整圓環圖案 */
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%),
                      linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%),
              linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%);
  mask-composite: intersect;

  z-index: -1;
  pointer-events: none;
  user-select: none;    
}

.headline1 {
    color: rgb(252, 139, 31);
    font-size: 28px;
    text-align: left;
    margin-bottom: 10px; 
    width: 100%; 
}

.diagram-top {
    text-align: center;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}

.diagram-top img {
    width: 500px; /*這個寬度跟其他幾個Multi-gap design的設定不一樣*/
    max-width: 100%; 
    height: auto; 
    display: block;
    margin-left: auto;  
    margin-right: auto; 
    flex-shrink: 0; 
}

.input-title {
    color: #1a3b7a; 
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
}

.card {
    background: #ffffff;
    border-radius: 6px;
    padding: 34px 30px; /*跟Multi-gap EE-core.css的左右兩邊padding不一樣*/
    gap: 14px;
    display: flex; 
    flex-direction: column;
    width: 100%; 
    box-sizing: border-box; 
    box-shadow: 0px 4px 8px 0px rgba(246, 246, 246, 1);
    backdrop-filter: blur(5px);
    margin: 20px 0; 
    border: 1px solid #f0f0f0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

th {
    background-color: #1a3b7a;
    color: #ffffff;
    padding: 14px;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border-right: 1px solid rgba(255, 255, 255, 0.25); 
}

th:last-child {
    border-right: none; 
}

td {
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #edf2f7;
    background-color: #ffffff;
    padding: 12px 4px; /*跟Multi-gap EE-core.css的左右padding不同*/
    text-align: center;
}

td:last-child {
    border-right: none;
}

tr:hover td {
    background-color: #f8fafc;
}

input[type="number"] {
    width: 85%;
    max-width: 120px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    color: #334155;
    background-color: #f8fafc;
    transition: all 0.2s ease-in-out;
}

input[type="number"]:focus {
    outline: none;
    border-color: #1a3b7a;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 59, 122, 0.15);
}

.middle-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 右側輸入區 */
.middle-right {
    flex: 1;
}

.middle-right p {
    color: #1a3b7a; /* 標題深藍色 */
    font-size: 18px;
    margin-bottom: 15px;
}

.input-group{
    gap: 7px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

input[type="number"], input[type="text"] {
    background: transparent;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ccc !important;
    border-radius: 6px;
    padding: 6px;
    width: 80px !important; /* 統一加寬一點較美觀 */
    outline: none;
}


/* 附註文字樣式 */
.note {
    font-size: 11px;
    color: #666;
    margin-top: -7px;
    margin-left: 17px;
    margin-bottom: 10px;
    text-align: left;
}

/* 下方選擇區域 */
.material-section {
    text-align: center;
    font-size: 14px;
}

/* 下拉選單樣式：淡黃色背景 */
select#material {
    background-color: #ffffff; /* 圖片中的淡黃色 */
    border: 1px solid #e0b801;
    border-radius: 6px;
    padding: 5px;
    width: 120px !important;
    cursor: pointer;
}

    /* 模擬圖片中的按鈕 (可選) */
.btn-execute {
    background-color: #1a3b7a;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

/* 輸出區域總容器 */
.output-section {
    max-width: 800px;
    margin-top: 14px;
}

.output-section u {
    color: #333;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px solid #333;
    display: inline-block;
}

/* 網格佈局：每行顯示 2 或 3 個項目 */
.output-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 預設兩欄 */
    gap: 15px 40px;
    margin-bottom: 20px;
}

/* 針對 Core factors 特別設定三欄 (如 HTML 內註記) */
.output-grid[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: repeat(3, 1fr);
}

/* 輸出項目文字樣式 */
.output-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #444;
}

/* 數據結果框：淺灰色圓角背景 */
.output-box {
    min-width: 60px;
    height: 24px;
    background-color: #f2f2f2; /* 淺灰色 */
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0 8px;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
}

.ref { 
    font-size: 11px; 
    color: #888; 
    font-style: italic; 
    line-height: 1.3; }