/* ============================================================
   基底共用樣式（所有前台頁面共用）
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    height: 100%;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #e8f0fe;
    color: #0b2a4a;
}
body {
    padding-top: 70px;
}

/* 共用容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* ===== 頁面容器 ===== */
.page-wrap {
    min-height: calc(100vh - 70px);
    padding: 0 2rem;
    background: linear-gradient(160deg, #ffffff 0%, #e3edfc 100%);
    position: relative;
    display: flex;
    flex-direction: column;
}
body::before {
    content: '';
    position: fixed;
    top: -15%;
    right: -5%;
    width: 45%;
    height: 70%;
    background: radial-gradient(circle at 70% 30%, rgba(43, 122, 255, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}
body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -8%;
    width: 40%;
    height: 50%;
    background: radial-gradient(circle at 30% 70%, rgba(43, 122, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ===== 導航列（Fixed 頂部） ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    gap: 0.8rem;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.navbar__brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a2a3a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.navbar__brand span {
    font-size: 0.85rem;
    font-weight: 400;
    color: #bfa15f;
}
.navbar__brand .icon {
    color: #bfa15f;
    font-size: 1.2rem;
}
.navbar__nav {
    display: flex;
    gap: 1.2rem;
    font-weight: 500;
    font-size: 0.85rem;
    align-items: center;
}
.navbar__link {
    color: #555;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    padding-bottom: 5px;
    border-radius: 0;
    transition: color 0.3s;
}
.navbar__link:hover,
.navbar__link.active {
    color: #1a2a3a;
    border-bottom: 2px solid #bfa15f;
}
.navbar__cta {
    background: #2b7aff;
    color: #fff;
    padding: 0.35rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    transition: 0.2s;
}
.navbar__cta:hover {
    background: #1a6aff;
}

/* ===== 底部 ===== */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    position: relative;
    font-size: 0.7rem;
    color: #4a6a8a;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(43, 122, 255, 0.04);
    flex-shrink: 0;
    margin-top: auto;
    text-align: center;
}
.footer__version {
    margin-left: 12px;
    font-size: 0.75rem;
    color: #7a8fa4;
}
.footer__version-link {
    color: #7a8fa4;
    text-decoration: none;
}
.footer__version-link:hover {
    color: #5a7a9a;
}
.footer__link { color: #4a6a8a; text-decoration: none; }
.footer__link:hover { color: #2b7aff; }

/* ===== 手機版導航（漢堡選單） ===== */
.navbar__toggle {
    display: none;
}
.navbar__close {
    display: none;
}
.navbar__overlay {
    display: none;
}

@media screen and (max-width: 850px) {
    .page-wrap { padding: 1rem 0.5rem; }

    /* 漢堡按鈕 */
    .navbar__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(255,255,255,0.7);
        border: 1px solid rgba(255,255,255,0.5);
        border-radius: 8px;
        font-size: 1.5rem;
        cursor: pointer;
        color: #0b2a4a;
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        margin-left: auto;
        z-index: 20;
    }

    .navbar__nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 30;
        width: 140px;
        max-width: 80vw;
        height: 100vh;
        flex-direction: column;
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border-radius: 0;
        border: none;
        padding: 60px 1.2rem 1.2rem;
        box-shadow: -4px 0 24px rgba(0,0,0,0.1);
        transform: translateX(100%);
        transition: transform 0.25s ease;
        gap: 0.5rem;
        font-size: 0.9rem;
        overflow-y: auto;
        word-break: break-word;
    }
    .navbar__nav--open {
        transform: translateX(0);
    }
    .navbar__nav a:not(.navbar__cta) {
        padding: 0.5rem 0.8rem;
        border-radius: 8px;
    }
    .navbar__nav a:not(.navbar__cta):hover {
        background: #f0f6ff;
        color: #0b2a4a;
    }
    .navbar__cta {
        margin-top: 0.5rem;
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    /* 關閉按鈕 */
    .navbar__close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
        color: #4a6a8a;
        border-radius: 6px;
    }
    .navbar__close:hover {
        background: #f0f6ff;
        color: #0b2a4a;
    }

    /* 遮罩 */
    .navbar__overlay {
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(0,0,0,0.3);
    }
    .navbar__overlay--show {
        display: block;
    }

    body { padding-top: 60px; }
    .navbar { flex-wrap: nowrap; gap: 0.4rem; min-height: 60px; padding: 0 0.5rem; }
    .navbar__brand { font-size: 1.1rem; }
    .navbar__brand .icon { font-size: 0.9rem; }
    .navbar__nav a:not(.navbar__cta) { padding: 0.5rem 0.8rem; border-bottom: none; }
    .navbar__nav a:not(.navbar__cta):hover { border-bottom: none; }
    .footer { font-size: 0.55rem; flex-direction: column; gap: 0.1rem; align-items: center; }
}
