/**
 * VitalGear Platform - Main Stylesheet
 * 檔案位置：/var/www/rppg-system/assets/css/main.css
 * Apple-like Design System
 */

/* ========================================
   1. CSS Variables & Root Settings
   ======================================== */
:root {
    /* Colors */
    --primary: #5E5CE6;
    --primary-dark: #4B4ACF;
    --primary-light: #7B79FF;
    --secondary: #FF375F;
    --success: #30D158;
    --warning: #FFD60A;
    --danger: #FF453A;
    --info: #64D2FF;
    --dark: #1D1D1F;
    --gray: #86868B;
    --gray-light: #C7C7CC;
    --light-gray: #F5F5F7;
    --white: #FFFFFF;
    --black: #000000;
    
    /* Gradients */
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-dark: linear-gradient(135deg, #1D1D1F 0%, #2C2C2E 100%);
    
    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.16);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.20);
    --shadow-glow: 0 0 40px rgba(94, 92, 230, 0.3);
    
    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Courier New', monospace;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

/* ========================================
   2. Base Styles & Reset
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
    position: relative;
}

::selection {
    background: var(--primary);
    color: var(--white);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* ========================================
   3. Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   4. Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: var(--z-sticky);
    transition: var(--transition-base);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

.logo i {
    font-size: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-base);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-base);
}

.nav-link:hover {
    color: var(--primary);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--gray-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition-base);
}

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

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.lang-option:hover {
    background: var(--light-gray);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    transform: translateX(-100%);
    transition: var(--transition-base);
    z-index: var(--z-fixed);
    padding: 2rem;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav-list {
    list-style: none;
    margin-bottom: 2rem;
}

.mobile-nav-list li {
    margin-bottom: 1rem;
}

.mobile-nav-list a {
    display: block;
    padding: 0.75rem;
    font-size: 1.125rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.mobile-nav-list a:hover {
    background: var(--light-gray);
    color: var(--primary);
}

/* ========================================
   5. Buttons
   ======================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-gradient {
    background: var(--gradient-1);
    color: var(--white);
    position: relative;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.3);
    transition: left 0.5s ease;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(94, 92, 230, 0.5); }
    50% { box-shadow: 0 0 40px rgba(94, 92, 230, 0.8); }
}

.btn-play {
    position: relative;
}

.btn-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    opacity: 0;
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* ========================================
   6. Hero Section
   ======================================== */
.hero {
    padding: 8rem 2rem 4rem;
    background: var(--gradient-1);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Video Background */
.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
}

.hero-video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
}

/* Animated Background Elements */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.hero::before {
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    bottom: -30%;
    left: -20%;
    width: 600px;
    height: 600px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(90deg, #FFD60A 0%, #FF375F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gradient-text {
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

.hero-desc {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.device-mockup {
    width: 100%;
    max-width: 500px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}

.device-mockup.floating {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.device-screen {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Pulse Animation */
.pulse-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
}

.pulse-animation::before,
.pulse-animation::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-2);
    opacity: 0.6;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-animation::after {
    animation-delay: 0.5s;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
}

.pulse-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--secondary);
    animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Device Metrics */
.device-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
}

.metric-card {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-base);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.metric-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--gray);
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

.metric-unit {
    font-size: 0.875rem;
    color: var(--gray);
    margin-left: 0.25rem;
}

/* Floating Badges */
.floating-badge,
.floating-badge-2 {
    position: absolute;
    background: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    animation: floating 4s ease-in-out infinite;
}

.floating-badge {
    top: 20%;
    right: -20%;
}

.floating-badge-2 {
    bottom: 20%;
    left: -20%;
    animation-delay: 2s;
}

.floating-badge i,
.floating-badge-2 i {
    color: var(--primary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--white);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

.mouse-icon {
    width: 30px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: 25px;
    margin: 0 auto 1rem;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ========================================
   7. Features Section
   ======================================== */
.features {
    padding: 5rem 2rem;
    background: var(--white);
    position: relative;
}

.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: -1;
    opacity: 0.05;
}

.parallax-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--gray);
    line-height: 1.8;
}

.features-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.feature-list i {
    color: var(--success);
}

/* ========================================
   8. Technology Section
   ======================================== */
.technology {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.tech-showcase {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.tech-visual {
    position: relative;
}

.tech-diagram {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.tech-flow {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    opacity: 0;
    animation: fadeInLeft 0.6s ease forwards;
}

.tech-step[data-step="1"] { animation-delay: 0.1s; }
.tech-step[data-step="2"] { animation-delay: 0.2s; }
.tech-step[data-step="3"] { animation-delay: 0.3s; }
.tech-step[data-step="4"] { animation-delay: 0.4s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tech-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 32px;
    top: 64px;
    width: 2px;
    height: calc(100% + 2rem);
    background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
}

.tech-step-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tech-step-content {
    flex: 1;
}

.tech-step-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.tech-step-desc {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Tech Flow Lines SVG */
.tech-flow-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.1;
}

.flow-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-dasharray: 10 5;
    animation: flow 3s linear infinite;
}

@keyframes flow {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -15; }
}

.tech-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    width: fit-content;
}

.tech-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.tech-description {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.tech-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.spec-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    transition: var(--transition-base);
}

.spec-icon {
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.spec-content {
    flex: 1;
}

.spec-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.spec-value {
    font-size: 0.875rem;
    color: var(--gray);
}

.tech-demo-image {
    margin-top: 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.tech-demo-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-slow);
}

.tech-demo-image img.hover-zoom:hover {
    transform: scale(1.05);
}

/* ========================================
   9. Pricing Section
   ======================================== */
.pricing {
    padding: 5rem 2rem;
    background: var(--white);
}

.pricing-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 0 2rem; /* 增加上方 padding 給標籤空間 */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    align-items: flex-end; /* 卡片底部對齊，按鈕自然對齊 */
}

/* 桌面版滾動條樣式 */
.pricing-grid::-webkit-scrollbar {
    height: 10px;
}

.pricing-grid::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 5px;
}

.pricing-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 5px;
}

.pricing-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.pricing-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: var(--transition-base);
    flex: 0 0 300px; /* 固定寬度，不會縮放 */
    min-width: 300px;
    min-height: 480px; /* 最小高度 */
    height: auto; /* 根據內容自適應 */
    display: flex;
    flex-direction: column;
    overflow: visible; /* 允許標籤顯示在卡片外 */
}

/* 為不同套餐設定不同的視覺重量 */
.pricing-card:nth-child(1),
.pricing-card:nth-child(2) {
    /* Free & Startup - 基礎高度 */
    max-height: 520px;
}

.pricing-card:nth-child(3) {
    /* Professional - 中等高度 */
    max-height: 580px;
    border-width: 2px;
    background: linear-gradient(to bottom, #FFFFFF, #FAFBFF);
}

.pricing-card:nth-child(4),
.pricing-card:nth-child(5) {
    /* Business & Enterprise - 最高 */
    max-height: 640px;
    border-color: rgba(139, 92, 246, 0.3);
    background: linear-gradient(to bottom, #FFFFFF, #F9F7FF);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
}

/* Enterprise 套餐特殊標記 */
.pricing-card:nth-child(5)::before {
    content: '⭐ MOST COMPLETE';
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
    z-index: 10;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15);
    background: linear-gradient(to bottom, #FFFFFF, #F5F0FF);
    max-height: 620px !important; /* 確保 Popular 卡片更高 */
}

.pricing-card.popular .plan-features {
    max-height: 300px; /* Popular 套餐顯示更多內容 */
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-1);
    color: var(--white);
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem; /* 增加上方間距，避免被標籤遮住 */
}

.plan-desc {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.price-currency {
    font-size: 1.25rem;
    color: var(--gray);
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark);
}

.price-period {
    color: var(--gray);
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1; /* 讓功能列表占用剩餘空間，將按鈕推到底部 */
    overflow-y: auto; /* 內容過多時可滾動 */
    position: relative;
}

/* 不同套餐的功能列表高度 */
.pricing-card:nth-child(1) .plan-features,
.pricing-card:nth-child(2) .plan-features {
    /* Free & Startup - 顯示較少 */
    max-height: 200px;
    overflow-y: auto;
}

.pricing-card:nth-child(3) .plan-features {
    /* Professional - 中等顯示 */
    max-height: 260px;
    overflow-y: auto;
}

.pricing-card:nth-child(4) .plan-features,
.pricing-card:nth-child(5) .plan-features {
    /* Business & Enterprise - 顯示更多 */
    max-height: 320px;
    overflow-y: auto; /* 保持滾動，避免溢出 */
}

/* 功能列表滾動條樣式 - Apple風格 */
.plan-features::-webkit-scrollbar {
    width: 6px;
}

.plan-features::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 3px;
}

.plan-features::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8B5CF6 0%, #7C3AED 100%);
    border-radius: 3px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.plan-features::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7C3AED 0%, #6D28D9 100%);
    box-shadow: 0 0 4px rgba(139, 92, 246, 0.3);
}

.plan-features::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 當內容超出時顯示漸變 */
.plan-features:hover::after {
    opacity: 1;
}

/* 添加subtle的滾動提示動畫 */
@keyframes subtleGlow {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* 卡片懸停時，滾動條有輕微呼吸效果 */
.pricing-card:hover .plan-features::-webkit-scrollbar-thumb {
    animation: subtleGlow 2s ease-in-out infinite;
}

/* 當功能列表可滾動時的視覺提示 */
.plan-features:not(:hover) {
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features i {
    color: var(--success);
    font-size: 1.25rem;
}

/* 確保套餐選擇按鈕對齊底部 */
.pricing-card .btn {
    margin-top: auto; /* 將按鈕推到底部 */
    width: 100%;
}

/* ========================================
   10. Integration Section
   ======================================== */
.integration {
    padding: 5rem 2rem;
    background: var(--light-gray);
}

.integration-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.code-showcase {
    background: #1e1e1e;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot:nth-child(1) { background: #ff5f56; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #27c93f; }

.code-content {
    overflow-x: auto;
    position: relative;
}

.code-block {
    font-family: var(--font-mono);
    color: #f8f8f2;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre;
}

/* 滾動提示動畫 - 只在需要滾動時顯示 */
@media (max-width: 768px) {
    .code-content {
        scroll-behavior: smooth;
    }
    
    /* 設定 code-showcase 為相對定位 */
    .code-showcase {
        position: relative;
    }
    
    /* 右側滾動提示箭頭 */
    .code-showcase::after {
        content: '›';
        position: absolute;
        right: 1.5rem;
        bottom: 2rem;
        font-size: 1.5rem;
        font-weight: bold;
        color: rgba(255, 255, 255, 0.4);
        z-index: 10;
        animation: slideHint 2s ease-in-out infinite;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    @keyframes slideHint {
        0%, 100% {
            opacity: 0.3;
            transform: translateX(0);
        }
        50% {
            opacity: 0.8;
            transform: translateX(5px);
        }
    }
    
    /* 當滾動或觸碰時隱藏提示 */
    .code-showcase:hover::after,
    .code-content:active ~ .code-showcase::after {
        opacity: 0;
    }
}

/* ========================================
   11. CTA Section
   ======================================== */
.cta {
    padding: 5rem 2rem;
    background: var(--gradient-1);
    position: relative;
    overflow: hidden;
}

.cta-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cta-particle {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-particle 20s ease-in-out infinite;
}

.cta-particle:nth-child(1) {
    top: 10%;
    left: 10%;
}

.cta-particle:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.cta-particle:nth-child(3) {
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.2); }
    66% { transform: translate(-50px, 50px) scale(0.8); }
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-desc {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-light {
    border-color: var(--white);
    color: var(--white);
}

.btn-light:hover {
    background: var(--white);
    color: var(--primary);
}

/* ========================================
   12. Footer
   ======================================== */
.footer {
    padding: 4rem 2rem 2rem;
    background: var(--dark);
    color: var(--white);
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.footer-logo i {
    font-size: 2rem;
    color: var(--primary);
}

.footer-desc {
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.9);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.5);
}

/* ========================================
   13. Modals
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    z-index: var(--z-modal-backdrop);
    overflow-y: auto; /* 允許滾動 */
    padding: 20px 0;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 20px auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform var(--transition-base);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
}

.modal-close:hover {
    background: var(--primary);
    color: var(--white);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.modal-desc {
    color: var(--gray);
    margin-bottom: 2rem;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.video-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition-base);
}

.video-close:hover {
    background: rgba(255,255,255,0.2);
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* ========================================
   14. Forms
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(94, 92, 230, 0.1);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--light-gray);
}

.form-divider span {
    background: var(--white);
    padding: 0 1rem;
    position: relative;
    color: var(--gray);
}

/* ========================================
   15. Utilities
   ======================================== */
.counter {
    display: inline-block;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    animation: scaleIn 0.6s ease forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.6s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 動畫觸發器 */
.animate-on-scroll {
    opacity: 0;
}

/* 減少動畫模式 */
.reduced-motion .animate-on-scroll,
.prefers-reduced-motion .animate-on-scroll {
    animation: none !important;
    opacity: 1 !important;
}

.reduced-motion .floating,
.prefers-reduced-motion .floating {
    animation: none !important;
}

/* ========================================
   優化現有動畫（替換原有的複雜動畫）
   ======================================== */

/* 簡化 hover 效果 */
.feature-card:hover,
.pricing-card:hover {
    transform: translateY(-5px);
}

.metric-card:hover {
    transform: translateY(-2px);
}

/* 移除卡片的 3D tilt 效果 */
.feature-card,
.pricing-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 簡化科技步驟動畫（移除原有的 fadeInLeft） */
.tech-step {
    opacity: 1;
    animation: none;
}

.slide-in-left .tech-step {
    animation: slide-in-left 0.6s ease forwards;
}

/* 移除過度的特效 */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* 簡化按鈕磁性效果 */
.btn:active {
    transform: translateY(0);
}

/* 優化卡片動畫 */
.feature-card,
.pricing-card,
.metric-card {
    transition: all 0.3s ease;
    transform-style: flat; /* 移除 3D 效果 */
}

/* 優化價格卡片的 popular 狀態 */
.pricing-card.popular {
    transform: scale(1.05);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

/* ========================================
   移動端優化
   ======================================== */
@media (max-width: 768px) {
    /* 移動端禁用 hover 動畫 */
    .feature-card:hover,
    .pricing-card:hover,
    .metric-card:hover,
    .btn:hover {
        transform: none;
    }
    
    /* 禁用浮動動畫 */
    .floating {
        animation: none;
    }
    
    /* 禁用設備模型動畫 */
    .device-mockup.floating {
        animation: none;
    }
}

/* ========================================
   打印模式優化
   ======================================== */
@media print {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ========================================
   高對比度模式支援
   ======================================== */
@media (prefers-contrast: high) {
    .animate-on-scroll {
        animation: none;
        opacity: 1;
    }
}

/* ========================================
   16. Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .hero-container,
    .tech-showcase,
    .integration-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-menu,
    .nav-actions .btn {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-desc {
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    /* Sections */
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* 套餐卡片水平滾動 */
    .pricing-grid {
        display: flex;
        gap: 1.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 1rem 1rem 2rem;
        margin: 0 -1rem;
    }
    
    .pricing-card {
        flex: 0 0 280px;
        scroll-snap-align: center;
        max-width: 280px;
        min-height: 480px;
        height: auto;
        display: flex;
        flex-direction: column;
    }
    
    /* 維持漸進式高度策略 */
    .pricing-card:nth-child(1),
    .pricing-card:nth-child(2) {
        max-height: 500px;
    }
    
    .pricing-card:nth-child(3) {
        max-height: 540px;
    }
    
    .pricing-card:nth-child(4),
    .pricing-card:nth-child(5) {
        max-height: 580px;
    }
    
    /* 自定義滾動條 */
    .pricing-grid::-webkit-scrollbar {
        height: 8px;
    }
    
    .pricing-grid::-webkit-scrollbar-track {
        background: var(--light-gray);
        border-radius: 4px;
    }
    
    .pricing-grid::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }
    
    .pricing-grid::-webkit-scrollbar-thumb:hover {
        background: var(--primary-dark);
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .tech-specs {
        grid-template-columns: 1fr;
    }
    
    /* Code Showcase RWD 優化 */
    .code-showcase {
        padding: 1.25rem;
        border-radius: var(--radius-md);
        max-width: 100%;
        overflow: hidden;
    }
    
    .code-content {
        position: relative;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* iOS 平滑滾動 */
        scrollbar-width: thin; /* Firefox */
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }
    
    /* 自定義滾動條樣式 */
    .code-content::-webkit-scrollbar {
        height: 6px;
    }
    
    .code-content::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 3px;
    }
    
    .code-content::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }
    
    .code-content::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .code-block {
        font-size: 0.8rem; /* 減小字體大小 */
        line-height: 1.5;
        white-space: pre;
        min-width: fit-content; /* 保持最小寬度 */
        padding-right: 1rem; /* 右側留白 */
    }
    
    /* 視覺提示：顯示可滾動 */
    .code-content::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 100%;
        background: linear-gradient(to right, transparent, #1e1e1e);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .code-content:hover::after {
        opacity: 1;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Floating Elements */
    .floating-badge,
    .floating-badge-2 {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .device-metrics {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 2rem;
    }
    
    /* Code Showcase 進一步優化 */
    .code-showcase {
        padding: 1rem;
        margin: 0 -1rem; /* 負邊距讓區塊延伸到邊緣 */
        border-radius: 0;
    }
    
    .code-header {
        margin-bottom: 1rem;
    }
    
    .code-dot {
        width: 10px;
        height: 10px;
    }
    
    .code-block {
        font-size: 0.75rem; /* 更小的字體 */
        line-height: 1.4;
    }
    
    /* Integration Section 調整 */
    .integration-content {
        padding: 0 1rem;
    }
    
    .tech-content {
        margin-bottom: 2rem;
    }
    
    .tech-title {
        font-size: 1.5rem;
    }
    
    .tech-description {
        font-size: 0.9rem;
    }
    
    /* 套餐卡片在小螢幕的優化 */
    .pricing-card {
        flex: 0 0 240px;
        max-width: 240px;
        font-size: 0.95rem;
        height: 500px; /* 固定高度 */
        display: flex;
        flex-direction: column;
    }
    
    /* 移動版滾動條更明顯 */
    .plan-features::-webkit-scrollbar {
        width: 8px;
    }
    
    .plan-features {
        max-height: 220px; /* 移動版稍微縮小高度 */
    }
    
    .plan-price {
        margin: 1rem 0;
    }
    
    .price-amount {
        font-size: 2rem;
    }
}

/* ========================================
   17. Print Styles
   ======================================== */
@media print {
    .navbar,
    .hero-video-bg,
    .cta,
    .footer,
    .modal,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
    
    .hero,
    .features,
    .technology,
    .pricing,
    .integration {
        padding: 1rem 0;
        background: white !important;
    }
    
    .section-title {
        font-size: 18pt;
        margin-bottom: 12pt;
    }
}

/* ========================================
   18. Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary: #0066CC;
        --gray: #595959;
        --light-gray: #E6E6E6;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* 優化 will-change */
.animate-on-scroll,
.floating,
.hover-zoom,
.hero-container,
.feature-card,
.pricing-card,
.tech-step {
    will-change: transform, opacity;
}

/* 動畫完成後移除 will-change */
.animate-on-scroll.animated {
    will-change: auto;
}

/* 減少 box-shadow 複雜度 */
.device-mockup {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); /* 簡化陰影 */
}

.feature-card,
.pricing-card {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); /* 簡化陰影 */
}

.feature-card:hover,
.pricing-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.12); /* 簡化陰影 */
}

/* 禁用不必要的 backdrop-filter */
@media (max-width: 1024px) {
    .navbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.98);
    }
}

/* 優化 Hero 背景動畫 */
.hero::before,
.hero::after {
    animation: float 30s ease-in-out infinite; /* 減慢動畫速度 */
}

/* 移除 parallax 效果以提升性能 */
.parallax-bg {
    display: none;
}

/* 簡化浮動徽章動畫 */
.floating-badge,
.floating-badge-2 {
    animation: simple-float 6s ease-in-out infinite;
}

@keyframes simple-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 優化動畫觸發 */
.animate-on-scroll {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 減少動畫的同時觸發 */
.fade-in {
    animation-fill-mode: both;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

/* GPU 加速優化 */
.hero-video-bg,
.hero-container,
.device-mockup,
.floating,
.animate-on-scroll {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 減少重繪區域 */
.metric-value,
.stat-value {
    contain: layout style paint;
}

/* 優化滾動性能 */
body {
    scroll-behavior: smooth;
    overscroll-behavior: none;
}

/* 移除不必要的動畫陰影 */
.btn-glow {
    animation: none;
    box-shadow: 0 0 15px rgba(94, 92, 230, 0.4);
}

.btn-glow:hover {
    box-shadow: 0 0 25px rgba(94, 92, 230, 0.6);
}

/* 優化 CTA 背景動畫 */
.cta-particle {
    display: none; /* 完全移除粒子動畫 */
}

/* 低性能模式 */
@media (prefers-reduced-motion: reduce), 
       (max-width: 768px) {
    .hero::before,
    .hero::after,
    .floating,
    .floating-badge,
    .floating-badge-2,
    .device-mockup.floating {
        animation: none !important;
    }
    
    .hero-video-bg {
        display: none;
    }
    
    * {
        animation-duration: 0.3s !important;
    }
}