/* 全域設定：重置邊距，使用較好看的字體 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* body 設定：讓卡片永遠置中 */
body {
    background-color: #b1c7e8; /* 淺灰背景 #f0f2f5 */
    display: flex;             /* 啟用 Flexbox */
    justify-content: center;   /* 水平置中 */
    align-items: center;       /* 垂直置中 */
    height: 100vh;             /* 佔滿整個視窗高度 */
}

/* 卡片本體 */
.card {
    background: white;
    padding: 2rem;
    border-radius: 15px;       /* 圓角 */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); /*陰影，讓卡片浮起來 */
    text-align: center;
    max-width: 350px;
    width: 100%;
}

/* 圖片樣式 */
.profile-img img {
    width: 100px;
    height: 100px;
    border-radius: 50%;        /* 變成圓形 */
    margin-bottom: 1rem;
    border: 3px solid #3b82f6; /* 藍色邊框 */
}

/* 文字樣式 */
h1 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* 按鈕樣式 */
.links {
    display: flex;
    gap: 10px;                 /* 按鈕之間的間距 */
    justify-content: center;
}

.btn {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: 0.3s;          /* 互動動畫時間 */
}

.btn:first-child {
    background-color: #3b82f6;
    color: white;
}

.btn.secondary {
    background-color: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

/* 滑鼠移過去的效果 (Hover) */
.btn:hover {
    opacity: 0.8;
    transform: translateY(-2px); /* 微微上浮 */
}

/* --- 深色模式樣式 (Dark Mode) --- */

/* 當 body 擁有 "dark-mode" 這個 class 時，背景變黑，文字變白 */
body.dark-mode {
    background-color: #111827; /* 深灰黑色 */
    color: #f3f4f6;            /* 淺灰白色 */
}

/* 當 body 是暗的，卡片也要變暗 */
body.dark-mode .card {
    background-color: #1f2937; /* 比背景稍微亮一點的灰 */
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); /* 陰影加深 */
}

/* 當 body 是暗的，標題文字變白 */
body.dark-mode h1 {
    color: #f3f4f6;
}

/* 當 body 是暗的，一般文字變淺灰 */
body.dark-mode p {
    color: #9ca3af;
}

/* 修改按鈕在深色模式下的邊框顏色 */
body.dark-mode .btn.secondary {
    border-color: #60a5fa;
    color: #60a5fa;
}