/* ==========================================================================
   HyperSnap 公共樣式（基礎變數 / 導航欄 / 按鈕 / 頁尾 / 移動端選單）
   三個頁面共用，請勿在此放置頁面專屬樣式。
   ========================================================================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', '微軟雅黑', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    max-width: 1388px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 導航欄 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-image {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 700;
    font-size: 1.3rem;
    color: #242321;
}

.brand-by {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.btn-outline:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.btn-purchase {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: var(--shadow-md);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-purchase::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-purchase:hover::before {
    left: 100%;
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #d97706, #b45309);
}

.nav-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* 語言切換 */
.lang-switch {
    position: relative;
}

.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-switch-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-switch-globe {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.lang-switch-caret {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.lang-switch.open .lang-switch-caret {
    transform: rotate(180deg);
}

.lang-switch-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 160px;
    list-style: none;
    margin: 0;
    padding: 0.4rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1100;
}

.lang-switch.open .lang-switch-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switch-item {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.lang-switch-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-color);
}

.lang-switch-item.active {
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(59, 130, 246, 0.06);
}

/* 移動端選單 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}

/* 漢堡選單中的二級操作區（預設僅移動端顯示） */
.nav-mobile-actions {
    display: none;
}

/* 頁尾樣式 */
.footer {
    background:
        radial-gradient(120% 140% at 12% 0%, rgba(37, 99, 235, 0.22) 0%, transparent 50%),
        radial-gradient(120% 140% at 90% 100%, rgba(6, 182, 212, 0.18) 0%, transparent 55%),
        linear-gradient(135deg, #0b1220 0%, #131c2e 45%, #0e1626 100%);
    color: #e2e8f0;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

/* 頂部高光描邊，呼應截圖工具的精緻感 */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.6), rgba(34, 211, 238, 0.6), transparent);
    pointer-events: none;
}

/* 裝飾：截圖選框 + 準星，體現螢幕捕捉主題 */
.footer::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -40px;
    width: 420px;
    height: 300px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='300'%3E%3Crect x='14' y='14' width='392' height='272' rx='16' fill='none' stroke='%2360a5fa' stroke-width='2' stroke-dasharray='12 9'/%3E%3Cg fill='%2322d3ee'%3E%3Crect x='6' y='6' width='14' height='14' rx='3'/%3E%3Crect x='400' y='6' width='14' height='14' rx='3'/%3E%3Crect x='6' y='280' width='14' height='14' rx='3'/%3E%3Crect x='400' y='280' width='14' height='14' rx='3'/%3E%3C/g%3E%3Cg stroke='%2360a5fa' stroke-width='2'%3E%3Cline x1='210' y1='120' x2='210' y2='180'/%3E%3Cline x1='180' y1='150' x2='240' y2='150'/%3E%3C/g%3E%3Ccircle cx='210' cy='150' r='26' fill='none' stroke='%2322d3ee' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.1;
    pointer-events: none;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-about {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.footer-logo {
    width: 58px;
    height: 58px;
    border-radius: 8px;
}

.footer-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-by-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-style: italic;
    transform: translateY(-8px);
}

.footer-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-feature-tag {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-feature-icon {
    width: 12px;
    height: 12px;
}

.footer-about-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    position: relative;
}

.footer-about-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
}

.footer-about-text {
    color: #ffffff;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-about-list li {
    color: #ffffff;
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-about-list li::before {
    content: '✓';
    color: #ffffff;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0.5rem;
}

.footer-about-list li:hover {
    border-left-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-contact-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    position: relative;
}

.footer-contact-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.footer-contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.footer-contact-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #ffffff;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(74, 85, 104, 0.5);
    padding-top: 2rem;
    text-align: center;
    background: rgba(26, 32, 44, 0.3);
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 1rem 1rem 0 0;
}

.footer-copyright {
    color: #ffffff;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.footer-notice {
    color: #ffffff;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* 公共響應式 */
@media (max-width: 768px) {
    /* 移動端導航：下拉選單 */
    .nav-menu {
        position: absolute;
        top: 4rem;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 0.5rem 0 0;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-0.5rem);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu .nav-link {
        display: block;
        padding: 0.95rem 1.5rem;
        font-size: 1rem;
        color: var(--text-primary);
        border-bottom: 1px solid var(--bg-tertiary);
    }

    .nav-menu li:not(.nav-mobile-actions):last-of-type .nav-link {
        border-bottom: none;
    }

    .nav-menu .nav-link:active {
        background: var(--bg-secondary);
    }

    /* 取消下劃線動畫在移動端的定位問題 */
    .nav-menu .nav-link::after {
        display: none;
    }

    /* 二級操作區：立即下載 / 立即購買 */
    .nav-mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.25rem;
        padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
    }

    .nav-mobile-actions-label {
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .nav-mobile-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.85rem 1rem;
        border-radius: var(--radius-lg);
        font-size: 0.95rem;
        font-weight: 600;
        text-decoration: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .nav-mobile-btn svg {
        width: 18px;
        height: 18px;
    }

    .nav-mobile-btn:active {
        transform: scale(0.98);
    }

    .nav-mobile-btn-outline {
        background: #ffffff;
        color: var(--text-primary);
        border: 1px solid var(--border-color);
    }

    .nav-mobile-btn-primary {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: #ffffff;
        box-shadow: var(--shadow-md);
    }

    .nav-actions {
        gap: 0.5rem;
    }

    /* 頂部欄隱藏下載/購買按鈕，已移入漢堡選單 */
    .nav-actions .btn {
        display: none;
    }

    /* 移動端語言切換：精簡為圖示，節省空間 */
    .lang-switch-current {
        display: none;
    }

    .lang-switch-btn {
        padding: 0.45rem 0.55rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .footer {
        padding: 2.5rem 0 1.5rem;
        margin-top: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-logo-section {
        justify-content: center;
    }

    .footer-features {
        justify-content: center;
    }

    .footer-feature-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .footer-about-list li {
        padding-left: 1.5rem;
    }

    .footer-about-title,
    .footer-contact-title {
        font-size: 1.3rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 1rem;
    }
}
