/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --male-color: #3b82f6;
    --female-color: #ff6b9d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.05));
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-50px) scale(1.1);
        opacity: 0.5;
    }
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    color: #000000;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.header h1 {
    font-size: 3rem;
    color: #000000;
    font-weight: 800;
    margin: 0;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* 搜索区域 */
.search-section {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2rem 3rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
    width: 100%;
    box-sizing: border-box;
}

.search-box {
    display: flex;
    gap: 1rem !important;
    margin-bottom: 1.25rem !important;
    align-items: stretch;
}

#nameInput {
    flex: 1;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--bg-light);
    min-width: 0;
    height: auto;
    line-height: 1.5;
}

#nameInput::placeholder {
    font-size: 1rem;
    color: #9ca3af;
}

#nameInput:focus {
    border-color: #000000;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem !important;
    font-size: 1rem !important;
    font-weight: 600;
    color: white;
    background: #000000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    height: auto;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #1a1a1a;
}

.search-btn:active {
    transform: translateY(0);
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* 快速搜索 */
.quick-search {
    display: flex;
    align-items: center;
    gap: 0.625rem !important;
    flex-wrap: wrap;
}

.quick-label {
    color: var(--text-secondary);
    font-size: 0.875rem !important;
    font-weight: 500;
}

.quick-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    color: #000000;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: #000000;
    color: white;
    transform: translateY(-2px);
}

/* 结果区域 */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.6s ease;
}

.result-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.main-card {
    width: 100%;
}

/* 双列布局区域 */
.result-two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.result-name {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #000000;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    white-space: nowrap;
}

.share-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #000000;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #1a1a1a;
}

/* 数量展示 */
.count-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.75rem;
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.04));
    border-radius: 16px;
}

.count-label,
.count-unit {
    font-size: 1.375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.count-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #000000;
    animation: countUp 1s ease;
    letter-spacing: -0.02em;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 稀有度条 */
.rarity-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin: 1.5rem 0 1rem;
}

.rarity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--danger-color));
    border-radius: 4px;
    transition: width 1s ease;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.rarity-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.5rem 1.25rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    margin: 0 auto;
}

.rarity-icon {
    font-size: 1.25rem;
}

/* 卡片标题 */
.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.title-icon {
    width: 24px;
    height: 24px;
    color: #000000;
}

/* 性别图表 */
.gender-chart {
    margin-bottom: 1.5rem;
}

.gender-item {
    margin-bottom: 1.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.gender-item:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

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

.gender-item .gender-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.male .gender-icon {
    color: var(--male-color);
    background: rgba(59, 130, 246, 0.1);
}

.female .gender-icon {
    color: var(--female-color);
    background: rgba(255, 107, 157, 0.1);
}

.gender-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gender-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.gender-percent {
    font-size: 1.25rem;
    font-weight: 700;
}

.male .gender-percent {
    color: var(--male-color);
}

.female .gender-percent {
    color: var(--female-color);
}

.gender-bar {
    height: 10px;
    background: var(--bg-light);
    border-radius: 5px;
    overflow: hidden;
}

.gender-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}

.male-fill {
    background: var(--male-color);
}

.female-fill {
    background: var(--female-color);
}

/* 饼图 */
.pie-chart {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.pie-chart svg {
    width: 200px;
    height: 200px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

#maleCircle,
#pieCircle {
    transition: stroke-dasharray 1s ease, stroke-dashoffset 1s ease;
}

.pie-label {
    font-size: 15px;
    fill: var(--text-secondary);
    font-weight: 600;
}

.pie-value {
    font-size: 20px;
    fill: var(--text-primary);
    font-weight: 700;
}

/* 有趣事实 */
.fun-facts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fun-fact-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid #000000;
}


.fun-fact-item .fact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    margin-right: 1rem;
}

.fun-fact-item .fact-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.fact-icon-old {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.fun-fact-item .fact-text {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* 加载动画 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-light);
    border-top-color: #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* 错误提示 */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15), 0 0 0 1px rgba(239, 68, 68, 0.1);
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    width: 60px;
    height: 60px;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.error-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}

/* 使用指南 */
.guide-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.guide-card {
    position: relative;
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

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

.guide-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.guide-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.guide-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.guide-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #000000;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.guide-text h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.guide-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 页脚 */
.footer {
    margin-top: auto;
    padding: 3rem 2rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-note {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: default;
}

.stat-item:hover {
    color: var(--text-primary);
    transform: scale(1.05);
}

.stat-separator {
    color: var(--border-color);
    font-size: 1rem;
    user-select: none;
}

.help-btn {
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.help-btn:hover {
    color: #000000;
    transform: scale(1.05);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #000000;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.back-to-top:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: var(--shadow-xl);
    background: #1a1a1a;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--text-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
    font-weight: 500;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

.toast.warning {
    background: var(--warning-color);
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 56px;
        height: 56px;
    }

    .search-section {
        padding: 1.75rem 1.5rem;
        max-width: 100%;
    }

    .search-box {
        flex-direction: column;
    }

    #nameInput {
        width: 100%;
        padding: 0.875rem 1.25rem;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }

    .count-number {
        font-size: 3rem;
    }

    .result-section {
        grid-template-columns: 1fr;
    }
    
    .result-two-columns {
        grid-template-columns: 1fr;
    }

    .stats {
        gap: 1.5rem;
    }
    
    .stat-item {
        font-size: 0.875rem;
    }
    
    .stat-separator {
        display: none;
    }
    
    .help-btn {
        font-size: 0.875rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .guide-card {
        padding: 2rem 1.5rem;
    }
    
    .footer {
        padding: 2.5rem 1rem 1.5rem;
    }
    
    .footer-note {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
    }

    .count-number {
        font-size: 2.5rem;
    }

    .result-card {
        padding: 1.5rem;
    }
    
    .result-name {
        font-size: 1.5rem;
    }
    
    .count-label,
    .count-unit {
        font-size: 1.125rem;
    }
    
    .count-display {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .result-two-columns {
        grid-template-columns: 1fr;
    }
    
    .search-section {
        padding: 1.5rem 1.25rem;
        max-width: 100%;
    }
    
    #nameInput {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
    
    .search-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .quick-search {
        font-size: 0.8125rem;
    }
    
    .quick-btn {
        padding: 0.4rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    .footer {
        padding: 2rem 0.75rem 1.25rem;
    }
    
    .footer-note {
        font-size: 0.8125rem;
    }
    
    .stats {
        gap: 1rem;
        flex-direction: column;
    }
    
    .stat-item {
        font-size: 0.8125rem;
    }
    
    .stat-separator {
        display: none;
    }
    
    .help-btn {
        font-size: 0.8125rem;
    }
}

/* 性能优化 - 减少重绘 */
.result-card,
.search-btn,
.quick-btn,
.back-to-top {
    will-change: transform;
}

/* 打印样式 */
@media print {
    .background-animation,
    .search-section,
    .footer,
    .back-to-top,
    .guide-section {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .result-card {
        break-inside: avoid;
    }
}


/* SVG图标样式优化 */
.fun-fact-item .fact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    margin-right: 1rem;
}

.fun-fact-item .fact-icon svg {
    width: 22px;
    height: 22px;
    stroke: white;
    fill: none;
}


/* ========== 搜索区域优化 ========== */
.search-section {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    padding: 1.5rem;
    border-radius: 20px;
    margin: 0 auto 2rem auto;
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

#nameInput {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    outline: none;
    height: auto;
    line-height: 1.5;
    box-sizing: border-box;
    min-width: 0;
}

#nameInput:focus {
    border-color: #000;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
}

.search-btn:active {
    transform: scale(0.98);
}

.search-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
}

.quick-search {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.quick-label {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.quick-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #000;
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
}

.quick-btn:active {
    background: rgba(0,0,0,0.1);
}

/* ========== 友情链接 ========== */
.friend-links {
    text-align: center;
    padding: 20px 16px;
    background: rgba(255,255,255,0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 40px;
}

.friend-links-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.friend-links a {
    color: #000;
    text-decoration: none;
    padding: 4px 8px;
}

.link-separator {
    color: rgba(0, 0, 0, 0.3);
}

/* ========== 移动端优化 ========== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .search-section {
        padding: 1.25rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    #nameInput {
        width: 100%;
        padding: 1rem;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .search-btn {
        width: 100%;
        padding: 1rem;
        justify-content: center;
    }
    
    .quick-search {
        justify-content: flex-start;
    }
    
    .quick-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .quick-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .friend-links-inner {
        gap: 8px;
        font-size: 0.8rem;
    }
    
    .link-separator {
        display: none;
    }
    
    .friend-links a {
        padding: 6px 10px;
        background: rgba(0,0,0,0.05);
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .search-section {
        padding: 1rem;
        border-radius: 12px;
    }
    
    #nameInput {
        padding: 0.875rem;
    }
    
    .search-btn {
        padding: 0.875rem;
    }
    
    .quick-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.875rem;
    }
    
    .count-number {
        font-size: 2rem;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .fun-fact-item {
        padding: 0.75rem;
    }
    
    .fun-fact-item .fact-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .fun-fact-item .fact-icon svg {
        width: 18px;
        height: 18px;
    }
}


/* ========== 稀有度图标优化 ========== */
.rarity-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.95rem;
    color: #333;
}

.rarity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rarity-icon svg {
    width: 18px;
    height: 18px;
    stroke: #f59e0b;
    fill: #fef3c7;
}

/* ========== 有趣事实图标优化 ========== */
.fun-fact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border-left: 4px solid #6366f1;
}

.fun-fact-item .fact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    flex-shrink: 0;
}

.fun-fact-item .fact-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
    fill: none;
}

.fun-fact-item .fact-text {
    flex: 1;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    padding-top: 10px;
}

.fun-fact-item .fact-text strong {
    color: #6366f1;
    font-weight: 600;
}
