
/* 主體背景設計，使用線性漸變營造深藍與銀灰的科技感 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    transition: background 0.5s ease;
}

/* 固定導航欄樣式，使用半透明背景並添加陰影效果 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.navbar:hover {
    background: rgba(0, 0, 0, 1);
}

.navbar .nav-item {
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar .nav-item:hover {
    color: #ff4081;
}

/* 標題樣式，加入文字陰影增強立體感 */
h2, h3, h4 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

h2 {
    font-size: 24px;
    margin-top: 80px;
}

h3 {
    font-size: 20px;
    margin-top: 40px;
}

h4 {
    font-size: 18px;
    margin-top: 30px;
}

/* 文章內容區塊，使用模塊化布局和陰影效果 */
article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.module {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.module:nth-child(even) {
    background: rgba(44, 44, 44, 0.8);
}

.module-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

/* 圖片樣式，添加圓角、陰影及懸浮放大效果 */
.image-style {
    max-width: 650px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-style:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

/* 按鈕樣式，使用3D立體效果和過渡動畫 */
.btn-3d {
    background: #00f2fe;
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 0 #005f6a;
    transform: translateY(0);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    cursor: pointer;
}

.btn-3d:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #005f6a;
}

/* 代碼區塊樣式，與正文內容區分開來 */
.code-block {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
}

.code-block code {
    color: #00ffcc;
    font-size: 16px;
}

/* 表格樣式，設計整潔且具視覺引導 */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(28, 28, 28, 0.9);
    color: #ffffff;
    margin: 20px 0;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #444;
}

tr:nth-child(even) {
    background: rgba(44, 44, 44, 0.8);
}

th {
    background: #0f2027;
    font-size: 18px;
}

/* 滾動動畫和視差效果樣式 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s forwards;
}

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

.parallax {
    background-image: url('https://images.gptkong.com/demo/sample3.png');
    height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 回應式設計媒體查詢，適應不同裝置螢幕寬度 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .module {
        padding: 30px 10px;
    }

    .btn-3d {
        padding: 10px 20px;
        font-size: 14px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    h4 {
        font-size: 16px;
    }
}

/* 強調區域樣式，吸引用戶注意 */
.highlight {
    color: #ff4081;
    font-weight: bold;
}

/* 應用黃金比例配色原則的主色、輔色和點綴色 */
:root {
    --main-color: #0f2027; /* 深藍 */
    --secondary-color: #203a43; /* 輕銀灰 */
    --accent-color: #ff4081; /* 亮紫 */
}


