body {
    font-family: 'MyCustomFont', sans-serif; /* 使用更現代的字體 */
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* 深色漸變背景 */
    color: #e0e0e0; /* 淺色文字 */
    overflow-x: hidden; /* 防止橫向捲軸 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 定義自定義字體 (如果仍需使用) */
@font-face {
    font-family: 'MyCustomFont';
    src: url('fonts/myfont.woff2') format('woff2'),
         url('fonts/myfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

a {
    text-decoration: none;
    color: #8be9fd; /* 淺藍色連結 */
    transition: color 0.3s ease;
}

a:hover {
    color: #6272a4; /* 較深的藍色 */
}



/* Hero Section (Cover) */
.hero {
    position: relative;
    overflow: hidden;
    height: 80vh; /* 佔用更多視窗高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* 讓hero部分佔據剩餘空間 */
}

/* 動態背景效果 */
.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #0f3460, #16213e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    opacity: 0.7; /* 增加透明度，讓圖片輪播可見 */
    z-index: 0; /* 確保在圖片輪播下方 */
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-slides {
    position: absolute; /* 讓圖片輪播作為背景的一部分 */
    top: 0;
    left: 0;
    width: calc(100% * 13); /* 13 slides */
    height: 100%;
    display: flex;
    transition: transform 0.8s ease-in-out; /* 更平滑的過渡 */
    opacity: 0.3; /* 降低透明度，使其更像背景 */
    z-index: 1; /* 在動態背景之上，但在疊層之下 */
}

.hero-slide {
    width: calc(100% / 13);
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 更深的疊層，突出內容 */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    z-index: 2; /* 確保內容在最上層 */
    backdrop-filter: blur(3px); /* 輕微模糊效果 */
}

.profile-image-container {
    position: relative;
    z-index: 2;
    margin-bottom: 2rem; /* 增加間距 */
}

.profile-image {
    width: 20vw; /* 略小一點 */
    max-width: 250px; /* 最大寬度 */
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #8be9fd; /* 鮮豔的邊框 */
    box-shadow: 0 0 20px rgba(139, 233, 253, 0.6), 0 0 40px rgba(139, 233, 253, 0.3); /* 發光效果 */
    transition: transform 0.3s ease-in-out;
}

.profile-image:hover {
    transform: scale(1.05); /* 懸停放大 */
}

.hero h1 {
    font-size: 3.5rem; /* 更大的標題 */
    margin-bottom: 0.8rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7); /* 文字發光 */
    letter-spacing: 1.5px;
}

.hero p {
    font-size: 1.5rem; /* 更大的段落文字 */
    color: #b3b3b3;
    margin-top: 0;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-block;
    margin: 0 0.8rem;
    color: #e0e0e0;
    font-size: 2rem; /* 更大的圖標 */
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #8be9fd; /* 懸停變色 */
    transform: translateY(-5px) scale(1.1); /* 懸停上浮並放大 */
}

/* Buttons Section */
.buttons {
    padding: 3rem 0; /* 增加上下間距 */
    text-align: center;
    background-color: rgba(22, 33, 62, 0.7); /* 與主背景協調的深色 */
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.2); /* 內陰影效果 */
}

.button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem; /* 按鈕之間的間距 */
    max-width: 1000px;
    margin: 0 auto;
}

.button {
    padding: 1rem 2.5rem; /* 更大的點擊區域 */
    border-radius: 10px; /* 稍微方正的圓角 */
    display: flex; /* 讓內容居中 */
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* 圖標與文字間距 */
    transition: all 0.4s cubic-bezier(.25,.8,.25,1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3), 0 3px 6px rgba(0,0,0,0.2);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1.1rem; /* 更大的字體 */
    cursor: pointer;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

/* 按鈕背景漸變和懸停效果 */
.button1 { background: linear-gradient(45deg, #2980b9, #3498db); }
.button2 { background: linear-gradient(45deg, #c0392b, #e74c3c); }
.button3 { background: linear-gradient(45deg, #8e44ad, #9b59b6); }
.button4 { background: linear-gradient(45deg, #27ae60, #2ecc71); }
.button5 { background: linear-gradient(45deg, #34495e, #5a6a7c); } /* 搜尋按鈕 */
.button6 { background: linear-gradient(45deg, #C4C400, #FFFFAA); }
.button7 { background: linear-gradient(45deg, #707038, #C2C287); }

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1); /* 懸停時的疊層 */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
    z-index: -1;
}

.button:hover::before {
    transform: scaleX(1);
}

.button:hover {
    box-shadow: 0 12px 25px rgba(0,0,0,0.4), 0 8px 10px rgba(0,0,0,0.3);
    transform: translateY(-5px); /* 懸停上浮更多 */
}

.button:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.1);
}

/* Footer */
footer {
    background-color: #1a1a2e; /* 深色頁腳 */
    color: #aaa;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto; /* 讓頁腳始終在底部 */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ripple Effect */
.ripple {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(139, 233, 253, 0.6); /* 漣漪顏色與主題協調 */
    pointer-events: none;
    z-index: 9999;
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Apply box-sizing to all elements */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}


/* --- Mobile Specific Styles --- */

/* 通用手機調整 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 0 1rem;
    }

    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0.5rem 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .profile-image {
        width: 35vw; /* 手機上圖片更大 */
        max-width: 200px;
    }

    .social-links a {
        font-size: 1.8rem;
        margin: 0 0.6rem;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .button {
        width: 90%; /* 手機上按鈕佔滿寬度 */
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* 針對更小的手機螢幕 */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .profile-image {
        width: 45vw;
    }

    .social-links a {
        font-size: 1.5rem;
    }

    .button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}
