/* Guides Specific Modern Glassmorphism Styles */
:root {
    --primary-color: #007AFF;
    --bg-light: #ffffff;
    --bg-dark: #000000;
    --card-bg-light: #f5f5f7;
    --card-bg-dark: #1c1c1e;
    --text-light: #1d1d1f;
    --text-dark: #f5f5f7;
    --secondary-text-light: #86868b;
    --secondary-text-dark: #8e8e93;
    --border-light: rgba(0, 0, 0, 0.08);
    --border-dark: rgba(255, 255, 255, 0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--bg-dark);
        color: var(--text-dark);
    }
}

/* Lang control classes */
.lang-zh, .lang-tw, .lang-en { display: none; }
body.lang-zh, body.lang-tw, body.lang-en { display: block; }
body.lang-zh .lang-zh { display: block; }
body.lang-tw .lang-tw { display: block; }
body.lang-en .lang-en { display: block; }

body.lang-zh span.lang-zh, body.lang-zh h1.lang-zh, body.lang-zh p.lang-zh, body.lang-zh a.lang-zh, body.lang-zh h3.lang-zh, body.lang-zh div.lang-zh { display: inline; }
body.lang-tw span.lang-tw, body.lang-tw h1.lang-tw, body.lang-tw p.lang-tw, body.lang-tw a.lang-tw, body.lang-tw h3.lang-tw, body.lang-tw div.lang-tw { display: inline; }
body.lang-en span.lang-en, body.lang-en h1.lang-en, body.lang-en p.lang-en, body.lang-en a.lang-en, body.lang-en h3.lang-en, body.lang-en div.lang-en { display: inline; }

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px 80px 20px;
}

/* Glassmorphism Header & Navigation */
header.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 40px;
}

@media (prefers-color-scheme: dark) {
    header.nav-header {
        border-bottom-color: var(--border-dark);
    }
}

.logo-link {
    text-decoration: none;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
}

.logo-subtitle {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
    margin-top: 1px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.back-btn {
    font-size: 14px;
    color: var(--secondary-text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

@media (prefers-color-scheme: dark) {
    .back-btn {
        color: var(--secondary-text-dark);
    }
}

.back-btn:hover {
    color: var(--primary-color);
}

/* Service Detail Portal Header */
.portal-header {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
}

.brand-logo-container {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: #ffffff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    position: relative;
    border: 1px solid var(--border-light);
}

@media (prefers-color-scheme: dark) {
    .brand-logo-container {
        border-color: var(--border-dark);
        background: #1c1c1e;
    }
}

.brand-logo-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.glow-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.15;
    z-index: -1;
}

.portal-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.portal-header p {
    color: var(--secondary-text-light);
    font-size: 16px;
    margin: 0;
}

@media (prefers-color-scheme: dark) {
    .portal-header p {
        color: var(--secondary-text-dark);
    }
}

/* 引导配图容器 */
.guide-illustration-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 36px auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s;
}

.guide-illustration-container:hover {
    transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
    .guide-illustration-container {
        background: rgba(28, 28, 30, 0.4);
        border-color: rgba(255, 255, 255, 0.05);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    }
}

.guide-illustration {
    width: 100%;
    height: auto;
    display: block;
    max-height: 320px;
    object-fit: contain;
}

/* Steps list card design */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
}

.step-card {
    background: var(--card-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (prefers-color-scheme: dark) {
    .step-card {
        background: var(--card-bg-dark);
        border-color: rgba(255, 255, 255, 0.05);
    }
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.step-number {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    background: var(--primary-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.step-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-title {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 4px;
}

.step-desc {
    color: var(--secondary-text-light);
    font-size: 15px;
    margin: 0;
}

@media (prefers-color-scheme: dark) {
    .step-desc {
        color: var(--secondary-text-dark);
    }
}

/* App Download Banner (Wow effect) */
.promo-banner {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 24px;
    padding: 32px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    box-shadow: 0 15px 40px rgba(0, 122, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.promo-banner::after {
    content: "";
    position: absolute;
    right: -100px;
    bottom: -100px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.promo-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.promo-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: #ffffff;
}

.promo-text h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px 0;
}

.promo-text p {
    font-size: 14px;
    margin: 0;
    opacity: 0.85;
}

.promo-btn {
    display: inline-block;
    box-sizing: border-box;
    background: #ffffff;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 980px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.promo-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Service Portal Grid Card Design */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.service-card {
    background: var(--card-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s, border-color 0.25s;
}

@media (prefers-color-scheme: dark) {
    .service-card {
        background: var(--card-bg-dark);
        border-color: rgba(255, 255, 255, 0.05);
    }
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 122, 255, 0.15);
}

.service-card .brand-logo-container {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.service-card p {
    font-size: 13px;
    color: var(--secondary-text-light);
    margin: 0;
}

@media (prefers-color-scheme: dark) {
    .service-card p {
        color: var(--secondary-text-dark);
    }
}

.lang-switch-btn {
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    .lang-switch-btn {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }
}

@media (max-width: 768px) {
    .step-card {
        padding: 16px;
        gap: 12px;
    }
    .promo-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }
    .promo-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .promo-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    .promo-banner {
        align-items: center;
    }
    .nav-header {
        flex-direction: row;
        align-items: center;
        margin-bottom: 24px;
    }
    .logo-title {
        font-size: 15px;
    }
    .logo-subtitle {
        font-size: 9px;
    }
    .logo-icon {
        width: 24px;
        height: 24px;
    }
}

/* Search and filtering styles */
.search-container {
    max-width: 600px;
    margin: -10px auto 40px auto;
    position: relative;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--secondary-text-light);
    pointer-events: none;
    fill: currentColor;
}

@media (prefers-color-scheme: dark) {
    .search-icon {
        color: var(--secondary-text-dark);
    }
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    font-size: 16px;
    border-radius: 980px;
    border: 1px solid var(--border-light);
    background: var(--card-bg-light);
    color: var(--text-light);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.15);
    background: #ffffff;
}

@media (prefers-color-scheme: dark) {
    .search-input {
        border-color: var(--border-dark);
        background: var(--card-bg-dark);
        color: var(--text-dark);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    .search-input:focus {
        background: #1c1c1e;
        box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
    }
}

/* Service Card Filter Animation */
.service-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s, border-color 0.25s, opacity 0.25s, scale 0.25s;
}

.service-card.hidden {
    opacity: 0;
    scale: 0.95;
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    border: none;
    margin: 0;
}

/* Language Switcher Dropdown (Matching Homepage) */
.lang-switcher {
    position: relative;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    padding: 6px 12px;
    transition: background-color 0.2s;
    user-select: none;
}

@media (prefers-color-scheme: dark) {
    .lang-switcher {
        background: rgba(255,255,255,0.08);
    }
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 110px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
    z-index: 100;
}

@media (prefers-color-scheme: dark) {
    .lang-dropdown {
        background: rgba(28, 28, 30, 0.95);
        border-color: var(--border-dark);
    }
}

.lang-switcher:hover .lang-dropdown {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 12px;
    font-weight: normal;
    text-align: left;
    transition: background-color 0.2s, color 0.2s;
}

@media (prefers-color-scheme: dark) {
    .lang-dropdown a {
        color: var(--text-dark);
    }
}

.lang-dropdown a:hover {
    background: var(--primary-color);
    color: white !important;
}
