:root {
    --df-primary: #0f172a;
    --df-accent: #2563eb;
    --df-accent-glow: rgba(37, 99, 235, 0.2);
    --df-purple: #7c3aed;
    --df-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #7c3aed 100%);
    --df-card-bg: rgba(255, 255, 255, 0.9);
    --df-text-main: #0f172a;
    --df-text-muted: #64748b;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", sans-serif;
    color: var(--df-text-main);
    background-color: #f8fafc;
    overflow-x: hidden;
}

#mainNav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.nav-link {
    font-weight: 600;
    color: #334155 !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s;
    white-space: nowrap !important;
}

.nav-link:hover {
    color: #2563eb !important;
}

.hero-section {
    position: relative;
    padding-top: 8.5rem;
    padding-bottom: 6rem;
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.12) 0%, rgba(124, 58, 237, 0.06) 40%, transparent 70%),
                radial-gradient(circle at 10% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
                #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.features-device-mockup {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.features-device-mockup .circle {
    position: absolute;
    left: 0;
    fill: url(#circleGradient);
    width: 70%;
    display: none;
}
.device-wrapper {
    max-width: 10rem;
    width: 100%;
}
.device {
    position: relative;
    background-size: cover;
}
.device::after {
    position: absolute;
    background-size: cover;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.device .screen {
    position: absolute;
    background-size: cover;
    pointer-events: auto;
}
.device[data-device="iPhoneX"][data-orientation="portrait"][data-color="black"] {
    padding-bottom: 198.898071625%;
}
.device[data-device="iPhoneX"][data-orientation="portrait"][data-color="black"] .screen {
    top: 3.1855955679%;
    left: 6.8870523416%;
    width: 86.2258953168%;
    height: 93.6288088643%;
}
.device[data-device="iPhoneX"][data-orientation="portrait"][data-color="black"]::after {
    content: "";
    background-image: url("../img/portrait_black.webp?v=20261003b");
}
@media (min-width: 576px) {
    .features-device-mockup .circle {
        width: 70%;
        display: block;
        left: auto;
    }
    .features-device-mockup .device-wrapper {
        max-width: 12.5rem;
    }
}
@media (min-width: 768px) {
    .features-device-mockup .circle {
        width: 60%;
    }
    .features-device-mockup .device-wrapper {
        max-width: 15rem;
    }
}

.badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 1.25rem;
}

.hero-title-gradient {
    background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--df-text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 560px;
    min-height: 88px;
}

.btn-modern-primary {
    background: var(--df-gradient);
    color: #ffffff;
    border: none;
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.55);
    color: #ffffff;
}

.btn-modern-nav-trial {
    background: var(--df-gradient);
    color: #ffffff !important;
    border: none;
    padding: 0.42rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 50rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn-modern-nav-trial:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    color: #ffffff !important;
}

.btn-modern-outline {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-modern-outline:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.04);
    transform: translateY(-2px);
}

.stats-banner {
    padding: 2.5rem 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-num {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--df-text-muted);
    font-weight: 600;
}

.feature-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.25rem 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: #93c5fd;
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.1), 0 8px 10px -6px rgba(37, 99, 235, 0.05);
}

.feature-icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--df-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
}

.feature-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.modern-cta-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #172554 100%);
    border-radius: 28px;
    padding: 4.5rem 3rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}

.modern-cta-box::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.device-shadow {
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.25));
}

footer.modern-footer {
    background-color: #0b1320;
    color: #94a3b8;
    padding: 4rem 0 3rem;
    border-top: 1px solid #1e293b;
}

footer.modern-footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

footer.modern-footer a:hover {
    color: #60a5fa;
}

/* 懸浮客服浮動元件 (Floating Contact Widget) */
.floating-contact-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1060;
    font-family: inherit;
}

.floating-contact-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #06C755 0%, #00B900 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 9999px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 25px -3px rgba(6, 199, 85, 0.4), 0 4px 6px -4px rgba(6, 199, 85, 0.2);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
}

.floating-contact-trigger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 28px -2px rgba(6, 199, 85, 0.5), 0 6px 12px -3px rgba(6, 199, 85, 0.3);
    color: #ffffff !important;
}

.floating-contact-trigger .pulse-indicator {
    width: 9px;
    height: 9px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: pulseWave 1.8s infinite;
}

@keyframes pulseWave {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.floating-contact-popover {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 290px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    padding: 18px;
    display: none;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transform-origin: bottom right;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-contact-popover.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.floating-popover-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.floating-popover-item:last-child {
    margin-bottom: 0;
}

.floating-popover-item.line-item {
    background: #f0fdf4;
    border: 1px solid rgba(6, 199, 85, 0.2);
    color: #166534;
}

.floating-popover-item.line-item:hover {
    background: #dcfce7;
    transform: translateX(3px);
}

.floating-popover-item.whatsapp-item {
    background: #f0fdf4;
    border: 1px solid rgba(37, 211, 102, 0.25);
    color: #15803d;
}

.floating-popover-item.whatsapp-item:hover {
    background: #dcfce7;
    transform: translateX(3px);
}

.floating-popover-item.phone-item {
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: #1e40af;
}

.floating-popover-item.phone-item:hover {
    background: #dbeafe;
    transform: translateX(3px);
}

@media (max-width: 576px) {
    #mainNav > .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    #mainNav .navbar-brand {
        max-width: calc(100% - 54px) !important;
        min-width: 0;
        display: inline-flex !important;
        align-items: center !important;
        margin-right: 0 !important;
    }
    #mainNav .navbar-brand img.app-badge {
        height: 2.1rem !important;
        max-width: 145px !important;
    }
    .beta-toggle-badge {
        font-size: 0.65rem !important;
        padding: 3px 6px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
    #mainNav .navbar-collapse {
        margin-top: 10px;
        padding: 12px 16px;
        background: #ffffff;
        border-radius: 14px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }
    .floating-contact-widget {
        bottom: 18px;
        right: 18px;
    }
    .floating-contact-trigger {
        padding: 10px 16px;
        font-size: 14px;
    }
    .floating-contact-popover {
        width: 270px;
        right: -4px;
    }
}
