:root {
    /* 配色方案 */
    --primary-color: #092640; /* 深藍色背景 */
    --secondary-color: #1c3d5b; /* 較亮的藍色 */
    --accent-color: #3b82f6; /* 強調藍色 */
    --background-light: #ffffff;
    --background-dark: #051b2c; /* 更深的藍色背景 */
    --text-light: #333333;
    --text-dark: #ffffff;
    --text-muted: #94a3b8; /* 淺灰藍色次要文字 */

    /* 漸層色 */
    --gradient-primary: linear-gradient(135deg, #092640 0%, #1c3d5b 100%);

    /* 字體設定 */
    --heading-font: 'Noto Sans TC', sans-serif;
    --body-font: 'Noto Sans TC', sans-serif;
}

/* 深色主題 */
[data-theme='dark'] {
    --primary-color: #5c6bc0;
    --secondary-color: #29b6f6;
    --accent-color: #ff4081;
    --background-light: #121212;
    --background-dark: #000000;
    --text-light: #ffffff;
    --text-dark: #ffffff;
}

/* 主題切換按鈕樣式 */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 深色主題下的特定樣式調整 */
[data-theme='dark'] body {
    background-color: var(--background-light);
    color: var(--text-light);
}

[data-theme='dark'] .theme-toggle {
    border-color: var(--text-light);
    color: var(--text-light);
}

[data-theme='dark'] .feature-card {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] .feature-card h3 {
    color: var(--secondary-color);
}

[data-theme='dark'] .feature-card p {
    color: var(--text-light);
}

[data-theme='dark'] .tech-features {
    background-color: var(--background-dark);
}

[data-theme='dark'] .footer {
    background-color: var(--background-dark);
}

/* 基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--background-light);
}

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

/* 導航欄樣式 */
.main-nav {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    order: -1;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
    min-width: 170px;
}

.logo img {
    height: 32px;
    width: auto;
    margin-right: 0px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

/* 導航連結懸停效果 */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--accent-color);
}

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

/* 當前活動的導航項目 */
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a.active::after {
    width: 100%;
}

/* 首頁橫幅樣式 */
.hero {
    padding: 160px 0 80px;
    background: var(--gradient-primary);
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    text-align: left;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-family: var(--heading-font);
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    color: var(--text-muted);
    max-width: 500px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    border: none;
}

.btn-primary:hover {
    background-color: #15803d;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* 響應式設計 */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .hero .subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons {
        justify-content: center;
    }

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

@media (max-width: 576px) {
    .hero {
        padding: 120px 0 60px;
    }

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

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

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* 功能介紹區塊樣式 */
.features {
    padding: 80px 0;
    background-color: var(--background-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-family: var(--heading-font);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0;
}

.feature-card {
    border: 1px solid rgba(134, 239, 172, 0.15);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: left;
}

.feature-card > p {
    text-align: left;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
}

.feature-list h4 {
    color: var(--secondary-color);
    margin: 1rem 0 0.5rem;
    font-size: 1.1rem;
}

.feature-list ul {
    list-style: none;
    padding-left: 1rem;
}

.feature-list ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.feature-list ul li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .logo {
        order: 0;
        margin-left: auto;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        margin: 0;
    }
}

/* 技術特色區塊樣式 */
.tech-features {
    padding: 80px 0;
    background-color: var(--background-dark);
    color: var(--text-dark);
}

.tech-features .section-title {
    color: var(--text-dark);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0;
}

.tech-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(134, 239, 172, 0.15);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.tech-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
}

.tech-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.tech-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.tech-card p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.tech-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.tech-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.tech-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* 響應式設計補充 */
@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }

    .tech-card {
        margin: 0;
    }
}

/* 下載區塊樣式 */
.download {
    padding: 80px 0;
    background: var(--gradient-primary);
    color: var(--text-dark);
}

.download .section-title {
    color: var(--text-dark);
}

.download-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.download-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-family: var(--heading-font);
}

.download-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 系統需求區塊樣式 */
.system-requirements {
    background: rgba(22, 163, 74, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.system-requirements h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.system-requirements ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}

.system-requirements li {
    display: flex;
    flex-direction: column; /* 改為垂直排列 */
    gap: 0.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.system-requirements li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.requirement-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9rem;
}

.requirement-value {
    color: var(--text-dark);
    line-height: 1.6;
}

/* 語言列表特別樣式 */
.language-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.download-buttons {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.app-store-button {
    flex-shrink: 0;
}

.app-store-button img {
    width: 168px;
    height: auto;
    transition: transform 0.2s;
}

.app-store-button:hover img {
    transform: translateY(-2px);
}

.qr-code {
    text-align: center;
}

.qr-code img {
    width: 200px;
    height: 200px;
    margin-bottom: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 10px;
}

.qr-code span {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

.download-preview {
    position: relative;
}

.download-preview img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 響應式設計補充 */
@media (max-width: 992px) {
    .download-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .download-preview {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .download-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .qr-code {
        align-self: center;
    }

    .app-store-button img {
        width: 168px;
    }
}

/* 頁尾樣式 */
.footer {
    background-color: var(--background-dark);
    color: var(--text-dark);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    order: -1;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
}

.footer-logo img {
    height: 40px;
    width: auto;
}

.footer-description {
    opacity: 0.8;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.8rem;
}

.footer-links a,
.footer-contact a {
    color: var(--text-dark);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover,
.footer-contact a:hover {
    opacity: 1;
}

.footer-contact li {
    display: flex;
    align-items: center;
    /* gap: 0.5rem; */
}

.footer-contact i {
    opacity: 0.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.2s;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.social-link img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-legal a {
    color: var(--text-dark);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-legal a:hover {
    opacity: 1;
}

.separator {
    opacity: 0.3;
}

.copyright {
    opacity: 0.6;
}

/* 響應式設計補充 */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links,
    .footer-contact {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: flex-start;
    }

    .footer-links li,
    .footer-contact li {
        margin-bottom: 0;
    }

    .footer-links a,
    .footer-contact a {
        white-space: nowrap;
        padding: 0.5rem 0;
    }

    .footer-contact li {
        display: inline-flex;
        align-items: center;
    }
}

/* 漢堡選單按鈕 */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* 手機版導航樣式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        order: -1;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        width: 250px;
        height: calc(100vh - 64px);
        background-color: var(--primary-color);
        padding: 1rem 0;
        flex-direction: column;
        gap: 0;
        z-index: 1000;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        text-align: left;
    }

    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .menu-overlay.active {
        display: block;
    }
}

/* 深色主題下的手機版樣式 */
[data-theme='dark'] .nav-links {
    background-color: var(--background-dark);
}

/* 平滑滾動效果 */
html {
    scroll-behavior: smooth;
}

/* 語言切換鈕樣式 */
.lang-switch {
    position: relative;
    margin-left: 2rem;
}

.lang-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
}

.lang-button .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.lang-button:hover .arrow {
    transform: rotate(180deg);
}

/* 拉選單樣式 */
.lang-dropdown {
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-top: 0.5rem;
    min-width: 200px;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.lang-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-group {
    margin-bottom: 1rem;
}

.lang-group:last-child {
    margin-bottom: 0;
}

.lang-group h4 {
    color: var(--text-light);
    opacity: 0.7;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
}

.lang-option {
    display: block;
    padding: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.lang-option:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.lang-option.active {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

/* 深色主題適配 */
[data-theme='dark'] .lang-dropdown {
    background: var(--background-dark);
}

[data-theme='dark'] .lang-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 手機版適配 */
@media (max-width: 768px) {
    .lang-switch {
        margin-left: 1rem;
    }

    .lang-button {
        padding: 0.4rem 0.8rem;
    }

    .lang-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
    }

    .lang-dropdown.active {
        transform: translateY(0);
    }

    .lang-option {
        padding: 0.8rem;
    }
}

/* 美化滾動條 */
.lang-dropdown::-webkit-scrollbar {
    width: 6px;
}

.lang-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 3px;
}
