/* 百家姓工具样式 */

/* 搜索区域 */
.search-section {
    margin-bottom: 2rem;
}

.search-input-group {
    display: flex;
    gap: 1rem;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 查询结果卡片 */
.result-section {
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.surname-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.surname-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.surname-name {
    font-size: 3rem;
    font-weight: 700;
}

.surname-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.stat-item i {
    font-size: 1.1rem;
}

.stat-item strong {
    font-size: 1.1rem;
}

.surname-origin,
.surname-celebrities {
    margin-bottom: 1.5rem;
}

.surname-origin:last-child,
.surname-celebrities:last-child {
    margin-bottom: 0;
}

.surname-origin h4,
.surname-celebrities h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.surname-origin p {
    line-height: 1.6;
    opacity: 0.95;
}

.celebrities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.celebrity-tag {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* 热门姓氏网格 */
.surnames-grid {
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.section-title i {
    color: var(--primary-color);
}

.surnames-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.surname-item {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.surname-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.surname-item.active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.surname-char {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.surname-info {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-input-group {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .surname-title {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .surname-name {
        font-size: 2.5rem;
    }

    .surname-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .surnames-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
    }

    .surname-item {
        padding: 1rem 0.5rem;
    }

    .surname-char {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .surname-card {
        padding: 1.5rem;
    }

    .surname-name {
        font-size: 2rem;
    }

    .surnames-list {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }

    .surname-char {
        font-size: 1.3rem;
    }

    .surname-info {
        font-size: 0.75rem;
    }
}
