
/* 重置默认样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; }
body { font-family: Arial, sans-serif; background-color: #f8f9fa; color: #202124; line-height: 1.6; }
header { background-color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); padding: 16px 0; position: sticky; top: 0; z-index: 100; }
/* * { border: 1px solid red !important; } */
.header-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
main { min-height: 800px; margin: 0 auto; min-width: 1200px; }
.logo { font-size: 24px!important; font-weight: bold!important; color: #33aeff !important; text-decoration: none; }
.logo h1 { font-size: 24px!important; font-weight: bold!important; color: #33aeff !important; text-decoration: none; }
nav { flex: 1; margin-top: 12px; }
nav ul { display: flex; list-style: none; }
nav ul li { padding:0 6px; }
nav ul li a { text-decoration: none; color: #5f6368; font-size: 14px; transition: color 0.3s; }
nav ul li a:hover { color: #1a73e8; }
.hero { background: linear-gradient(135deg, #1a73e8, #48b6ff) !important; color: white; padding: 20px 0; text-align: center; }
.hero-content { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.hero h1 { font-size: 48px; font-weight: 400; margin-bottom: 24px; }
.hero p { font-size: 20px; margin-bottom: 12px; }
.btn { display: inline-block; background-color: #fff; color: #1a73e8; padding: 12px 16px; border-radius: 4px; text-decoration: none; font-weight: 500; transition: box-shadow 0.3s; }
.btn:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.features { max-width: 1200px; margin: 12px auto; padding: 0; }
.section-title { text-align: center; font-size: 32px; font-weight: 400; margin-bottom: 60px; color: #202124; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.feature-card { background: white; border-radius: 8px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: box-shadow 0.3s; text-align: center; }
.feature-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.feature-icon { font-size: 48px; margin-bottom: 24px; color: #1a73e8; }
.feature-card h3 { font-size: 18px; font-weight: 500; margin-bottom: 12px; color: #202124; }
.feature-card p { color: #5f6368; font-size: 14px; }
.cta { background-color: #f8f9fa; padding: 30px 0; text-align: center; }
.cta-content { max-width: 800px; margin: 0 auto; padding: 0 10px; }
.cta h2 { font-size: 36px; font-weight: 400; margin-bottom: 24px; color: #202124; }
.cta p { font-size: 18px; margin-bottom: 32px; color: #5f6368; }
.copyright { width: 100%; text-align: center; color: #70757a; padding: 12px 0; font-size: 14px; }
.container2 { width: 1200px; }
.container3 { width: 1400px; margin: 0 auto; }
/* SimLabs Global Footer */
.simlabs-footer-links { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; padding: 0 0 18px; margin-bottom: 16px; border-bottom: 1px solid #e5e7eb; }
.simlabs-footer-links h4 { margin: 0 0 10px; font-size: 15px; color: #111827; }
.simlabs-footer-links ul { margin: 0; padding: 0; list-style: none; }
.simlabs-footer-links li { margin: 8px 0; }
.simlabs-footer-links a { color: #4b5563; text-decoration: none; }
.simlabs-footer-links a:hover { color: #1d4ed8; }
.footer-content { margin: 0 auto; padding: 18px 20px 24px; background-color: #fff !important; }

@media handheld, only screen and (max-width: 980px),only screen and (device-width: 768px){
    .header-content { max-width: 100%; flex-direction: column; }
    nav ul li { padding:0 2px; }
    main {  min-width: 100%; }
    .hero-content { max-width: 100%; padding: 0 5px; }
    .features { max-width: 100%; margin: 5px auto; }
    .cta-content { max-width: 100%; padding: 0 5px; } 
    .container2 { width: 100%; }
    .container3 { width: 100%; }
    .hero.simlabs-home-hero h1 { margin:5px; font-size: 26px; }
    .menuwrap { display: none; }
}


        /* ---------- 搜索框容器 ---------- */
        .search-wrapper {
            position: relative;
            flex-shrink: 0;
            width: 220px;
            transition: width 0.25s ease;
        }
        .search-wrapper:focus-within {
            width: 280px;
        }

        .search-input-wrap {
            position: relative;
            display: flex;
            align-items: center;
            background: #f1f3f4;
            border-radius: 24px;
            padding: 0 14px;
            transition: background 0.2s, box-shadow 0.2s;
            border: 1px solid transparent;
        }
        .search-input-wrap:focus-within {
            background: #fff;
            border-color: #1a73e8;
            box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
        }

        .search-icon {
            font-size: 18px;
            color: #5f6368;
            margin-right: 8px;
            flex-shrink: 0;
            line-height: 1;
            user-select: none;
        }

        #searchInput {
            flex: 1;
            border: none;
            background: transparent;
            padding: 10px 0;
            font-size: 14px;
            color: #202124;
            outline: none;
            min-width: 0;
            width: 100%;
        }
        #searchInput::placeholder {
            color: #9aa0a6;
        }

        .search-clear {
            display: none;
            background: none;
            border: none;
            color: #5f6368;
            font-size: 18px;
            cursor: pointer;
            padding: 4px;
            line-height: 1;
            flex-shrink: 0;
            border-radius: 50%;
            transition: background 0.2s;
        }
        .search-clear:hover {
            background: rgba(0, 0, 0, 0.06);
        }
        .search-clear.visible {
            display: block;
        }

        /* ---------- 搜索结果悬浮层 ---------- */
        .search-results {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            right: 0;
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            visibility: hidden;
            transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
            z-index: 200;
            border: 1px solid #e8eaed;
            pointer-events: none;
        }
        .search-results.open {
            max-height: 420px;
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            overflow-y: auto;
        }

        .search-results::-webkit-scrollbar {
            width: 6px;
        }
        .search-results::-webkit-scrollbar-track {
            background: #f1f3f4;
            border-radius: 4px;
        }
        .search-results::-webkit-scrollbar-thumb {
            background: #dadce0;
            border-radius: 4px;
        }
        .search-results::-webkit-scrollbar-thumb:hover {
            background: #c0c4c9;
        }

        .result-item {
            display: flex;
            align-items: center;
            padding: 10px 16px;
            cursor: pointer;
            transition: background 0.15s;
            border-bottom: 1px solid #f1f3f4;
            gap: 10px;
        }
        .result-item:last-child {
            border-bottom: none;
        }
        .result-item:hover,
        .result-item.active {
            background: #e8f0fe;
        }

        .result-item .result-icon {
            font-size: 18px;
            flex-shrink: 0;
            color: #5f6368;
        }
        .result-item .result-info {
            flex: 1;
            min-width: 0;
        }
        .result-item .result-name {
            font-size: 14px;
            color: #202124;
            font-weight: 500;
            word-break: break-word;
        }
        .result-item .result-name mark {
            background: #fbbc04;
            color: #202124;
            padding: 0 2px;
            border-radius: 2px;
            font-weight: 600;
        }
        .result-item .result-url {
            font-size: 12px;
            color: #70757a;
            margin-top: 2px;
            word-break: break-all;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .result-empty {
            padding: 24px 16px;
            text-align: center;
            color: #5f6368;
            font-size: 14px;
        }
        .result-empty .empty-icon {
            font-size: 32px;
            display: block;
            margin-bottom: 8px;
        }

        .result-tip {
            padding: 8px 16px;
            font-size: 12px;
            color: #9aa0a6;
            background: #f8f9fa;
            border-top: 1px solid #e8eaed;
            text-align: center;
            position: sticky;
            bottom: 0;
        } 
        /* ========== 移动端适配 ========== */
        @media (max-width: 820px) {
            .header-content {
                flex-wrap: wrap;
                gap: 4px;
            }
            .logo {
                font-size: 20px !important;
            }
            .logo h1 {
                font-size: 20px !important;
            }

            /* 导航换行 */
            nav {
                flex: 1 1 100%;
                order: 3;
            }
            nav ul {
                gap: 4px;
                justify-content: center;
            }
            nav ul li a {
                font-size: 13px;
            }

            /* 搜索框在 logo 右侧 */
            .search-wrapper {
                order: 2;
                flex: 0 1 auto;
                width: 160px;
                margin-left: auto;
            }
            .search-wrapper:focus-within {
                width: 200px;
            }

            #searchInput {
                font-size: 13px;
                padding: 8px 0;
            }
            .search-icon {
                font-size: 16px;
            }

            .search-results.open {
                max-height: 340px;
            }
            .result-item {
                padding: 8px 14px;
            }
            .result-item .result-name {
                font-size: 13px;
            }
            .result-item .result-url {
                font-size: 11px;
            }
        }

        @media (max-width: 480px) {
            .header-content {
                padding: 0 12px;
                gap: 6px;
            }
            .logo {
                font-size: 18px !important;
            }
            .logo h1 {
                font-size: 18px !important;
            }

            .search-wrapper {
                width: 130px;
            }
            .search-wrapper:focus-within {
                width: 160px;
            }

            .search-input-wrap {
                padding: 0 10px;
                border-radius: 20px;
            }
            #searchInput {
                font-size: 12px;
                padding: 6px 0;
            }
            .search-icon {
                font-size: 14px;
                margin-right: 4px;
            }
            .search-clear {
                font-size: 14px;
            }

            nav ul {
                gap: 2px 8px;
            }
            nav ul li a {
                font-size: 11px;
            }

            .search-results.open {
                max-height: 280px;
                border-radius: 12px;
                top: calc(100% + 6px);
            }
            .result-item {
                padding: 6px 12px;
                gap: 6px;
            }
            .result-item .result-icon {
                font-size: 14px;
            }
            .result-item .result-name {
                font-size: 12px;
            }
            .result-item .result-url {
                font-size: 10px;
            }
            .result-empty {
                padding: 16px 12px;
                font-size: 13px;
            }
            .result-tip {
                font-size: 11px;
                padding: 6px 12px;
            }

            .footer-links {
                gap: 20px;
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
        }

        /* 当搜索框在移动端被激活时，稍微扩大 */
        @media (max-width: 480px) {
            .search-wrapper:focus-within {
                width: 180px;
            }
        }

        /* 暗色模式兼容（仅针对搜索框） */
        @media (prefers-color-scheme: dark) {
            .search-input-wrap {
                background: #3c4043;
            }
            .search-input-wrap:focus-within {
                background: #303134;
                border-color: #8ab4f8;
                box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.25);
            }
            #searchInput {
                color: #e8eaed;
            }
            #searchInput::placeholder {
                color: #9aa0a6;
            }
            .search-icon {
                color: #9aa0a6;
            }
            .search-clear {
                color: #9aa0a6;
            }
            .search-results {
                background: #303134;
                border-color: #3c4043;
            }
            .result-item {
                border-bottom-color: #3c4043;
            }
            .result-item:hover,
            .result-item.active {
                background: #3c4043;
            }
            .result-item .result-name {
                color: #e8eaed;
            }
            .result-item .result-name mark {
                background: #fbbc04;
                color: #202124;
            }
            .result-item .result-url {
                color: #9aa0a6;
            }
            .result-empty {
                color: #9aa0a6;
            }
            .result-tip {
                color: #9aa0a6;
                background: #3c4043;
                border-top-color: #4a4d50;
            }
        }