        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #f5f5f5;
            min-height: 100vh;
            margin: 0;
            padding: 0;
        }

        /* Main Layout */
        .main-layout {
            display: flex;
            max-width: 1400px;
            margin: 0 auto;
            padding: 8px;
            gap: 12px;
        }

        .container {
            flex: 1;
            background: white;
            border-radius: 10px;
            padding: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        /* Sidebar */
        .sidebar {
            width: 450px;
            flex-shrink: 0;
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            height: fit-content;
            position: sticky;
            top: 20px;
        }

        .sidebar-title {
            font-size: 18px;
            font-weight: 700;
            color: #333;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #667eea;
        }

        .sidebar-item {
            display: flex;
            gap: 12px;
            padding: 12px;
            margin-bottom: 10px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            text-decoration: none;
            color: #333;
        }

        .sidebar-item:hover {
            background: #f0f7ff;
            transform: translateX(5px);
        }

        .sidebar-thumbnail {
            width: 60px;
            height: 60px;
            border-radius: 6px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            flex-shrink: 0;
        }

        .sidebar-content {
            flex: 1;
        }

        .sidebar-item-title {
            font-weight: 600;
            font-size: 14px;
            color: #333;
            margin-bottom: 4px;
        }

        .sidebar-item-desc {
            font-size: 12px;
            color: #666;
            line-height: 1.4;
        }

        /* Featured Links Styles */
        .sidebar .sidebar-title:first-child {
            color: #667eea;
        }

        .featured-links-sidebar {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 1px solid #e5e7eb;
        }

        .featured-link-item {
            display: block;
            padding: 12px 16px;
            background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
            border: 2px solid #d1d9ff;
            border-radius: 8px;
            text-decoration: none;
            color: #4c5fd5;
            transition: all 0.25s ease;
            font-size: 14px;
            font-weight: 600;
            box-shadow: 0 2px 4px rgba(102, 126, 234, 0.08);
            cursor: pointer;
        }

        .featured-link-item:hover {
            background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
            border-color: #667eea;
            color: #ffffff;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
        }

        .featured-link-item .link-icon {
            display: none;
        }

        /* Footer */
        .footer {
            background: #2d3748;
            color: white;
            padding: 50px 30px 30px;
            margin-top: 40px;
        }

        .footer-content {
            max-width: 1400px;
            margin: 0 auto;
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 40px;
            margin-bottom: 40px;
        }

        .footer-section {
            text-align: left;
        }

        .footer-section-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 15px;
            color: white;
        }

        .footer-links {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .footer-link {
            color: #a0aec0;
            text-decoration: none;
            font-size: 14px;
            transition: all 0.3s;
        }

        .footer-link:hover {
            color: white;
            padding-left: 5px;
        }

        .footer-about {
            color: #a0aec0;
            font-size: 14px;
            line-height: 1.6;
        }

        .footer-contact {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .footer-contact-item {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #a0aec0;
            font-size: 14px;
        }

        .footer-social {
            display: flex;
            gap: 15px;
            margin-top: 15px;
        }

        .social-icon {
            width: 36px;
            height: 36px;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 18px;
            transition: all 0.3s;
            cursor: pointer;
        }

        .social-icon:hover {
            background: rgba(255,255,255,0.2);
            transform: translateY(-3px);
        }

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

        .footer-copyright {
            font-size: 13px;
            color: #a0aec0;
        }

        /* How to Use Section */
        .how-to-use {
            background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
            border-radius: 10px;
            padding: 40px;
            margin: 30px 0;
            border: 2px solid #667eea;
        }

        .how-to-use-title {
            font-size: 28px;
            font-weight: 700;
            color: #333;
            margin-bottom: 15px;
            text-align: center;
        }

        .how-to-use-subtitle {
            font-size: 16px;
            color: #666;
            text-align: center;
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .feature-card {
            background: white;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: all 0.3s;
        }

        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.15);
        }

        .feature-icon {
            font-size: 40px;
            margin-bottom: 12px;
        }

        .feature-title {
            font-size: 18px;
            font-weight: 700;
            color: #333;
            margin-bottom: 10px;
        }

        .feature-desc {
            font-size: 14px;
            color: #666;
            line-height: 1.7;
        }

        /* Tips Section */
        .tips-section {
            background: white;
            border-radius: 10px;
            padding: 30px;
            margin: 30px 0;
            border: 2px solid #10b981;
        }

        .tips-title {
            font-size: 24px;
            font-weight: 700;
            color: #333;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .tips-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        .tip-card {
            background: #f0fdf4;
            padding: 20px;
            border-radius: 8px;
            border-left: 4px solid #10b981;
        }

        .tip-number {
            display: inline-block;
            background: #10b981;
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            text-align: center;
            line-height: 28px;
            font-weight: 700;
            font-size: 14px;
            margin-right: 10px;
        }

        .tip-title {
            font-size: 16px;
            font-weight: 700;
            color: #333;
            margin-bottom: 8px;
        }

        .tip-content {
            font-size: 14px;
            color: #666;
            line-height: 1.6;
        }

        .tip-example {
            background: white;
            padding: 10px;
            border-radius: 6px;
            margin-top: 10px;
            font-size: 13px;
            color: #555;
            font-style: italic;
        }

        .scroll-to-guide {
            text-align: center;
            margin-top: 5px;
            margin-bottom: 5px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .scroll-link {
            color: #667eea;
            text-decoration: none;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
        }

        .scroll-link:hover {
            text-decoration: underline;
        }

        .naming-guide-link {
            display: inline-block;
            padding: 8px 20px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            text-decoration: none;
            font-weight: 700;
            font-size: 14px;
            border-radius: 8px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
        }

        .naming-guide-link:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
        }


        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 8px;
            font-size: 1.4em;
            line-height: 1.3;
        }

        .gender-selector {
            text-align: center;
            margin-bottom: 6px;
        }

        .gender-btn {
            padding: 8px 30px;
            margin: 0 8px;
            border: 2px solid #666;
            background: white;
            color: #666;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .gender-btn.active {
            background: #666;
            color: white;
        }

        .filters-section {
            background: #f8f9fa;
            padding: 8px;
            border-radius: 8px;
            margin-bottom: 6px;
        }

        .filter-category {
            margin-bottom: 6px;
            padding-bottom: 6px;
            border-bottom: 1px solid #e0e0e0;
        }

        .filter-category:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }

        .category-title {
            font-size: 13px;
            font-weight: 700;
            color: #333;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: inline-block;
            min-width: 100px;
        }

        .tags-container {
            display: inline-flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .tag {
            padding: 5px 12px;
            border: 1.5px solid #ddd;
            background: white;
            color: #666;
            border-radius: 15px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            text-transform: capitalize;
            user-select: none;
        }

        .tag:hover {
            border-color: #666;
            color: #666;
        }

        .tag.selected {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: #667eea;
        }

        [data-category="main-gender"] {
            border-color: #3b82f6;
        }

        [data-category="main-gender"].selected {
            background: #3b82f6;
            border-color: #3b82f6;
        }

        [data-category="style"].selected {
            background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
            border-color: #f59e0b;
        }

        [data-category="tone"].selected {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            border-color: #10b981;
        }

        [data-category="luck"].selected {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            border-color: #f59e0b;
        }

        [data-category="aesthetic"].selected {
            background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
            border-color: #ec4899;
        }

        [data-category="popularity"].selected {
            background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
            border-color: #8b5cf6;
        }

        .controls {
            text-align: center;
            margin-bottom: 5px;
        }

        .action-buttons {
            display: inline-flex;
            gap: 8px;
            margin-bottom: 0;
        }

        .sort-section {
            background: #f8f9fa;
            padding: 6px;
            border-radius: 8px;
            text-align: center;
            margin-bottom: 5px;
        }

        .sort-label {
            font-weight: 600;
            color: #555;
            font-size: 13px;
            display: inline-block;
            margin-right: 10px;
        }

        .sort-tag {
            padding: 5px 12px;
            border: 1.5px solid #ddd;
            background: white;
            color: #666;
            border-radius: 15px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            user-select: none;
            display: inline-block;
            margin: 3px;
        }

        .sort-tag:hover {
            border-color: #666;
            color: #666;
        }

        .sort-tag.active {
            background: #666;
            color: white;
            border-color: #666;
        }

        .btn {
            padding: 8px 25px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-primary {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
            box-shadow: 0 6px 16px rgba(76, 175, 80, 0.5);
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: #999;
            color: white;
        }

        .btn-secondary:hover {
            background: #888;
        }

        .pagination {
            text-align: center;
            margin: 8px 0;
            padding: 0;
        }

        .names-grid {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .name-card {
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 12px;
            padding: 25px;
            transition: all 0.3s;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .name-card:hover {
            box-shadow: 0 6px 20px rgba(0,0,0,0.12);
            border-color: #667eea;
        }

        .name-header {
            display: flex;
            gap: 20px;
        }

        .name-chars-box,
        .similarity-box {
            flex: 1;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            padding: 15px;
            text-align: center;
        }

        .box-label {
            font-size: 14px;
            color: #666;
            margin-bottom: 10px;
            font-weight: 500;
        }

        .name-chars-content {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 8px;
        }

        .name-chars {
            font-size: 28px;
            font-weight: bold;
            color: #333;
            letter-spacing: 4px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }

        .name-pinyin-display {
            font-size: 15px;
            color: #666;
            margin-top: 6px;
            font-weight: 500;
            letter-spacing: 1px;
            text-align: center;
        }

        .copy-btn {
            background: white;
            border: 1.5px solid #ccc;
            border-radius: 4px;
            padding: 4px 6px;
            font-size: 18px;
            cursor: pointer;
            transition: all 0.2s;
            color: #666;
        }

        .copy-btn:hover {
            border-color: #999;
            background: #f5f5f5;
            transform: scale(1.1);
        }

        .copy-btn:active {
            transform: scale(0.95);
            background: #e8e8e8;
        }

        .name-pinyin {
            font-size: 16px;
            color: #888;
            font-style: italic;
        }

        .similarity-value {
            font-size: 32px;
            font-weight: bold;
            color: #333;
        }

        .name-meaning-box {
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
        }

        .name-meaning {
            font-size: 15px;
            line-height: 1.8;
            color: #444;
            text-align: left;
            margin-top: 10px;
        }

        .name-evaluation-box {
            border: 2px solid #e8f4f8;
            border-radius: 8px;
            padding: 20px;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            margin-top: 15px;
        }

        .name-evaluation {
            font-size: 15px;
            line-height: 1.8;
            color: #0c4a6e;
            text-align: left;
            margin-top: 10px;
            font-weight: 500;
        }

        .speaker-icon {
            cursor: pointer;
            font-size: 18px;
            color: #666;
            transition: all 0.2s;
        }

        .speaker-icon:hover {
            color: #333;
            transform: scale(1.1);
        }

        .voice-settings {
            display: flex;
            gap: 15px;
            align-items: center;
            margin-top: 10px;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
            font-size: 13px;
        }

        .voice-setting-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .voice-setting-label {
            font-weight: 600;
            color: #555;
        }

        .voice-select {
            padding: 4px 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
        }

        /* Results Controls - Sticky */
        .results-controls {
            position: sticky;
            top: 0;
            z-index: 100;
            background: white;
            padding: 8px 10px;
            margin: 5px 0;
            border-radius: 8px;
            border: 2px solid #667eea;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            display: flex;
            justify-content: flex-start;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .voice-settings-sticky {
            display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: nowrap;
        }

        .character-filter {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: nowrap;
        }

        .filter-label {
            font-weight: 600;
            color: #555;
            font-size: 13px;
            white-space: nowrap;
        }

        .character-filter-input {
            padding: 6px 10px;
            border: 2px solid #ddd;
            border-radius: 6px;
            font-size: 14px;
            width: 120px;
            transition: all 0.2s;
        }

        .character-filter-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .filter-apply-btn {
            padding: 6px 16px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .filter-apply-btn:hover {
            background: #5568d3;
            transform: translateY(-1px);
        }

        .filter-clear-btn {
            padding: 6px 12px;
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .filter-clear-btn:hover {
            background: #dc2626;
            transform: translateY(-1px);
        }

        /* 软弹窗提示 */
        .toast {
            position: fixed;
            top: 80px;
            left: 50%;
            transform: translateX(-50%);
            background: #ef4444;
            color: white;
            padding: 15px 25px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            z-index: 1000;
            font-size: 14px;
            font-weight: 600;
            display: none;
            animation: slideDown 0.3s ease-out;
        }

        .toast.show {
            display: block;
        }

        /* Initial Letter Filter - Collapsible Version */
        .initial-filter-section {
            background: white;
            padding: 8px 12px;
            margin: 5px 0;
            border-radius: 8px;
            border: 1px solid #e0e0e0;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        }

        .initial-filter-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0;
        }

        .filter-header-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .filter-label {
            font-size: 13px;
            font-weight: 600;
            color: #667eea;
        }

        .filter-toggle-btn {
            padding: 4px 10px;
            background: #667eea;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 600;
            color: white;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .filter-toggle-btn:hover {
            background: #5568d3;
        }

        .filter-toggle-btn #toggleIcon {
            font-size: 10px;
            transition: transform 0.3s;
        }

        .filter-toggle-btn.expanded #toggleIcon {
            transform: rotate(180deg);
        }

        .filter-clear-btn {
            padding: 4px 8px;
            background: #f0f0f0;
            border: 1px solid #ddd;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            color: #666;
            transition: all 0.2s;
        }

        .filter-clear-btn:hover {
            background: #e0e0e0;
            color: #333;
        }

        .initial-filter-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #f0f0f0;
            transition: all 0.3s ease;
        }

        .initial-filter-buttons.collapsed {
            display: none;
        }

        .initial-filter-btn {
            padding: 4px 8px;
            border: 1px solid #667eea;
            background: white;
            color: #667eea;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 600;
            font-size: 12px;
            transition: all 0.2s;
            min-width: 32px;
        }

        .initial-filter-btn:hover {
            background: #667eea;
            color: white;
        }

        .initial-filter-btn.active {
            background: #667eea;
            color: white;
        }

        .initial-filter-info {
            font-size: 12px;
            color: #666;
            padding: 6px 8px;
            background: #f8f9fa;
            border-radius: 4px;
            text-align: center;
            display: none;
        }

        .initial-filter-info.show {
            display: block;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        .name-info {
            flex: 1;
        }

        .name-meaning {
            font-size: 14px;
            color: #666;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        .scores-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .score-item {
            background: #f8f9fa;
            padding: 8px 15px;
            border-radius: 8px;
            font-size: 13px;
            text-align: center;
        }

        .score-label {
            color: #666;
            font-weight: 600;
            margin-bottom: 3px;
            font-size: 11px;
            text-transform: uppercase;
        }

        .score-value {
            font-size: 20px;
            font-weight: bold;
            color: #666;
        }

        .match-score {
            background: #666;
            color: white;
            padding: 8px 15px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 13px;
        }

        .click-hint {
            font-size: 12px;
            color: #999;
            text-align: right;
            margin-top: 10px;
        }

        .loading, .no-results {
            text-align: center;
            padding: 40px;
            font-size: 18px;
            color: #666;
            font-weight: 500;
        }

        .loading {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .loading-icon {
            font-size: 24px;
            animation: bounce 1s ease-in-out infinite;
        }

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

        .loading-dots::after {
            content: '';
            animation: dots 1.5s steps(4, end) infinite;
        }

        @keyframes dots {
            0%, 20% {
                content: '';
            }
            40% {
                content: '.';
            }
            60% {
                content: '..';
            }
            80%, 100% {
                content: '...';
            }
        }

        .mode-switcher {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 6px;
            padding: 6px;
            background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
            border-radius: 10px;
        }

        .mode-switch-btn {
            padding: 12px 30px;
            border: 2px solid #667eea;
            background: white;
            color: #667eea;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .mode-switch-btn.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: #667eea;
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .surname-link-btn {
            padding: 12px 30px;
            border: 2px solid #28a745;
            background: white;
            color: #28a745;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            margin-left: 12px;
        }

        .surname-link-btn:hover {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
            color: white;
            border-color: #28a745;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
        }

        .generation-section {
            display: none;
        }

        .generation-section.active {
            display: block;
        }

        .ai-mode-switcher {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-bottom: 20px;
            padding: 5px;
            background: #f8f9fa;
            border-radius: 8px;
            width: fit-content;
            margin-left: auto;
            margin-right: auto;
        }

        .ai-mode-btn {
            padding: 6px 16px;
            border: 1px solid #ddd;
            background: white;
            color: #666;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .ai-mode-btn.active {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .similarity-score {
            display: inline-block;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            margin-left: 10px;
        }

        .ai-results .name-card {
            max-width: 600px;
            margin: 0 auto 15px auto;
        }

        .ai-content {
            display: none;
        }

        .ai-content.active {
            display: block;
        }

        .input-section {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .input-group {
            margin-bottom: 15px;
        }

        .input-label {
            font-weight: 600;
            color: #333;
            margin-bottom: 8px;
            display: block;
            font-size: 14px;
        }

        .input-field {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.2s;
        }

        .input-field:focus {
            outline: none;
            border-color: #667eea;
        }

        .hint-text {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
            font-style: italic;
        }

        .preferences-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }

        .pref-tag {
            padding: 6px 14px;
            border: 2px solid #ddd;
            background: white;
            color: #666;
            border-radius: 15px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            user-select: none;
        }

        .pref-tag:hover {
            border-color: #667eea;
            color: #667eea;
        }

        .pref-tag.selected {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: #667eea;
        }

        .ai-generate-btn {
            width: 100%;
            padding: 15px;
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
        }

        .ai-generate-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
            background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
        }

        .ai-generate-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        .ai-results {
            margin-top: 20px;
        }

        .error-message {
            background: #fee;
            border: 2px solid #fcc;
            color: #c33;
            padding: 15px;
            border-radius: 8px;
            margin-top: 20px;
            text-align: center;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.7);
            z-index: 1000;
            overflow-y: auto;
        }

        .modal-content {
            background: white;
            max-width: 900px;
            margin: 30px auto;
            border-radius: 15px;
            padding: 30px;
            position: relative;
        }

        .modal-close {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 28px;
            cursor: pointer;
            color: #999;
        }

        .detail-chars {
            text-align: center;
            font-size: 80px;
            font-weight: bold;
            color: #333;
            margin-bottom: 10px;
            letter-spacing: 10px;
        }

        .detail-pinyin {
            text-align: center;
            font-size: 20px;
            color: #888;
            margin-bottom: 20px;
        }

        .detail-meanings {
            font-size: 14px;
            line-height: 1.6;
            color: #666;
            margin-bottom: 25px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .scores-section {
            margin-top: 20px;
        }

        .score-category {
            margin-bottom: 20px;
        }

        .category-title-detail {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 2px solid #667eea;
        }

        .score-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 10px;
        }

        .score-detail {
            background: #f8f9fa;
            padding: 10px;
            border-radius: 6px;
            text-align: center;
        }

        .score-detail-label {
            font-weight: 600;
            color: #555;
            margin-bottom: 3px;
            text-transform: capitalize;
            font-size: 12px;
        }

        .score-detail-value {
            font-size: 22px;
            font-weight: bold;
            color: #667eea;
        }

        /* 移动端响应式设计 */
        @media (max-width: 768px) {
            /* 导航栏 */
            .main-layout {
                flex-direction: column;
                padding: 10px;
            }

            .container {
                padding: 15px;
            }

            /* 移动端隐藏语音调节板块 */
            .results-controls {
                display: none !important;
            }

            /* 筛选器折叠功能 - 增强选择器优先级 */
            .filters-section .filter-category {
                border-bottom: 1px solid #e0e0e0;
                margin-bottom: 8px;
                padding-bottom: 8px;
            }

            .filters-section .filter-category .category-title {
                cursor: pointer;
                user-select: none;
                position: relative;
                padding-right: 25px;
                display: block !important;
                width: 100%;
                margin-bottom: 8px;
            }

            .filters-section .filter-category .tags-container {
                display: inline-flex !important;
                flex-wrap: wrap;
                gap: 6px;
            }

            /* 添加折叠/展开图标 */
            .filters-section .filter-category .category-title::after {
                content: '▼';
                position: absolute;
                right: 0;
                font-size: 10px;
                transition: transform 0.3s;
                color: #667eea;
            }

            /* Gender 保持展开，不显示图标 */
            .filters-section .filter-category:nth-child(1) .category-title::after {
                display: none;
            }

            /* 展开状态的图标旋转 */
            .filters-section .filter-category.expanded .category-title::after {
                transform: rotate(180deg);
            }

            /* 默认折叠除Gender外的其他筛选器 */
            .filters-section .filter-category:nth-child(n+2) .tags-container {
                display: none !important;
                margin-top: 0;
            }

            /* 展开状态显示标签 */
            .filters-section .filter-category.expanded .tags-container {
                display: inline-flex !important;
            }

            /* 只有 Gender 始终展开 */
            .filters-section .filter-category:nth-child(1) .tags-container {
                display: inline-flex !important;
            }

            /* Sort Section 折叠功能 */
            .sort-section {
                position: relative;
                padding: 10px;
            }

            .sort-section .sort-label {
                cursor: pointer;
                display: block !important;
                margin-bottom: 8px;
                margin-right: 0;
                position: relative;
                padding-right: 25px;
            }

            /* Sort label 添加折叠图标 */
            .sort-section .sort-label::after {
                content: '▼';
                position: absolute;
                right: 0;
                font-size: 10px;
                transition: transform 0.3s;
                color: #667eea;
            }

            /* Sort Section 展开时图标旋转 */
            .sort-section.expanded .sort-label::after {
                transform: rotate(180deg);
            }

            /* 默认折叠 sort tags */
            .sort-section .sort-tag,
            .sort-section span[style*="margin"] {
                display: none !important;
            }

            /* 展开状态显示 sort tags */
            .sort-section.expanded .sort-tag,
            .sort-section.expanded span[style*="margin"] {
                display: inline-block !important;
            }

            /* 侧边栏 */
            .sidebar {
                position: static;
                width: 100%;
                margin-top: 20px;
            }

            /* Featured Links 移动端 */
            .featured-links-sidebar {
                gap: 5px;
                margin-bottom: 20px;
                padding-bottom: 12px;
            }

            .featured-link-item {
                padding: 8px 12px;
                font-size: 13px;
            }

            /* 标题 */
            h1 {
                font-size: 1.1em;
                margin-bottom: 8px;
                line-height: 1.3;
            }

            /* 模式切换按钮 - 优化布局 */
            .mode-switcher {
                flex-direction: row;
                flex-wrap: wrap;
                gap: 6px;
                padding: 8px;
                margin-bottom: 10px;
            }

            .mode-switch-btn {
                flex: 1;
                min-width: calc(50% - 3px);
                padding: 8px 12px;
                font-size: 11px;
                white-space: nowrap;
                line-height: 1.3;
            }

            .surname-link-btn {
                flex: 1 1 100%;
                padding: 8px 12px;
                font-size: 12px;
                margin-left: 0;
                white-space: nowrap;
            }

            .mode-btn {
                width: 100%;
                padding: 12px 20px;
                font-size: 14px;
            }

            /* 筛选标签 */
            .tags-container {
                gap: 6px;
            }

            .tag {
                padding: 6px 12px;
                font-size: 12px;
            }

            /* 排序标签 */
            .sort-tags {
                flex-wrap: wrap;
                gap: 6px;
            }

            .sort-tag {
                padding: 6px 12px;
                font-size: 11px;
            }

            /* 首字母筛选 - 移动端优化 */
            .initial-filter-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .filter-header-actions {
                width: 100%;
                justify-content: flex-start;
            }

            /* 结果控件 - 移动端优化 */
            .results-controls {
                flex-direction: column;
                align-items: stretch;
                padding: 12px;
                gap: 15px;
            }

            .voice-settings-sticky {
                flex-direction: column;
                gap: 10px;
                width: 100%;
            }

            .voice-setting-group {
                width: 100%;
                justify-content: space-between;
            }

            .voice-select {
                flex: 1;
                max-width: 200px;
            }

            .character-filter {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                width: 100%;
            }

            .filter-label {
                font-size: 14px;
            }

            .character-filter-input {
                width: 100%;
                font-size: 16px;
                padding: 10px;
            }

            .filter-apply-btn {
                width: 48%;
                padding: 10px;
                font-size: 14px;
            }

            .filter-clear-btn {
                width: 48%;
                padding: 10px;
                font-size: 14px;
            }

            .character-filter {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
            }

            .character-filter .filter-label {
                width: 100%;
            }

            .character-filter .character-filter-input {
                width: 100%;
            }

            /* 名字卡片 */
            .name-card {
                flex-direction: column;
                padding: 15px;
            }

            .name-chars {
                font-size: 28px;
                letter-spacing: 6px;
            }

            .name-pinyin {
                font-size: 16px;
            }

            .name-pinyin-display {
                font-size: 14px;
            }

            .name-meaning {
                font-size: 13px;
            }

            /* 分页 */
            .pagination {
                flex-direction: column;
                gap: 10px;
            }

            .pagination-info {
                font-size: 13px;
            }

            /* AI生成部分 */
            .ai-mode-switcher {
                flex-direction: column;
                gap: 8px;
            }

            .ai-mode-btn {
                width: 100%;
                padding: 10px 20px;
            }

            .input-field {
                font-size: 16px;
            }

            /* 页面切换器 */
            .page-switcher {
                padding: 12px;
                font-size: 13px;
            }

            /* Footer */
            .footer-grid {
                grid-template-columns: 1fr;
                gap: 30px;
            }

            .footer-section-title {
                font-size: 16px;
            }

            .footer-about,
            .footer-link,
            .footer-contact-item {
                font-size: 13px;
            }

            /* 使用指南 */
            .guide-section {
                padding: 20px;
            }

            .guide-title {
                font-size: 1.5em;
            }

            .feature-grid {
                grid-template-columns: 1fr;
            }

            /* Tips */
            .tips-section {
                padding: 20px;
            }

            .tips-grid {
                grid-template-columns: 1fr;
            }

            .tip-card {
                padding: 15px;
            }

            /* 模态框 */
            .modal-content {
                width: 95%;
                max-width: 95%;
                margin: 20px auto;
                padding: 20px;
            }

            .modal-name-chars {
                font-size: 48px;
            }

            .scores-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* 超小屏幕 */
        @media (max-width: 480px) {
                gap: 10px;
            }

                font-size: 18px;
            }

                gap: 10px;
            }

            .name-chars {
                font-size: 24px;
                letter-spacing: 4px;
            }

            .name-pinyin-display {
                font-size: 13px;
            }

            .scores-grid {
                grid-template-columns: 1fr;
            }

            .character-filter-input {
                font-size: 16px;
            }
        }

        /* Attributes Selection Styles */
        .attributes-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 15px;
        }

        .attributes-grid.hidden {
            display: none;
        }

        .attr-tag {
            display: inline-block;
            padding: 10px 15px;
            background: #f3f4f6;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
            font-weight: 500;
            color: #374151;
            user-select: none;
            white-space: nowrap;
            margin: 0;
        }

        .attr-tag:hover {
            background: #e0e7ff;
            border-color: #818cf8;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
        }

        .attr-tag.selected {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-color: #667eea;
            color: white;
            font-weight: 600;
        }

        .expand-attributes-btn {
            width: 100%;
            padding: 10px 20px;
            background: white;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            color: #6b7280;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .expand-attributes-btn:hover {
            background: #f9fafb;
            border-color: #667eea;
            color: #667eea;
        }

        .expand-attributes-btn #expandIcon {
            transition: transform 0.3s;
            font-size: 12px;
        }

        .expand-attributes-btn.expanded #expandIcon {
            transform: rotate(180deg);
        }

        @media (max-width: 768px) {
            .attributes-grid {
                grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
                gap: 8px;
            }

            .attr-tag {
                padding: 8px 12px;
                font-size: 13px;
            }
        }

        /* Understanding Chinese Names & Culture Section */
        .naming-culture-section {
            max-width: 900px;
            margin: 60px auto;
            padding: 50px 40px;
            background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(102, 126, 234, 0.12);
            border: 2px solid #e8ecff;
        }

        .culture-section-title {
            font-size: 32px;
            font-weight: 700;
            color: #2d3748;
            text-align: center;
            margin-bottom: 25px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .culture-intro {
            font-size: 16px;
            line-height: 1.8;
            color: #4a5568;
            margin-bottom: 25px;
            text-align: left;
        }

        .culture-intro p {
            margin: 0;
        }

        .inline-link {
            color: #667eea;
            text-decoration: none;
            font-weight: 600;
            border-bottom: 1px solid transparent;
            transition: all 0.2s ease;
        }

        .inline-link:hover {
            color: #5568d3;
            border-bottom-color: #5568d3;
        }

        .show-more-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            padding: 14px 24px;
            margin: 20px 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
        }

        .show-more-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
        }

        .toggle-icon {
            font-size: 12px;
            transition: transform 0.3s ease;
        }

        .show-more-btn.expanded .toggle-icon {
            transform: rotate(180deg);
        }

        .culture-expanded-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.5s ease;
        }

        .culture-expanded-content.active {
            max-height: 3000px;
        }

        .culture-detail-section {
            margin-top: 30px;
            padding: 25px;
            background: white;
            border-radius: 12px;
            border-left: 4px solid #667eea;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .culture-detail-section h3 {
            font-size: 22px;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 15px;
        }

        .culture-detail-section p {
            font-size: 15px;
            line-height: 1.8;
            color: #4a5568;
            margin-bottom: 12px;
        }

        .culture-list {
            margin: 15px 0;
            padding-left: 20px;
        }

        .culture-list li {
            font-size: 15px;
            line-height: 1.8;
            color: #4a5568;
            margin-bottom: 10px;
        }

        .culture-list li strong {
            color: #2d3748;
        }

        .culture-two-ways {
            border-left-color: #764ba2;
        }

        .two-ways-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 20px;
        }

        .way-option {
            padding: 20px;
            background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
            border: 2px solid #e8ecff;
            border-radius: 12px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .way-option:hover {
            border-color: #667eea;
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
        }

        .way-number {
            display: inline-block;
            width: 40px;
            height: 40px;
            line-height: 40px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 50%;
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 15px;
        }

        .way-option p {
            margin: 10px 0;
            font-size: 15px;
        }

        .way-hint {
            font-size: 14px;
            color: #667eea;
            font-weight: 600;
            margin-top: 10px;
        }

        .translate-switch-link {
            color: #667eea;
            text-decoration: none;
            font-weight: 700;
            transition: all 0.2s ease;
            display: inline-block;
        }

        .translate-switch-link:hover {
            color: #5568d3;
            transform: translateX(3px);
        }

        /* FAQ Section */
        .faq-section {
            margin-top: 40px;
        }

        .faq-title {
            font-size: 26px;
            font-weight: 700;
            color: #2d3748;
            text-align: center;
            margin-bottom: 30px;
        }

        .faq-item {
            background: white;
            border-radius: 12px;
            margin-bottom: 15px;
            overflow: hidden;
            border: 2px solid #e8ecff;
            transition: all 0.3s ease;
        }

        .faq-item:hover {
            border-color: #d1d9ff;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
        }

        .faq-question {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 20px 25px;
            cursor: pointer;
            user-select: none;
            transition: background 0.2s ease;
        }

        .faq-question:hover {
            background: #f8f9ff;
        }

        .faq-icon {
            flex-shrink: 0;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 50%;
            font-size: 18px;
            font-weight: 700;
            transition: transform 0.3s ease;
        }

        .faq-item.active .faq-icon {
            transform: rotate(45deg);
        }

        .faq-question span:last-child {
            flex: 1;
            font-size: 16px;
            font-weight: 600;
            color: #2d3748;
        }

        .faq-answer {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease, padding 0.4s ease;
            padding: 0 25px;
        }

        .faq-item.active .faq-answer {
            max-height: 800px;
            padding: 0 25px 25px 68px;
        }

        .faq-answer p {
            font-size: 15px;
            line-height: 1.8;
            color: #4a5568;
            margin-bottom: 12px;
        }

        .faq-answer ul {
            margin: 10px 0;
            padding-left: 20px;
        }

        .faq-answer li {
            font-size: 15px;
            line-height: 1.8;
            color: #4a5568;
            margin-bottom: 8px;
        }

        .faq-answer strong {
            color: #2d3748;
            font-weight: 600;
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .naming-culture-section {
                margin: 40px 20px;
                padding: 30px 20px;
            }

            .culture-section-title {
                font-size: 24px;
            }

            .culture-intro {
                font-size: 15px;
            }

            .culture-detail-section {
                padding: 20px 15px;
            }

            .culture-detail-section h3 {
                font-size: 18px;
            }

            .two-ways-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .faq-title {
                font-size: 22px;
            }

            .faq-question {
                padding: 15px 18px;
            }

            .faq-question span:last-child {
                font-size: 15px;
            }

            .faq-item.active .faq-answer {
                padding: 0 18px 20px 58px;
            }

            .faq-answer p,
            .faq-answer li {
                font-size: 14px;
            }
        }
    </style>
