body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #eef1f6;
    margin: 0;
    padding: 0;
    display: flex; 
    min-height: 100vh;
}

#sidebar {
    width: 300px;
    background-color: #34495e; 
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.sidebar-header {
    font-size: 1.5em;
    font-weight: bold;
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid #4a627a;
    margin-bottom: 10px;
}

.sidebar-header i {
    margin-right: 10px;
    color: #f39c12; 
}

.nav-group {
    margin-top: 20px;
}

.nav-group h3 {
    font-size: 0.9em;
    color: #bdc3c7;
    padding: 5px 20px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-item {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 12px 20px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1em;
}

.nav-item:hover, .nav-item.active {
    background-color: #2c3e50;
    color: #3498db; 
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
}

.external-link {
    opacity: 0.8;
}

#main-content {
    flex-grow: 1; 
    padding: 30px;
    overflow-y: auto;
}

.content-wrapper {
    min-height: 100%;
}

.main-header {
    margin-bottom: 30px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.main-header h1 {
    font-size: 2em;
    color: #2c3e50;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    padding: 20px;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-size: 1.2em;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header i {
    margin-right: 8px;
    color: #3498db;
}

.card-content {
    flex-grow: 1;
}

.card-action {
    display: block;
    text-align: right;
    margin-top: 15px;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.card-action:hover {
    color: #2980b9;
}

.status {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    font-size: 0.9em;
}
.status.online { background-color: #2ecc71; }
.status.offline { background-color: #e74c3c; }
.status.maintenance { background-color: #f39c12; }

.service-details-container {
    padding: 20px 0;
}

.service-access-block, .service-doc-block, .download-group-block {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.service-access-block h2, .service-doc-block h2, .download-group-block h2 {
    font-size: 1.4em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
    color: #34495e;
}

.link-pair {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.main-link {
    flex-grow: 1;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    color: white; 
}

.copy-button {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 50px; 
    height: 44px; 
    padding: 0;
    flex-shrink: 0;
}

.copy-button:hover {
    background-color: #218838;
}

.copy-icon {
    font-size: 1.2em;
}

.action-grid, .download-links-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.action-button, .download-link {
    flex-grow: 1;
    min-width: 150px;
    text-align: center;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    color: white;
    background-color: #3498db;
}

.action-button:hover, .download-link:hover {
    background-color: #2980b9;
}

.dashboard-page .weather-card .temp {
    font-size: 2.5em;
    margin: 5px 0;
    font-weight: 300;
    color: #e67e22;
}

.synology-page .service-access-block {
    border: 1px solid #3498db;
    border-left: 5px solid #3498db;
    background-color: #ecf8ff;
}
.synology-page .main-link {
    background-color: #3498db; 
}
.synology-page .main-link:hover {
    background-color: #2980b9;
}
.synology-page .instruction-link {
    background-color: #e6f7ff;
    color: #007BFF;
    border: 1px solid #007BFF;
}
.synology-page .instruction-link:hover {
    background-color: #b3d9ff;
}

.bitwarden-page .service-access-block {
    border: 1px solid #e74c3c;
    border-left: 5px solid #e74c3c;
    background-color: #fcecec;
}
.bitwarden-page .main-link {
    background-color: #e74c3c;
}
.bitwarden-page .main-link:hover {
    background-color: #c0392b;
}
.bitwarden-page .instruction-link {
    background-color: #e6f7ff;
    color: #007BFF;
    border: 1px solid #007BFF;
}
.bitwarden-page .instruction-link:hover {
    background-color: #b3d9ff;
}


.n8n-page .service-access-block {
    border: 1px solid #f39c12;
    border-left: 5px solid #f39c12; 
    background-color: #fff9e6;
}
.n8n-page .main-link {
    background-color: #f39c12;
}
.n8n-page .main-link:hover {
    background-color: #e67e22;
}

.download-page .download-group-block {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #eee;
}
.download-links-grid .download-link {
    background-color: #1abc9c;
    border-color: #1abc9c;
}
.download-links-grid .download-link:hover {
    background-color: #16a085;
}
/* 1. 圖片尺寸控制：對應文件中的 class="medium-img" 和 class="small-img" */
/* 預設的 .document-page img 應該是 max-width: 100% */
.document-page .section img.medium-img {
    max-width: 600px;
    /* 讓圖片在頁面內居中 */
    margin-left: auto;
    margin-right: auto;
}

.document-page .section img.small-img {
    max-width: 400px; /* 根據您的圖片範例，400px 比較適合 */
    /* 讓圖片在頁面內居中 */
    margin-left: auto;
    margin-right: auto;
}

/* 2. 紅色提示文字樣式：取代原來的 <font color="red"> */
.document-page .instruction-note-red {
    color: #c0392b; /* 使用更深的紅色，取代單純的 red */
    font-weight: bold;
    display: block; 
    margin: 15px 0; /* 給予上下一些間距 */
    padding: 10px;
    border: 1px solid #e74c3c;
    background-color: #fcebeb;
    border-radius: 4px;
}

/* 3. 額外優化：列表項目使用圖標 */
/* 為了讓開頭的項目符號更美觀，可以在開頭部分使用 */
.document-page .text-success {
    color: #27ae60;
}
.document-page .text-danger {
    color: #e74c3c;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    #sidebar {
        width: 100%;
        padding: 10px 0;
    }
    nav {
        display: flex;
        overflow-x: auto; 
        padding: 0 10px;
    }
    .nav-group h3 {
        display: none;
    }
    .nav-item {
        white-space: nowrap; 
        padding: 8px 15px;
    }
    #main-content {
        padding: 15px;
    }
    .link-pair {
        flex-direction: column;
        gap: 15px;
    }
    .main-link, .copy-button {
        width: 100%;
        min-width: unset;
    }
    .copy-button {
        height: auto;
        padding: 10px 15px;
    }
    .action-grid, .download-links-grid {
        flex-direction: column;
    }
}