/* GAS 模型與專利技術專用樣式 */

/* 統一圖片容器樣式 */
.gas-image-container,
.patent-image-container {
    position: relative;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: var(--card-bg);
}

/* 統一圖片大小 */
.gas-model-img,
.patent-model-img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    object-position: center;
    background: #f8f9fa;
    border-radius: 8px;
}

/* 圖片描述區域 */
.image-description {
    padding: 1.5rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.image-description h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.image-description p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* 架構特性列表 */
.architecture-features {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.architecture-features li {
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    position: relative;
}

.architecture-features li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 模組列表樣式 */
.modules-list {
    margin-top: 1rem;
}

.module-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.module-row span {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

/* GAS 區域樣式 */
.gas-section {
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.gas-section:last-child {
    border-bottom: none;
}

.gas-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* 專利技術區域樣式 */
.patent-section {
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.patent-section:last-child {
    border-bottom: none;
}

.patent-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.patent-content-block {
    margin-bottom: 2rem;
}

.patent-content-block p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* 圖片文字覆蓋層 - 確保文字在圖片範圍內 */
.image-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    padding: 20px;
    box-sizing: border-box;
}

/* VFM 標籤定位 - 保持在圖片內 */
.vfm-labels {
    position: relative;
    width: 100%;
    height: 100%;
}

.vfm-label {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-color);
    max-width: 80px;
    text-align: center;
}

.vfm-label.top {
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.vfm-label.bottom-left {
    bottom: 25%;
    left: 15%;
}

.vfm-label.bottom-right {
    bottom: 25%;
    right: 15%;
}

.vfm-flow {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    flex-wrap: wrap;
    justify-content: center;
}

.vfm-flow span {
    white-space: nowrap;
}

/* EVD 標籤定位 - 保持在圖片內 */
.evd-labels {
    position: relative;
    width: 100%;
    height: 100%;
}

.evd-label {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--primary-color);
}

.evd-label.distance {
    top: 20%;
    right: 10%;
}

.evd-label.velocity {
    top: 45%;
    right: 10%;
}

.evd-label.acceleration {
    top: 70%;
    right: 10%;
}

.evd-label.time {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .gas-model-img,
    .patent-model-img {
        height: 300px;
    }
    
    .image-description {
        padding: 1rem;
    }
    
    .image-description h5 {
        font-size: 1.1rem;
    }
    
    .module-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .module-row span {
        min-width: auto;
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* 手機版文字標籤調整 - 更緊湊 */
    .image-text-overlay {
        padding: 15px;
    }
    
    .vfm-label {
        padding: 6px 8px;
        font-size: 11px;
        max-width: 60px;
    }
    
    .vfm-label.top {
        top: 12%;
    }
    
    .vfm-label.bottom-left {
        bottom: 20%;
        left: 10%;
    }
    
    .vfm-label.bottom-right {
        bottom: 20%;
        right: 10%;
    }
    
    .vfm-flow {
        bottom: 8%;
        font-size: 10px;
        padding: 8px 12px;
        max-width: 95%;
    }
    
    .evd-label {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .evd-label.distance {
        top: 18%;
        right: 8%;
    }
    
    .evd-label.velocity {
        top: 42%;
        right: 8%;
    }
    
    .evd-label.acceleration {
        top: 68%;
        right: 8%;
    }
    
    .evd-label.time {
        bottom: 8%;
    }
    
    .gas-section,
    .patent-section {
        margin-bottom: 2rem;
        padding: 1.5rem 0;
    }
    
    .gas-section h4,
    .patent-section h4 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .gas-model-img,
    .patent-model-img {
        height: 250px;
    }
    
    .image-text-overlay {
        padding: 10px;
    }
    
    .vfm-label {
        padding: 4px 6px;
        font-size: 10px;
        max-width: 50px;
    }
    
    .vfm-flow {
        font-size: 9px;
        padding: 6px 10px;
        gap: 4px;
    }
    
    .evd-label {
        padding: 3px 5px;
        font-size: 9px;
    }
    
    .module-row span {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* 深色模式適配 */
[data-theme="dark"] .vfm-label,
[data-theme="dark"] .evd-label {
    background: rgba(30, 30, 30, 0.9);
    color: #fff;
    border-color: var(--primary-color);
}

[data-theme="dark"] .vfm-flow {
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
}

[data-theme="dark"] .gas-model-img,
[data-theme="dark"] .patent-model-img {
    background: #2a2a2a;
}


/* 額外的手機版優化 */
@media (max-width: 768px) {
    /* 標籤頁按鈕手機版優化 */
    .about-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 100px;
        max-width: 150px;
        padding: 10px 15px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* 六模組按鈕手機版 */
    .module-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 20px;
    }
    
    .module-btn {
        font-size: 12px;
        padding: 10px 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 確保圖片容器在手機版不會溢出 */
    .gas-image-container,
    .patent-image-container {
        margin: 1.5rem 0;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* 手機版文字內容優化 */
    .gas-section p,
    .patent-section p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .about-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-btn {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .module-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .module-btn {
        font-size: 11px;
        padding: 8px 12px;
    }
    
    /* 極小螢幕的圖片優化 */
    .gas-model-img,
    .patent-model-img {
        height: 200px;
    }
    
    /* 極小螢幕的文字標籤 */
    .vfm-label {
        padding: 3px 5px;
        font-size: 9px;
        max-width: 40px;
    }
    
    .vfm-flow {
        font-size: 8px;
        padding: 5px 8px;
    }
    
    .evd-label {
        padding: 2px 4px;
        font-size: 8px;
    }
}

/* 橫向手機優化 */
@media (max-width: 768px) and (orientation: landscape) {
    .gas-model-img,
    .patent-model-img {
        height: 250px;
    }
    
    .about-tabs {
        flex-direction: row;
        justify-content: center;
    }
    
    .tab-btn {
        flex: none;
        min-width: 120px;
    }
}
