/* 基本重置和變數 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c2c2c;
    --secondary-color: #4a4a4a;
    --accent-color: #666666;
    --text-light: #ffffff;
    --text-dark: #2c2c2c;
    --text-gray: #666666;
    --bg-overlay: rgba(0, 0, 0, 0.4);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --gradient-bg: linear-gradient(135deg, #2c2c2c 0%, #4a4a4a 100%);
    --gradient-accent: linear-gradient(135deg, #666666 0%, #2c2c2c 100%);
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: #ffffff;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導覽列 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo .logo {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.nav-logo .logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 10px 0;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* 右下角音樂控制 */
.music-control-fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.music-btn {
    background: var(--gradient-bg);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* 主頁區域 */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

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

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: var(--text-light);
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    background: var(--gradient-bg);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 44, 44, 0.25);
}

/* 區塊樣式 */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    position: relative;
}

.title-underline {
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* 關於我們區域 */
.about {
    background: var(--light-gray);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.about-item {
    text-align: center;
    padding: 40px 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--light-gray);
    opacity: 0.5;
    transition: var(--transition);
}

.about-item:hover::before {
    left: 0;
}

.about-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.about-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.about-icon svg {
    width: 30px;
    height: 30px;
}

.about-item:hover .about-icon {
    transform: scale(1.05);
}

.about-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.about-item p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* 服務區域 */
.services {
    background: white;
}

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

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.service-card .service-url {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
    word-break: break-all;
    text-decoration: none;
    display: block;
    transition: var(--transition);
}

.service-card .service-url:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.service-card .service-context {
    color: var(--text-gray);
    font-size: 0.9rem;
    padding: 8px 15px;
    background: var(--light-gray);
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

/* 聯絡區域 */
.contact {
    background: var(--gradient-bg);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact-content {
    text-align: center;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-details {
    text-align: left;
}

.contact-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-link:hover {
    color: #cccccc;
}

/* 頁尾 */
.footer {
    background: #2c2c2c;
    color: white;
    text-align: center;
    padding: 30px 0;
}

.footer p {
    opacity: 0.8;
}

/* 動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(44, 44, 44, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(44, 44, 44, 0.8);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-details {
        text-align: center;
    }
    
    section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-item,
    .service-card {
        padding: 25px 20px;
    }
}
